diff --git a/muyu-auth/src/main/resources/bootstrap.yml b/muyu-auth/src/main/resources/bootstrap.yml index b309a3d..2216af3 100644 --- a/muyu-auth/src/main/resources/bootstrap.yml +++ b/muyu-auth/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-gateway/src/main/resources/bootstrap.yml b/muyu-gateway/src/main/resources/bootstrap.yml index d7367b4..30621eb 100644 --- a/muyu-gateway/src/main/resources/bootstrap.yml +++ b/muyu-gateway/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置 @@ -28,12 +28,12 @@ spring: eager: true transport: # 控制台地址 - dashboard: 127.0.0.1:8718 + dashboard: 111.229.102.61:8718 # nacos配置持久化 datasource: ds1: nacos: - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 dataId: sentinel-muyu-gateway groupId: DEFAULT_GROUP data-type: json diff --git a/muyu-modules/muyu-file/src/main/resources/bootstrap.yml b/muyu-modules/muyu-file/src/main/resources/bootstrap.yml index 0cb85bd..cf15ffd 100644 --- a/muyu-modules/muyu-file/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-file/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml b/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml index b628931..2332f62 100644 --- a/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-gen/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml index 618f3e8..9db5ee8 100644 --- a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/BookInfoController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/BookInfoController.java new file mode 100644 index 0000000..4d2274e --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/BookInfoController.java @@ -0,0 +1,107 @@ +package com.muyu.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.muyu.system.domain.SysConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.system.domain.BookInfo; +import com.muyu.system.service.IBookInfoService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Controller + * + * @author muyu + * @date 2024-02-22 + */ +@RestController +@RequestMapping("/info") +public class BookInfoController extends BaseController +{ + @Autowired + private IBookInfoService bookInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:list") + @GetMapping("/list") + public Result> list(BookInfo bookInfo) + { + startPage(); + List list = bookInfoService.selectBookInfoList(bookInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:info:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BookInfo bookInfo) + { + List list = bookInfoService.selectBookInfoList(bookInfo); + ExcelUtil util = new ExcelUtil(BookInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:info:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(bookInfoService.selectBookInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:info:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody BookInfo bookInfo) + { + return toAjax(bookInfoService.insertBookInfo(bookInfo)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:info:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody BookInfo bookInfo) + { + return toAjax(bookInfoService.updateBookInfo(bookInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:info:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(bookInfoService.deleteBookInfoByIds(ids)); + } +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/BookInfo.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/BookInfo.java new file mode 100644 index 0000000..9988401 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/domain/BookInfo.java @@ -0,0 +1,128 @@ +package com.muyu.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 book_info + * + * @author muyu + * @date 2024-02-22 + */ +public class BookInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private Long id; + + /** 名称 */ + @Excel(name = "名称") + private String title; + + /** 作者 */ + @Excel(name = "作者") + private String author; + + /** 类型 */ + @Excel(name = "类型") + private String type; + + /** 图片 */ + @Excel(name = "图片") + private String images; + + /** 描述消息 */ + @Excel(name = "描述消息") + private String content; + + /** 上架时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date shelfTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + public void setAuthor(String author) + { + this.author = author; + } + + public String getAuthor() + { + return author; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + public void setShelfTime(Date shelfTime) + { + this.shelfTime = shelfTime; + } + + public Date getShelfTime() + { + return shelfTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("author", getAuthor()) + .append("type", getType()) + .append("images", getImages()) + .append("content", getContent()) + .append("shelfTime", getShelfTime()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/BookInfoMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/BookInfoMapper.java new file mode 100644 index 0000000..af31ee3 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/BookInfoMapper.java @@ -0,0 +1,61 @@ +package com.muyu.system.mapper; + +import java.util.List; +import com.muyu.system.domain.BookInfo; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author muyu + * @date 2024-02-22 + */ +public interface BookInfoMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BookInfo selectBookInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param bookInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBookInfoList(BookInfo bookInfo); + + /** + * 新增【请填写功能名称】 + * + * @param bookInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertBookInfo(BookInfo bookInfo); + + /** + * 修改【请填写功能名称】 + * + * @param bookInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateBookInfo(BookInfo bookInfo); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBookInfoById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBookInfoByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/IBookInfoService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/IBookInfoService.java new file mode 100644 index 0000000..fe51776 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/IBookInfoService.java @@ -0,0 +1,61 @@ +package com.muyu.system.service; + +import java.util.List; +import com.muyu.system.domain.BookInfo; + +/** + * 【请填写功能名称】Service接口 + * + * @author muyu + * @date 2024-02-22 + */ +public interface IBookInfoService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public BookInfo selectBookInfoById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param bookInfo 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectBookInfoList(BookInfo bookInfo); + + /** + * 新增【请填写功能名称】 + * + * @param bookInfo 【请填写功能名称】 + * @return 结果 + */ + public int insertBookInfo(BookInfo bookInfo); + + /** + * 修改【请填写功能名称】 + * + * @param bookInfo 【请填写功能名称】 + * @return 结果 + */ + public int updateBookInfo(BookInfo bookInfo); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteBookInfoByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteBookInfoById(Long id); +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/BookInfoServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/BookInfoServiceImpl.java new file mode 100644 index 0000000..1927d76 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/BookInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.system.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.system.mapper.BookInfoMapper; +import com.muyu.system.domain.BookInfo; +import com.muyu.system.service.IBookInfoService; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author muyu + * @date 2024-02-22 + */ +@Service +public class BookInfoServiceImpl implements IBookInfoService +{ + @Autowired + private BookInfoMapper bookInfoMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public BookInfo selectBookInfoById(Long id) + { + return bookInfoMapper.selectBookInfoById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param bookInfo 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectBookInfoList(BookInfo bookInfo) + { + return bookInfoMapper.selectBookInfoList(bookInfo); + } + + /** + * 新增【请填写功能名称】 + * + * @param bookInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertBookInfo(BookInfo bookInfo) + { + bookInfo.setCreateTime(DateUtils.getNowDate()); + return bookInfoMapper.insertBookInfo(bookInfo); + } + + /** + * 修改【请填写功能名称】 + * + * @param bookInfo 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateBookInfo(BookInfo bookInfo) + { + bookInfo.setUpdateTime(DateUtils.getNowDate()); + return bookInfoMapper.updateBookInfo(bookInfo); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBookInfoByIds(Long[] ids) + { + return bookInfoMapper.deleteBookInfoByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteBookInfoById(Long id) + { + return bookInfoMapper.deleteBookInfoById(id); + } +} diff --git a/muyu-modules/muyu-system/src/main/resources/bootstrap.yml b/muyu-modules/muyu-system/src/main/resources/bootstrap.yml index a66fd4c..4f92bc2 100644 --- a/muyu-modules/muyu-system/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-system/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/muyu-modules/muyu-system/src/main/resources/mapper/system/BookInfoMapper.xml b/muyu-modules/muyu-system/src/main/resources/mapper/system/BookInfoMapper.xml new file mode 100644 index 0000000..c266a41 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/resources/mapper/system/BookInfoMapper.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + select id, title, author, type, images, content, shelf_time, create_time, create_by, update_by, update_time from book_info + + + + + + + + insert into book_info + + id, + title, + author, + type, + images, + content, + shelf_time, + create_time, + create_by, + update_by, + update_time, + + + #{id}, + #{title}, + #{author}, + #{type}, + #{images}, + #{content}, + #{shelfTime}, + #{createTime}, + #{createBy}, + #{updateBy}, + #{updateTime}, + + + + + update book_info + + title = #{title}, + author = #{author}, + type = #{type}, + images = #{images}, + content = #{content}, + shelf_time = #{shelfTime}, + create_time = #{createTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from book_info where id = #{id} + + + + delete from book_info where id in + + #{id} + + + diff --git a/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml b/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml index 1276c8e..5070b52 100644 --- a/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml +++ b/muyu-visual/muyu-monitor/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 111.229.102.61:8848 # 配置文件格式 file-extension: yml # 共享配置