diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuFeedMarketController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuFeedMarketController.java new file mode 100644 index 0000000..3308165 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuFeedMarketController.java @@ -0,0 +1,104 @@ +package com.chenhai.web.controller.muhu; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +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.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.muhu.domain.MuhuFeedMarket; +import com.chenhai.muhu.service.IMuhuFeedMarketService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 饲料市场Controller + * + * @author ruoyi + * @date 2026-01-06 + */ +@RestController +@RequestMapping("/muhu/feed") +public class MuhuFeedMarketController extends BaseController +{ + @Autowired + private IMuhuFeedMarketService muhuFeedMarketService; + + /** + * 查询饲料市场列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:feed:list') or @ss.hasRole('muhu')") + @GetMapping("/list") + public TableDataInfo list(MuhuFeedMarket muhuFeedMarket) + { + startPage(); + List list = muhuFeedMarketService.selectMuhuFeedMarketList(muhuFeedMarket); + return getDataTable(list); + } + + /** + * 导出饲料市场列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:feed:export') or @ss.hasRole('muhu')") + @Log(title = "饲料市场", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MuhuFeedMarket muhuFeedMarket) + { + List list = muhuFeedMarketService.selectMuhuFeedMarketList(muhuFeedMarket); + ExcelUtil util = new ExcelUtil(MuhuFeedMarket.class); + util.exportExcel(response, list, "饲料市场数据"); + } + + /** + * 获取饲料市场详细信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:feed:query') or @ss.hasRole('muhu')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(muhuFeedMarketService.selectMuhuFeedMarketById(id)); + } + + /** + * 新增饲料市场 + */ + @PreAuthorize("@ss.hasPermi('muhu:feed:add') or @ss.hasRole('muhu')") + @Log(title = "饲料市场", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MuhuFeedMarket muhuFeedMarket) + { + return toAjax(muhuFeedMarketService.insertMuhuFeedMarket(muhuFeedMarket)); + } + + /** + * 修改饲料市场 + */ + @PreAuthorize("@ss.hasPermi('muhu:feed:edit') or @ss.hasRole('muhu')") + @Log(title = "饲料市场", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MuhuFeedMarket muhuFeedMarket) + { + return toAjax(muhuFeedMarketService.updateMuhuFeedMarket(muhuFeedMarket)); + } + + /** + * 删除饲料市场 + */ + @PreAuthorize("@ss.hasPermi('muhu:feed:remove') or @ss.hasRole('muhu')") + @Log(title = "饲料市场", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(muhuFeedMarketService.deleteMuhuFeedMarketByIds(ids)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketInfoController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketInfoController.java deleted file mode 100644 index 4dda58e..0000000 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketInfoController.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.chenhai.web.controller.muhu; - -import java.util.List; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -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.chenhai.common.annotation.Log; -import com.chenhai.common.core.controller.BaseController; -import com.chenhai.common.core.domain.AjaxResult; -import com.chenhai.common.enums.BusinessType; -import com.chenhai.muhu.domain.MuhuMarketInfo; -import com.chenhai.muhu.service.IMuhuMarketInfoService; -import com.chenhai.common.utils.poi.ExcelUtil; -import com.chenhai.common.core.page.TableDataInfo; - -/** - * 市场信息Controller - * - * @author ruoyi - * @date 2026-01-04 - */ -@RestController -@RequestMapping("/muhu/market") -public class MuhuMarketInfoController extends BaseController -{ - @Autowired - private IMuhuMarketInfoService muhuMarketInfoService; - - /** - * 查询市场信息列表 - */ - @PreAuthorize("@ss.hasPermi('muhu:market:list') or @ss.hasRole('muhu')") - @GetMapping("/list") - public TableDataInfo list(MuhuMarketInfo muhuMarketInfo) - { - startPage(); - List list = muhuMarketInfoService.selectMuhuMarketInfoList(muhuMarketInfo); - return getDataTable(list); - } - - /** - * 导出市场信息列表 - */ - @PreAuthorize("@ss.hasPermi('muhu:market:export') or @ss.hasRole('muhu')") - @Log(title = "市场信息", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, MuhuMarketInfo muhuMarketInfo) - { - List list = muhuMarketInfoService.selectMuhuMarketInfoList(muhuMarketInfo); - ExcelUtil util = new ExcelUtil(MuhuMarketInfo.class); - util.exportExcel(response, list, "市场信息数据"); - } - - /** - * 获取市场信息详细信息 - */ - @PreAuthorize("@ss.hasPermi('muhu:market:query') or @ss.hasRole('muhu')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(muhuMarketInfoService.selectMuhuMarketInfoById(id)); - } - - /** - * 新增市场信息 - */ - @PreAuthorize("@ss.hasPermi('muhu:market:add') or @ss.hasRole('muhu')") - @Log(title = "市场信息", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody MuhuMarketInfo muhuMarketInfo) - { - return toAjax(muhuMarketInfoService.insertMuhuMarketInfo(muhuMarketInfo)); - } - - /** - * 修改市场信息 - */ - @PreAuthorize("@ss.hasPermi('muhu:market:edit') or @ss.hasRole('muhu')") - @Log(title = "市场信息", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody MuhuMarketInfo muhuMarketInfo) - { - return toAjax(muhuMarketInfoService.updateMuhuMarketInfo(muhuMarketInfo)); - } - - /** - * 删除市场信息 - */ - @PreAuthorize("@ss.hasPermi('muhu:market:remove') or @ss.hasRole('muhu')") - @Log(title = "市场信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(muhuMarketInfoService.deleteMuhuMarketInfoByIds(ids)); - } -} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketTrendController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketTrendController.java new file mode 100644 index 0000000..8a260d8 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketTrendController.java @@ -0,0 +1,104 @@ +package com.chenhai.web.controller.muhu; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +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.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.muhu.domain.MuhuMarketTrend; +import com.chenhai.muhu.service.IMuhuMarketTrendService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 市场趋势Controller + * + * @author ruoyi + * @date 2026-01-06 + */ +@RestController +@RequestMapping("/muhu/trend") +public class MuhuMarketTrendController extends BaseController +{ + @Autowired + private IMuhuMarketTrendService muhuMarketTrendService; + + /** + * 查询市场趋势列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:trend:list') or @ss.hasRole('muhu')") + @GetMapping("/list") + public TableDataInfo list(MuhuMarketTrend muhuMarketTrend) + { + startPage(); + List list = muhuMarketTrendService.selectMuhuMarketTrendList(muhuMarketTrend); + return getDataTable(list); + } + + /** + * 导出市场趋势列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:trend:export') or @ss.hasRole('muhu')") + @Log(title = "市场趋势", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MuhuMarketTrend muhuMarketTrend) + { + List list = muhuMarketTrendService.selectMuhuMarketTrendList(muhuMarketTrend); + ExcelUtil util = new ExcelUtil(MuhuMarketTrend.class); + util.exportExcel(response, list, "市场趋势数据"); + } + + /** + * 获取市场趋势详细信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:trend:query') or @ss.hasRole('muhu')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(muhuMarketTrendService.selectMuhuMarketTrendById(id)); + } + + /** + * 新增市场趋势 + */ + @PreAuthorize("@ss.hasPermi('muhu:trend:add') or @ss.hasRole('muhu')") + @Log(title = "市场趋势", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MuhuMarketTrend muhuMarketTrend) + { + return toAjax(muhuMarketTrendService.insertMuhuMarketTrend(muhuMarketTrend)); + } + + /** + * 修改市场趋势 + */ + @PreAuthorize("@ss.hasPermi('muhu:trend:edit') or @ss.hasRole('muhu')") + @Log(title = "市场趋势", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MuhuMarketTrend muhuMarketTrend) + { + return toAjax(muhuMarketTrendService.updateMuhuMarketTrend(muhuMarketTrend)); + } + + /** + * 删除市场趋势 + */ + @PreAuthorize("@ss.hasPermi('muhu:trend:remove') or @ss.hasRole('muhu')") + @Log(title = "市场趋势", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(muhuMarketTrendService.deleteMuhuMarketTrendByIds(ids)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuSalesMarketController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuSalesMarketController.java new file mode 100644 index 0000000..4a50657 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuSalesMarketController.java @@ -0,0 +1,104 @@ +package com.chenhai.web.controller.muhu; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +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.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.muhu.domain.MuhuSalesMarket; +import com.chenhai.muhu.service.IMuhuSalesMarketService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 销售市场Controller + * + * @author ruoyi + * @date 2026-01-06 + */ +@RestController +@RequestMapping("/muhu/sales") +public class MuhuSalesMarketController extends BaseController +{ + @Autowired + private IMuhuSalesMarketService muhuSalesMarketService; + + /** + * 查询销售市场列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:sales:list') or @ss.hasRole('muhu')") + @GetMapping("/list") + public TableDataInfo list(MuhuSalesMarket muhuSalesMarket) + { + startPage(); + List list = muhuSalesMarketService.selectMuhuSalesMarketList(muhuSalesMarket); + return getDataTable(list); + } + + /** + * 导出销售市场列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:sales:export') or @ss.hasRole('muhu')") + @Log(title = "销售市场", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MuhuSalesMarket muhuSalesMarket) + { + List list = muhuSalesMarketService.selectMuhuSalesMarketList(muhuSalesMarket); + ExcelUtil util = new ExcelUtil(MuhuSalesMarket.class); + util.exportExcel(response, list, "销售市场数据"); + } + + /** + * 获取销售市场详细信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:sales:query') or @ss.hasRole('muhu')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(muhuSalesMarketService.selectMuhuSalesMarketById(id)); + } + + /** + * 新增销售市场 + */ + @PreAuthorize("@ss.hasPermi('muhu:sales:add') or @ss.hasRole('muhu')") + @Log(title = "销售市场", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MuhuSalesMarket muhuSalesMarket) + { + return toAjax(muhuSalesMarketService.insertMuhuSalesMarket(muhuSalesMarket)); + } + + /** + * 修改销售市场 + */ + @PreAuthorize("@ss.hasPermi('muhu:sales:edit') or @ss.hasRole('muhu')") + @Log(title = "销售市场", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MuhuSalesMarket muhuSalesMarket) + { + return toAjax(muhuSalesMarketService.updateMuhuSalesMarket(muhuSalesMarket)); + } + + /** + * 删除销售市场 + */ + @PreAuthorize("@ss.hasPermi('muhu:sales:remove') or @ss.hasRole('muhu')") + @Log(title = "销售市场", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(muhuSalesMarketService.deleteMuhuSalesMarketByIds(ids)); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuFeedMarket.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuFeedMarket.java new file mode 100644 index 0000000..ace7b97 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuFeedMarket.java @@ -0,0 +1,132 @@ +package com.chenhai.muhu.domain; + +import java.math.BigDecimal; +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.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 饲料市场对象 muhu_feed_market + * + * @author ruoyi + * @date 2026-01-06 + */ +public class MuhuFeedMarket extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 自增ID */ + private Long id; + + /** 饲料名称 */ + @Excel(name = "饲料名称") + private String feedName; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplier; + + /** 价格(元/公斤) */ + @Excel(name = "价格", readConverterExp = "元=/公斤") + private BigDecimal price; + + /** 单位 */ + @Excel(name = "单位") + private String unit; + + /** 更新日期(月-日) */ + @Excel(name = "更新日期", readConverterExp = "月=-日") + private Date updateDate; + + /** 记录创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setFeedName(String feedName) + { + this.feedName = feedName; + } + + public String getFeedName() + { + return feedName; + } + + public void setSupplier(String supplier) + { + this.supplier = supplier; + } + + public String getSupplier() + { + return supplier; + } + + public void setPrice(BigDecimal price) + { + this.price = price; + } + + public BigDecimal getPrice() + { + return price; + } + + public void setUpdateDate(Date updateDate) + { + this.updateDate = updateDate; + } + + public Date getUpdateDate() + { + return updateDate; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUnit(String unit) + { + this.unit = unit; + } + + public String getUnit() + { + return unit; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("feedName", getFeedName()) + .append("supplier", getSupplier()) + .append("price", getPrice()) + .append("updateTime", getUpdateTime()) + .append("updateDate", getUpdateDate()) + .append("createdAt", getCreatedAt()) + .append("unit", getUnit()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketInfo.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketInfo.java deleted file mode 100644 index a62768b..0000000 --- a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketInfo.java +++ /dev/null @@ -1,206 +0,0 @@ -package com.chenhai.muhu.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.chenhai.common.annotation.Excel; -import com.chenhai.common.core.domain.BaseEntity; - -/** - * 市场信息对象 muhu_market_info - * - * @author ruoyi - * @date 2026-01-04 - */ -public class MuhuMarketInfo extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 主键ID */ - private Long id; - - /** 信息标题 */ - @Excel(name = "信息标题") - private String title; - - /** 详细内容/报告正文 */ - @Excel(name = "详细内容/报告正文") - private String content; - - /** 信息类型:1-农牧产品销售;2-饲草料销售;3-畜产品市场价格;4-饲料供应商价格;5-市场趋势报告 */ - @Excel(name = "信息类型:1-农牧产品销售;2-饲草料销售;3-畜产品市场价格;4-饲料供应商价格;5-市场趋势报告") - private String infoType; - - /** 发布来源:1-管理员发布;2-系统关联(如关联管理端的市场动态) */ - @Excel(name = "发布来源:1-管理员发布;2-系统关联", readConverterExp = "如=关联管理端的市场动态") - private String publishSource; - - /** 地区/市场范围 */ - @Excel(name = "地区/市场范围") - private String region; - - /** 附件链接 */ - @Excel(name = "附件链接") - private String attachmentUrl; - - /** 查看次数 */ - @Excel(name = "查看次数") - private Long viewCount; - - /** 发布者ID */ - @Excel(name = "发布者ID") - private Long publishUserId; - - /** 是否置顶(0-否,1-是) */ - @Excel(name = "是否置顶", readConverterExp = "0=-否,1-是") - private String isTop; - - /** 状态(0-下架/隐藏,1-正常发布) */ - @Excel(name = "状态", readConverterExp = "0=-下架/隐藏,1-正常发布") - private String status; - - /** 发布时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date publishTime; - - 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 setContent(String content) - { - this.content = content; - } - - public String getContent() - { - return content; - } - - public void setInfoType(String infoType) - { - this.infoType = infoType; - } - - public String getInfoType() - { - return infoType; - } - - public void setPublishSource(String publishSource) - { - this.publishSource = publishSource; - } - - public String getPublishSource() - { - return publishSource; - } - - public void setRegion(String region) - { - this.region = region; - } - - public String getRegion() - { - return region; - } - - public void setAttachmentUrl(String attachmentUrl) - { - this.attachmentUrl = attachmentUrl; - } - - public String getAttachmentUrl() - { - return attachmentUrl; - } - - public void setViewCount(Long viewCount) - { - this.viewCount = viewCount; - } - - public Long getViewCount() - { - return viewCount; - } - - public void setPublishUserId(Long publishUserId) - { - this.publishUserId = publishUserId; - } - - public Long getPublishUserId() - { - return publishUserId; - } - - public void setIsTop(String isTop) - { - this.isTop = isTop; - } - - public String getIsTop() - { - return isTop; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getStatus() - { - return status; - } - - public void setPublishTime(Date publishTime) - { - this.publishTime = publishTime; - } - - public Date getPublishTime() - { - return publishTime; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("title", getTitle()) - .append("content", getContent()) - .append("infoType", getInfoType()) - .append("publishSource", getPublishSource()) - .append("region", getRegion()) - .append("attachmentUrl", getAttachmentUrl()) - .append("viewCount", getViewCount()) - .append("publishUserId", getPublishUserId()) - .append("isTop", getIsTop()) - .append("status", getStatus()) - .append("publishTime", getPublishTime()) - .append("updateTime", getUpdateTime()) - .toString(); - } -} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketTrend.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketTrend.java new file mode 100644 index 0000000..0485114 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketTrend.java @@ -0,0 +1,282 @@ +package com.chenhai.muhu.domain; + +import java.math.BigDecimal; +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.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 市场趋势对象 muhu_market_trend + * + * @author ruoyi + * @date 2026-01-06 + */ +public class MuhuMarketTrend extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 自增ID */ + private Long id; + + /** 标题 */ + @Excel(name = "标题") + private String title; + + /** 信息类型(report:报告, warning:预警) */ + @Excel(name = "信息类型", readConverterExp = "r=eport:报告,,w=arning:预警") + private String infoType; + + /** 报告类别/预警类型 */ + @Excel(name = "报告类别/预警类型") + private String category; + + /** 价格指数 */ + @Excel(name = "价格指数") + private BigDecimal priceIndex; + + /** 环比涨跌率(%) */ + @Excel(name = "环比涨跌率", readConverterExp = "%=") + private BigDecimal monthCompareRate; + + /** 同比涨跌率(%) */ + @Excel(name = "同比涨跌率", readConverterExp = "%=") + private BigDecimal yearCompareRate; + + /** 报告期间 */ + @Excel(name = "报告期间") + private String reportDate; + + /** 影响区域 */ + @Excel(name = "影响区域") + private String region; + + /** 严重程度 */ + @Excel(name = "严重程度") + private String severity; + + /** 预期影响 */ + @Excel(name = "预期影响") + private String expectedImpact; + + /** 建议措施 */ + @Excel(name = "建议措施") + private String advice; + + /** 信息来源 */ + @Excel(name = "信息来源") + private String source; + + /** 发布日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发布日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date publishDate; + + /** 详细内容/预测内容 */ + @Excel(name = "详细内容/预测内容") + private String content; + + /** 标签(热点、关注等) */ + @Excel(name = "标签", readConverterExp = "热=点、关注等") + private String tags; + + /** 记录创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + 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 setInfoType(String infoType) + { + this.infoType = infoType; + } + + public String getInfoType() + { + return infoType; + } + + public void setCategory(String category) + { + this.category = category; + } + + public String getCategory() + { + return category; + } + + public void setPriceIndex(BigDecimal priceIndex) + { + this.priceIndex = priceIndex; + } + + public BigDecimal getPriceIndex() + { + return priceIndex; + } + + public void setMonthCompareRate(BigDecimal monthCompareRate) + { + this.monthCompareRate = monthCompareRate; + } + + public BigDecimal getMonthCompareRate() + { + return monthCompareRate; + } + + public void setYearCompareRate(BigDecimal yearCompareRate) + { + this.yearCompareRate = yearCompareRate; + } + + public BigDecimal getYearCompareRate() + { + return yearCompareRate; + } + + public void setReportDate(String reportDate) + { + this.reportDate = reportDate; + } + + public String getReportDate() + { + return reportDate; + } + + public void setRegion(String region) + { + this.region = region; + } + + public String getRegion() + { + return region; + } + + public void setSeverity(String severity) + { + this.severity = severity; + } + + public String getSeverity() + { + return severity; + } + + public void setExpectedImpact(String expectedImpact) + { + this.expectedImpact = expectedImpact; + } + + public String getExpectedImpact() + { + return expectedImpact; + } + + public void setAdvice(String advice) + { + this.advice = advice; + } + + public String getAdvice() + { + return advice; + } + + public void setSource(String source) + { + this.source = source; + } + + public String getSource() + { + return source; + } + + public void setPublishDate(Date publishDate) + { + this.publishDate = publishDate; + } + + public Date getPublishDate() + { + return publishDate; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setTags(String tags) + { + this.tags = tags; + } + + public String getTags() + { + return tags; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("infoType", getInfoType()) + .append("category", getCategory()) + .append("priceIndex", getPriceIndex()) + .append("monthCompareRate", getMonthCompareRate()) + .append("yearCompareRate", getYearCompareRate()) + .append("reportDate", getReportDate()) + .append("region", getRegion()) + .append("severity", getSeverity()) + .append("expectedImpact", getExpectedImpact()) + .append("advice", getAdvice()) + .append("source", getSource()) + .append("publishDate", getPublishDate()) + .append("content", getContent()) + .append("tags", getTags()) + .append("createdAt", getCreatedAt()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuSalesMarket.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuSalesMarket.java new file mode 100644 index 0000000..e8a49da --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuSalesMarket.java @@ -0,0 +1,238 @@ +package com.chenhai.muhu.domain; + +import java.math.BigDecimal; +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.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 销售市场对象 muhu_sales_market + * + * @author ruoyi + * @date 2026-01-06 + */ +public class MuhuSalesMarket extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 产品名称(如:优质肉牛、绵羊等) */ + @Excel(name = "产品名称", readConverterExp = "如=:优质肉牛、绵羊等") + private String productName; + + /** 产品类型(牛、羊、牛奶等) */ + @Excel(name = "产品类型", readConverterExp = "牛=、羊、牛奶等") + private String productType; + + /** 当前价格 */ + @Excel(name = "当前价格") + private BigDecimal price; + + /** 价格单位 */ + @Excel(name = "价格单位") + private String unit; + + /** 价格变化百分比(+为涨,-为跌) */ + @Excel(name = "价格变化百分比", readConverterExp = "+=为涨,-为跌") + private BigDecimal priceChange; + + /** 市场名称 */ + @Excel(name = "市场名称") + private String marketName; + + /** 省份 */ + @Excel(name = "省份") + private String regionProvince; + + /** 城市 */ + @Excel(name = "城市") + private String regionCity; + + /** 详细地区 */ + @Excel(name = "详细地区") + private String regionDetail; + + /** 价格时间(如:16:00) */ + @Excel(name = "价格时间", readConverterExp = "如=:16:00") + private Date priceTime; + + /** 价格日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "价格日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date priceDate; + + /** 数据来源 */ + @Excel(name = "数据来源") + private String dataSource; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setProductName(String productName) + { + this.productName = productName; + } + + public String getProductName() + { + return productName; + } + + public void setProductType(String productType) + { + this.productType = productType; + } + + public String getProductType() + { + return productType; + } + + public void setPrice(BigDecimal price) + { + this.price = price; + } + + public BigDecimal getPrice() + { + return price; + } + + public void setUnit(String unit) + { + this.unit = unit; + } + + public String getUnit() + { + return unit; + } + + public void setPriceChange(BigDecimal priceChange) + { + this.priceChange = priceChange; + } + + public BigDecimal getPriceChange() + { + return priceChange; + } + + public void setMarketName(String marketName) + { + this.marketName = marketName; + } + + public String getMarketName() + { + return marketName; + } + + public void setRegionProvince(String regionProvince) + { + this.regionProvince = regionProvince; + } + + public String getRegionProvince() + { + return regionProvince; + } + + public void setRegionCity(String regionCity) + { + this.regionCity = regionCity; + } + + public String getRegionCity() + { + return regionCity; + } + + public void setRegionDetail(String regionDetail) + { + this.regionDetail = regionDetail; + } + + public String getRegionDetail() + { + return regionDetail; + } + + public void setPriceTime(Date priceTime) + { + this.priceTime = priceTime; + } + + public Date getPriceTime() + { + return priceTime; + } + + public void setPriceDate(Date priceDate) + { + this.priceDate = priceDate; + } + + public Date getPriceDate() + { + return priceDate; + } + + public void setDataSource(String dataSource) + { + this.dataSource = dataSource; + } + + public String getDataSource() + { + return dataSource; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productName", getProductName()) + .append("productType", getProductType()) + .append("price", getPrice()) + .append("unit", getUnit()) + .append("priceChange", getPriceChange()) + .append("marketName", getMarketName()) + .append("regionProvince", getRegionProvince()) + .append("regionCity", getRegionCity()) + .append("regionDetail", getRegionDetail()) + .append("priceTime", getPriceTime()) + .append("priceDate", getPriceDate()) + .append("updateTime", getUpdateTime()) + .append("dataSource", getDataSource()) + .append("status", getStatus()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuFeedMarketMapper.java b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuFeedMarketMapper.java new file mode 100644 index 0000000..80cde1f --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuFeedMarketMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.mapper; + +import java.util.List; +import com.chenhai.muhu.domain.MuhuFeedMarket; + +/** + * 饲料市场Mapper接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface MuhuFeedMarketMapper +{ + /** + * 查询饲料市场 + * + * @param id 饲料市场主键 + * @return 饲料市场 + */ + public MuhuFeedMarket selectMuhuFeedMarketById(Long id); + + /** + * 查询饲料市场列表 + * + * @param muhuFeedMarket 饲料市场 + * @return 饲料市场集合 + */ + public List selectMuhuFeedMarketList(MuhuFeedMarket muhuFeedMarket); + + /** + * 新增饲料市场 + * + * @param muhuFeedMarket 饲料市场 + * @return 结果 + */ + public int insertMuhuFeedMarket(MuhuFeedMarket muhuFeedMarket); + + /** + * 修改饲料市场 + * + * @param muhuFeedMarket 饲料市场 + * @return 结果 + */ + public int updateMuhuFeedMarket(MuhuFeedMarket muhuFeedMarket); + + /** + * 删除饲料市场 + * + * @param id 饲料市场主键 + * @return 结果 + */ + public int deleteMuhuFeedMarketById(Long id); + + /** + * 批量删除饲料市场 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMuhuFeedMarketByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketInfoMapper.java b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketInfoMapper.java deleted file mode 100644 index 8551996..0000000 --- a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketInfoMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.chenhai.muhu.mapper; - -import java.util.List; -import com.chenhai.muhu.domain.MuhuMarketInfo; - -/** - * 市场信息Mapper接口 - * - * @author ruoyi - * @date 2026-01-04 - */ -public interface MuhuMarketInfoMapper -{ - /** - * 查询市场信息 - * - * @param id 市场信息主键 - * @return 市场信息 - */ - public MuhuMarketInfo selectMuhuMarketInfoById(Long id); - - /** - * 查询市场信息列表 - * - * @param muhuMarketInfo 市场信息 - * @return 市场信息集合 - */ - public List selectMuhuMarketInfoList(MuhuMarketInfo muhuMarketInfo); - - /** - * 新增市场信息 - * - * @param muhuMarketInfo 市场信息 - * @return 结果 - */ - public int insertMuhuMarketInfo(MuhuMarketInfo muhuMarketInfo); - - /** - * 修改市场信息 - * - * @param muhuMarketInfo 市场信息 - * @return 结果 - */ - public int updateMuhuMarketInfo(MuhuMarketInfo muhuMarketInfo); - - /** - * 删除市场信息 - * - * @param id 市场信息主键 - * @return 结果 - */ - public int deleteMuhuMarketInfoById(Long id); - - /** - * 批量删除市场信息 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteMuhuMarketInfoByIds(Long[] ids); -} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketTrendMapper.java b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketTrendMapper.java new file mode 100644 index 0000000..432de81 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketTrendMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.mapper; + +import java.util.List; +import com.chenhai.muhu.domain.MuhuMarketTrend; + +/** + * 市场趋势Mapper接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface MuhuMarketTrendMapper +{ + /** + * 查询市场趋势 + * + * @param id 市场趋势主键 + * @return 市场趋势 + */ + public MuhuMarketTrend selectMuhuMarketTrendById(Long id); + + /** + * 查询市场趋势列表 + * + * @param muhuMarketTrend 市场趋势 + * @return 市场趋势集合 + */ + public List selectMuhuMarketTrendList(MuhuMarketTrend muhuMarketTrend); + + /** + * 新增市场趋势 + * + * @param muhuMarketTrend 市场趋势 + * @return 结果 + */ + public int insertMuhuMarketTrend(MuhuMarketTrend muhuMarketTrend); + + /** + * 修改市场趋势 + * + * @param muhuMarketTrend 市场趋势 + * @return 结果 + */ + public int updateMuhuMarketTrend(MuhuMarketTrend muhuMarketTrend); + + /** + * 删除市场趋势 + * + * @param id 市场趋势主键 + * @return 结果 + */ + public int deleteMuhuMarketTrendById(Long id); + + /** + * 批量删除市场趋势 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMuhuMarketTrendByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuSalesMarketMapper.java b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuSalesMarketMapper.java new file mode 100644 index 0000000..649ea12 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuSalesMarketMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.mapper; + +import java.util.List; +import com.chenhai.muhu.domain.MuhuSalesMarket; + +/** + * 销售市场Mapper接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface MuhuSalesMarketMapper +{ + /** + * 查询销售市场 + * + * @param id 销售市场主键 + * @return 销售市场 + */ + public MuhuSalesMarket selectMuhuSalesMarketById(Long id); + + /** + * 查询销售市场列表 + * + * @param muhuSalesMarket 销售市场 + * @return 销售市场集合 + */ + public List selectMuhuSalesMarketList(MuhuSalesMarket muhuSalesMarket); + + /** + * 新增销售市场 + * + * @param muhuSalesMarket 销售市场 + * @return 结果 + */ + public int insertMuhuSalesMarket(MuhuSalesMarket muhuSalesMarket); + + /** + * 修改销售市场 + * + * @param muhuSalesMarket 销售市场 + * @return 结果 + */ + public int updateMuhuSalesMarket(MuhuSalesMarket muhuSalesMarket); + + /** + * 删除销售市场 + * + * @param id 销售市场主键 + * @return 结果 + */ + public int deleteMuhuSalesMarketById(Long id); + + /** + * 批量删除销售市场 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMuhuSalesMarketByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuFeedMarketService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuFeedMarketService.java new file mode 100644 index 0000000..b2ddafa --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuFeedMarketService.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.service; + +import java.util.List; +import com.chenhai.muhu.domain.MuhuFeedMarket; + +/** + * 饲料市场Service接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface IMuhuFeedMarketService +{ + /** + * 查询饲料市场 + * + * @param id 饲料市场主键 + * @return 饲料市场 + */ + public MuhuFeedMarket selectMuhuFeedMarketById(Long id); + + /** + * 查询饲料市场列表 + * + * @param muhuFeedMarket 饲料市场 + * @return 饲料市场集合 + */ + public List selectMuhuFeedMarketList(MuhuFeedMarket muhuFeedMarket); + + /** + * 新增饲料市场 + * + * @param muhuFeedMarket 饲料市场 + * @return 结果 + */ + public int insertMuhuFeedMarket(MuhuFeedMarket muhuFeedMarket); + + /** + * 修改饲料市场 + * + * @param muhuFeedMarket 饲料市场 + * @return 结果 + */ + public int updateMuhuFeedMarket(MuhuFeedMarket muhuFeedMarket); + + /** + * 批量删除饲料市场 + * + * @param ids 需要删除的饲料市场主键集合 + * @return 结果 + */ + public int deleteMuhuFeedMarketByIds(Long[] ids); + + /** + * 删除饲料市场信息 + * + * @param id 饲料市场主键 + * @return 结果 + */ + public int deleteMuhuFeedMarketById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java deleted file mode 100644 index f73d562..0000000 --- a/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.chenhai.muhu.service; - -import java.util.List; -import com.chenhai.muhu.domain.MuhuMarketInfo; - -/** - * 市场信息Service接口 - * - * @author ruoyi - * @date 2026-01-04 - */ -public interface IMuhuMarketInfoService -{ - /** - * 查询市场信息 - * - * @param id 市场信息主键 - * @return 市场信息 - */ - public MuhuMarketInfo selectMuhuMarketInfoById(Long id); - - /** - * 查询市场信息列表 - * - * @param muhuMarketInfo 市场信息 - * @return 市场信息集合 - */ - public List selectMuhuMarketInfoList(MuhuMarketInfo muhuMarketInfo); - - /** - * 新增市场信息 - * - * @param muhuMarketInfo 市场信息 - * @return 结果 - */ - public int insertMuhuMarketInfo(MuhuMarketInfo muhuMarketInfo); - - /** - * 修改市场信息 - * - * @param muhuMarketInfo 市场信息 - * @return 结果 - */ - public int updateMuhuMarketInfo(MuhuMarketInfo muhuMarketInfo); - - /** - * 批量删除市场信息 - * - * @param ids 需要删除的市场信息主键集合 - * @return 结果 - */ - public int deleteMuhuMarketInfoByIds(Long[] ids); - - /** - * 删除市场信息信息 - * - * @param id 市场信息主键 - * @return 结果 - */ - public int deleteMuhuMarketInfoById(Long id); -} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketTrendService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketTrendService.java new file mode 100644 index 0000000..1fe4371 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketTrendService.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.service; + +import java.util.List; +import com.chenhai.muhu.domain.MuhuMarketTrend; + +/** + * 市场趋势Service接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface IMuhuMarketTrendService +{ + /** + * 查询市场趋势 + * + * @param id 市场趋势主键 + * @return 市场趋势 + */ + public MuhuMarketTrend selectMuhuMarketTrendById(Long id); + + /** + * 查询市场趋势列表 + * + * @param muhuMarketTrend 市场趋势 + * @return 市场趋势集合 + */ + public List selectMuhuMarketTrendList(MuhuMarketTrend muhuMarketTrend); + + /** + * 新增市场趋势 + * + * @param muhuMarketTrend 市场趋势 + * @return 结果 + */ + public int insertMuhuMarketTrend(MuhuMarketTrend muhuMarketTrend); + + /** + * 修改市场趋势 + * + * @param muhuMarketTrend 市场趋势 + * @return 结果 + */ + public int updateMuhuMarketTrend(MuhuMarketTrend muhuMarketTrend); + + /** + * 批量删除市场趋势 + * + * @param ids 需要删除的市场趋势主键集合 + * @return 结果 + */ + public int deleteMuhuMarketTrendByIds(Long[] ids); + + /** + * 删除市场趋势信息 + * + * @param id 市场趋势主键 + * @return 结果 + */ + public int deleteMuhuMarketTrendById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuSalesMarketService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuSalesMarketService.java new file mode 100644 index 0000000..62a8362 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuSalesMarketService.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.service; + +import java.util.List; +import com.chenhai.muhu.domain.MuhuSalesMarket; + +/** + * 销售市场Service接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface IMuhuSalesMarketService +{ + /** + * 查询销售市场 + * + * @param id 销售市场主键 + * @return 销售市场 + */ + public MuhuSalesMarket selectMuhuSalesMarketById(Long id); + + /** + * 查询销售市场列表 + * + * @param muhuSalesMarket 销售市场 + * @return 销售市场集合 + */ + public List selectMuhuSalesMarketList(MuhuSalesMarket muhuSalesMarket); + + /** + * 新增销售市场 + * + * @param muhuSalesMarket 销售市场 + * @return 结果 + */ + public int insertMuhuSalesMarket(MuhuSalesMarket muhuSalesMarket); + + /** + * 修改销售市场 + * + * @param muhuSalesMarket 销售市场 + * @return 结果 + */ + public int updateMuhuSalesMarket(MuhuSalesMarket muhuSalesMarket); + + /** + * 批量删除销售市场 + * + * @param ids 需要删除的销售市场主键集合 + * @return 结果 + */ + public int deleteMuhuSalesMarketByIds(Long[] ids); + + /** + * 删除销售市场信息 + * + * @param id 销售市场主键 + * @return 结果 + */ + public int deleteMuhuSalesMarketById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuFeedMarketServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuFeedMarketServiceImpl.java new file mode 100644 index 0000000..d04eabd --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuFeedMarketServiceImpl.java @@ -0,0 +1,95 @@ +package com.chenhai.muhu.service.impl; + +import java.util.List; +import com.chenhai.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.muhu.mapper.MuhuFeedMarketMapper; +import com.chenhai.muhu.domain.MuhuFeedMarket; +import com.chenhai.muhu.service.IMuhuFeedMarketService; + +/** + * 饲料市场Service业务层处理 + * + * @author ruoyi + * @date 2026-01-06 + */ +@Service +public class MuhuFeedMarketServiceImpl implements IMuhuFeedMarketService +{ + @Autowired + private MuhuFeedMarketMapper muhuFeedMarketMapper; + + /** + * 查询饲料市场 + * + * @param id 饲料市场主键 + * @return 饲料市场 + */ + @Override + public MuhuFeedMarket selectMuhuFeedMarketById(Long id) + { + return muhuFeedMarketMapper.selectMuhuFeedMarketById(id); + } + + /** + * 查询饲料市场列表 + * + * @param muhuFeedMarket 饲料市场 + * @return 饲料市场 + */ + @Override + public List selectMuhuFeedMarketList(MuhuFeedMarket muhuFeedMarket) + { + return muhuFeedMarketMapper.selectMuhuFeedMarketList(muhuFeedMarket); + } + + /** + * 新增饲料市场 + * + * @param muhuFeedMarket 饲料市场 + * @return 结果 + */ + @Override + public int insertMuhuFeedMarket(MuhuFeedMarket muhuFeedMarket) + { + return muhuFeedMarketMapper.insertMuhuFeedMarket(muhuFeedMarket); + } + + /** + * 修改饲料市场 + * + * @param muhuFeedMarket 饲料市场 + * @return 结果 + */ + @Override + public int updateMuhuFeedMarket(MuhuFeedMarket muhuFeedMarket) + { + muhuFeedMarket.setUpdateTime(DateUtils.getNowDate()); + return muhuFeedMarketMapper.updateMuhuFeedMarket(muhuFeedMarket); + } + + /** + * 批量删除饲料市场 + * + * @param ids 需要删除的饲料市场主键 + * @return 结果 + */ + @Override + public int deleteMuhuFeedMarketByIds(Long[] ids) + { + return muhuFeedMarketMapper.deleteMuhuFeedMarketByIds(ids); + } + + /** + * 删除饲料市场信息 + * + * @param id 饲料市场主键 + * @return 结果 + */ + @Override + public int deleteMuhuFeedMarketById(Long id) + { + return muhuFeedMarketMapper.deleteMuhuFeedMarketById(id); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.java deleted file mode 100644 index 5f31536..0000000 --- a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.chenhai.muhu.service.impl; - -import java.util.List; -import com.chenhai.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.chenhai.muhu.mapper.MuhuMarketInfoMapper; -import com.chenhai.muhu.domain.MuhuMarketInfo; -import com.chenhai.muhu.service.IMuhuMarketInfoService; - -/** - * 市场信息Service业务层处理 - * - * @author ruoyi - * @date 2026-01-04 - */ -@Service -public class MuhuMarketInfoServiceImpl implements IMuhuMarketInfoService -{ - @Autowired - private MuhuMarketInfoMapper muhuMarketInfoMapper; - - /** - * 查询市场信息 - * - * @param id 市场信息主键 - * @return 市场信息 - */ - @Override - public MuhuMarketInfo selectMuhuMarketInfoById(Long id) - { - return muhuMarketInfoMapper.selectMuhuMarketInfoById(id); - } - - /** - * 查询市场信息列表 - * - * @param muhuMarketInfo 市场信息 - * @return 市场信息 - */ - @Override - public List selectMuhuMarketInfoList(MuhuMarketInfo muhuMarketInfo) - { - return muhuMarketInfoMapper.selectMuhuMarketInfoList(muhuMarketInfo); - } - - /** - * 新增市场信息 - * - * @param muhuMarketInfo 市场信息 - * @return 结果 - */ - @Override - public int insertMuhuMarketInfo(MuhuMarketInfo muhuMarketInfo) - { - return muhuMarketInfoMapper.insertMuhuMarketInfo(muhuMarketInfo); - } - - /** - * 修改市场信息 - * - * @param muhuMarketInfo 市场信息 - * @return 结果 - */ - @Override - public int updateMuhuMarketInfo(MuhuMarketInfo muhuMarketInfo) - { - muhuMarketInfo.setUpdateTime(DateUtils.getNowDate()); - return muhuMarketInfoMapper.updateMuhuMarketInfo(muhuMarketInfo); - } - - /** - * 批量删除市场信息 - * - * @param ids 需要删除的市场信息主键 - * @return 结果 - */ - @Override - public int deleteMuhuMarketInfoByIds(Long[] ids) - { - return muhuMarketInfoMapper.deleteMuhuMarketInfoByIds(ids); - } - - /** - * 删除市场信息信息 - * - * @param id 市场信息主键 - * @return 结果 - */ - @Override - public int deleteMuhuMarketInfoById(Long id) - { - return muhuMarketInfoMapper.deleteMuhuMarketInfoById(id); - } -} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketTrendServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketTrendServiceImpl.java new file mode 100644 index 0000000..b486be7 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketTrendServiceImpl.java @@ -0,0 +1,93 @@ +package com.chenhai.muhu.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.muhu.mapper.MuhuMarketTrendMapper; +import com.chenhai.muhu.domain.MuhuMarketTrend; +import com.chenhai.muhu.service.IMuhuMarketTrendService; + +/** + * 市场趋势Service业务层处理 + * + * @author ruoyi + * @date 2026-01-06 + */ +@Service +public class MuhuMarketTrendServiceImpl implements IMuhuMarketTrendService +{ + @Autowired + private MuhuMarketTrendMapper muhuMarketTrendMapper; + + /** + * 查询市场趋势 + * + * @param id 市场趋势主键 + * @return 市场趋势 + */ + @Override + public MuhuMarketTrend selectMuhuMarketTrendById(Long id) + { + return muhuMarketTrendMapper.selectMuhuMarketTrendById(id); + } + + /** + * 查询市场趋势列表 + * + * @param muhuMarketTrend 市场趋势 + * @return 市场趋势 + */ + @Override + public List selectMuhuMarketTrendList(MuhuMarketTrend muhuMarketTrend) + { + return muhuMarketTrendMapper.selectMuhuMarketTrendList(muhuMarketTrend); + } + + /** + * 新增市场趋势 + * + * @param muhuMarketTrend 市场趋势 + * @return 结果 + */ + @Override + public int insertMuhuMarketTrend(MuhuMarketTrend muhuMarketTrend) + { + return muhuMarketTrendMapper.insertMuhuMarketTrend(muhuMarketTrend); + } + + /** + * 修改市场趋势 + * + * @param muhuMarketTrend 市场趋势 + * @return 结果 + */ + @Override + public int updateMuhuMarketTrend(MuhuMarketTrend muhuMarketTrend) + { + return muhuMarketTrendMapper.updateMuhuMarketTrend(muhuMarketTrend); + } + + /** + * 批量删除市场趋势 + * + * @param ids 需要删除的市场趋势主键 + * @return 结果 + */ + @Override + public int deleteMuhuMarketTrendByIds(Long[] ids) + { + return muhuMarketTrendMapper.deleteMuhuMarketTrendByIds(ids); + } + + /** + * 删除市场趋势信息 + * + * @param id 市场趋势主键 + * @return 结果 + */ + @Override + public int deleteMuhuMarketTrendById(Long id) + { + return muhuMarketTrendMapper.deleteMuhuMarketTrendById(id); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuSalesMarketServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuSalesMarketServiceImpl.java new file mode 100644 index 0000000..5a57ad4 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuSalesMarketServiceImpl.java @@ -0,0 +1,95 @@ +package com.chenhai.muhu.service.impl; + +import java.util.List; +import com.chenhai.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.muhu.mapper.MuhuSalesMarketMapper; +import com.chenhai.muhu.domain.MuhuSalesMarket; +import com.chenhai.muhu.service.IMuhuSalesMarketService; + +/** + * 销售市场Service业务层处理 + * + * @author ruoyi + * @date 2026-01-06 + */ +@Service +public class MuhuSalesMarketServiceImpl implements IMuhuSalesMarketService +{ + @Autowired + private MuhuSalesMarketMapper muhuSalesMarketMapper; + + /** + * 查询销售市场 + * + * @param id 销售市场主键 + * @return 销售市场 + */ + @Override + public MuhuSalesMarket selectMuhuSalesMarketById(Long id) + { + return muhuSalesMarketMapper.selectMuhuSalesMarketById(id); + } + + /** + * 查询销售市场列表 + * + * @param muhuSalesMarket 销售市场 + * @return 销售市场 + */ + @Override + public List selectMuhuSalesMarketList(MuhuSalesMarket muhuSalesMarket) + { + return muhuSalesMarketMapper.selectMuhuSalesMarketList(muhuSalesMarket); + } + + /** + * 新增销售市场 + * + * @param muhuSalesMarket 销售市场 + * @return 结果 + */ + @Override + public int insertMuhuSalesMarket(MuhuSalesMarket muhuSalesMarket) + { + return muhuSalesMarketMapper.insertMuhuSalesMarket(muhuSalesMarket); + } + + /** + * 修改销售市场 + * + * @param muhuSalesMarket 销售市场 + * @return 结果 + */ + @Override + public int updateMuhuSalesMarket(MuhuSalesMarket muhuSalesMarket) + { + muhuSalesMarket.setUpdateTime(DateUtils.getNowDate()); + return muhuSalesMarketMapper.updateMuhuSalesMarket(muhuSalesMarket); + } + + /** + * 批量删除销售市场 + * + * @param ids 需要删除的销售市场主键 + * @return 结果 + */ + @Override + public int deleteMuhuSalesMarketByIds(Long[] ids) + { + return muhuSalesMarketMapper.deleteMuhuSalesMarketByIds(ids); + } + + /** + * 删除销售市场信息 + * + * @param id 销售市场主键 + * @return 结果 + */ + @Override + public int deleteMuhuSalesMarketById(Long id) + { + return muhuSalesMarketMapper.deleteMuhuSalesMarketById(id); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java b/chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java deleted file mode 100644 index ea36dd1..0000000 --- a/chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java +++ /dev/null @@ -1,230 +0,0 @@ -package com.chenhai.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.chenhai.common.annotation.Excel; -import com.chenhai.common.core.domain.BaseEntity; - -/** - * 知识库管理对象 knowledge_base - */ -public class KnowledgeBase extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 知识ID */ - private Long id; - - /** 知识标题 */ - @Excel(name = "知识标题") - private String title; - - /** 知识类别 */ - @Excel(name = "知识类别") - private String category; - - /** 关键词,逗号分隔(用于搜索) */ - @Excel(name = "关键词") - private String keywords; - - /** 知识摘要 */ - @Excel(name = "知识摘要") - private String summary; - - /** 详细内容 */ - @Excel(name = "详细内容") - private String content; - - /** 适用物种,逗号分隔(如:鸡,鸭,猪,牛,羊) */ - @Excel(name = "适用物种") - private String applicableSpecies; - - /** 来源名称 */ - @Excel(name = "来源名称") - private String sourceName; - - /** 作者 */ - @Excel(name = "作者") - private String author; - - /** 状态(DRAFT草稿/PUBLISHED已发布/ARCHIVED已归档) */ - @Excel(name = "状态", readConverterExp = "D=RAFT草稿/PUBLISHED已发布/ARCHIVED已归档") - private String status; - - /** 是否推荐(0否 1是) */ - @Excel(name = "是否推荐", readConverterExp = "0=否,1=是") - private String isRecommended; - - /** 查看次数 */ - @Excel(name = "查看次数") - private Long viewCount; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date createdTime; - - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date updatedTime; - - /** 发布时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date publishTime; - - // 以下是BaseEntity可能已有的字段,如果BaseEntity没有则需要添加 - /** 创建者 */ - @Excel(name = "创建者") - private String createBy; - - /** 更新者 */ - @Excel(name = "更新者") - private String updateBy; - - // getter和setter方法 - 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 setCategory(String category) { - this.category = category; - } - public String getCategory() { - return category; - } - - public void setKeywords(String keywords) { - this.keywords = keywords; - } - public String getKeywords() { - return keywords; - } - - public void setSummary(String summary) { - this.summary = summary; - } - public String getSummary() { - return summary; - } - - public void setContent(String content) { - this.content = content; - } - public String getContent() { - return content; - } - - public void setApplicableSpecies(String applicableSpecies) { - this.applicableSpecies = applicableSpecies; - } - public String getApplicableSpecies() { - return applicableSpecies; - } - - public void setSourceName(String sourceName) { - this.sourceName = sourceName; - } - public String getSourceName() { - return sourceName; - } - - public void setAuthor(String author) { - this.author = author; - } - public String getAuthor() { - return author; - } - - public void setStatus(String status) { - this.status = status; - } - public String getStatus() { - return status; - } - - public void setIsRecommended(String isRecommended) { - this.isRecommended = isRecommended; - } - public String getIsRecommended() { - return isRecommended; - } - - public void setViewCount(Long viewCount) { - this.viewCount = viewCount; - } - public Long getViewCount() { - return viewCount; - } - - public void setCreatedTime(Date createdTime) { - this.createdTime = createdTime; - } - public Date getCreatedTime() { - return createdTime; - } - - public void setUpdatedTime(Date updatedTime) { - this.updatedTime = updatedTime; - } - public Date getUpdatedTime() { - return updatedTime; - } - - public void setPublishTime(Date publishTime) { - this.publishTime = publishTime; - } - public Date getPublishTime() { - return publishTime; - } - - public void setCreateBy(String createBy) { - this.createBy = createBy; - } - public String getCreateBy() { - return createBy; - } - - public void setUpdateBy(String updateBy) { - this.updateBy = updateBy; - } - public String getUpdateBy() { - return updateBy; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("title", getTitle()) - .append("category", getCategory()) - .append("keywords", getKeywords()) - .append("summary", getSummary()) - .append("content", getContent()) - .append("applicableSpecies", getApplicableSpecies()) - .append("sourceName", getSourceName()) - .append("author", getAuthor()) - .append("status", getStatus()) - .append("isRecommended", getIsRecommended()) - .append("viewCount", getViewCount()) - .append("createdTime", getCreatedTime()) - .append("updatedTime", getUpdatedTime()) - .append("publishTime", getPublishTime()) - .append("createBy", getCreateBy()) - .append("updateBy", getUpdateBy()) - .toString(); - } -} \ No newline at end of file diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java deleted file mode 100644 index e0e9294..0000000 --- a/chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.chenhai.system.mapper; - -import java.util.List; -import com.chenhai.system.domain.KnowledgeBase; - -/** - * 知识库管理Mapper接口 - * - * @author ruoyi - * @date 2025-12-30 - */ -public interface KnowledgeBaseMapper -{ - /** - * 查询知识库管理 - * - * @param id 知识库管理主键 - * @return 知识库管理 - */ - public KnowledgeBase selectKnowledgeBaseById(Long id); - - /** - * 查询知识库管理列表 - * - * @param knowledgeBase 知识库管理 - * @return 知识库管理集合 - */ - public List selectKnowledgeBaseList(KnowledgeBase knowledgeBase); - - /** - * 新增知识库管理 - * - * @param knowledgeBase 知识库管理 - * @return 结果 - */ - public int insertKnowledgeBase(KnowledgeBase knowledgeBase); - - /** - * 修改知识库管理 - * - * @param knowledgeBase 知识库管理 - * @return 结果 - */ - public int updateKnowledgeBase(KnowledgeBase knowledgeBase); - - /** - * 删除知识库管理 - * - * @param id 知识库管理主键 - * @return 结果 - */ - public int deleteKnowledgeBaseById(Long id); - - /** - * 批量删除知识库管理 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteKnowledgeBaseByIds(Long[] ids); -} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java b/chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java deleted file mode 100644 index 990a248..0000000 --- a/chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.chenhai.system.service; - -import java.util.List; -import com.chenhai.system.domain.KnowledgeBase; - -/** - * 知识库管理Service接口 - * - * @author ruoyi - * @date 2025-12-30 - */ -public interface IKnowledgeBaseService -{ - /** - * 查询知识库管理 - * - * @param id 知识库管理主键 - * @return 知识库管理 - */ - public KnowledgeBase selectKnowledgeBaseById(Long id); - - /** - * 查询知识库管理列表 - * - * @param knowledgeBase 知识库管理 - * @return 知识库管理集合 - */ - public List selectKnowledgeBaseList(KnowledgeBase knowledgeBase); - - /** - * 新增知识库管理 - * - * @param knowledgeBase 知识库管理 - * @return 结果 - */ - public int insertKnowledgeBase(KnowledgeBase knowledgeBase); - - /** - * 修改知识库管理 - * - * @param knowledgeBase 知识库管理 - * @return 结果 - */ - public int updateKnowledgeBase(KnowledgeBase knowledgeBase); - - /** - * 批量删除知识库管理 - * - * @param ids 需要删除的知识库管理主键集合 - * @return 结果 - */ - public int deleteKnowledgeBaseByIds(Long[] ids); - - /** - * 删除知识库管理信息 - * - * @param id 知识库管理主键 - * @return 结果 - */ - public int deleteKnowledgeBaseById(Long id); -} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java deleted file mode 100644 index efea76f..0000000 --- a/chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.chenhai.system.service.impl; - -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.chenhai.system.mapper.KnowledgeBaseMapper; -import com.chenhai.system.domain.KnowledgeBase; -import com.chenhai.system.service.IKnowledgeBaseService; - -/** - * 知识库管理Service业务层处理 - * - * @author ruoyi - * @date 2025-12-30 - */ -@Service -public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService -{ - @Autowired - private KnowledgeBaseMapper knowledgeBaseMapper; - - /** - * 查询知识库管理 - * - * @param id 知识库管理主键 - * @return 知识库管理 - */ - @Override - public KnowledgeBase selectKnowledgeBaseById(Long id) - { - return knowledgeBaseMapper.selectKnowledgeBaseById(id); - } - - /** - * 查询知识库管理列表 - * - * @param knowledgeBase 知识库管理 - * @return 知识库管理 - */ - @Override - public List selectKnowledgeBaseList(KnowledgeBase knowledgeBase) - { - return knowledgeBaseMapper.selectKnowledgeBaseList(knowledgeBase); - } - - /** - * 新增知识库管理 - * - * @param knowledgeBase 知识库管理 - * @return 结果 - */ - @Override - public int insertKnowledgeBase(KnowledgeBase knowledgeBase) - { - return knowledgeBaseMapper.insertKnowledgeBase(knowledgeBase); - } - - /** - * 修改知识库管理 - * - * @param knowledgeBase 知识库管理 - * @return 结果 - */ - @Override - public int updateKnowledgeBase(KnowledgeBase knowledgeBase) - { - return knowledgeBaseMapper.updateKnowledgeBase(knowledgeBase); - } - - /** - * 批量删除知识库管理 - * - * @param ids 需要删除的知识库管理主键 - * @return 结果 - */ - @Override - public int deleteKnowledgeBaseByIds(Long[] ids) - { - return knowledgeBaseMapper.deleteKnowledgeBaseByIds(ids); - } - - /** - * 删除知识库管理信息 - * - * @param id 知识库管理主键 - * @return 结果 - */ - @Override - public int deleteKnowledgeBaseById(Long id) - { - return knowledgeBaseMapper.deleteKnowledgeBaseById(id); - } -} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java index 3d7ee9b..da44527 100644 --- a/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java +++ b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java @@ -102,26 +102,25 @@ public class SysKnowledgeBaseServiceImpl implements ISysKnowledgeBaseService * @param keyword 搜索关键词 * @return 知识库集合 */ - @Override public List searchSysKnowledgeBaseByKeyword(String keyword) { - System.out.println("=== 开始搜索 ==="); - System.out.println("原始输入: " + keyword); + // 关键:在方法开始时直接过滤纯数字 + if (StringUtils.isEmpty(keyword) || keyword.matches("^\\d+$")) { + return new ArrayList<>(); + } - // 1. 关键词提取 + keyword = keyword.trim(); + + // 原有的逻辑... List keywords = extractKeywords(keyword); System.out.println("提取的关键词: " + keywords); - // 2. 如果提取到关键词,使用多关键词搜索 if (!keywords.isEmpty()) { - System.out.println("使用多关键词搜索: " + keywords); return sysKnowledgeBaseMapper.searchByKeywords(keywords); } - // 3. 回退到原逻辑 System.out.println("使用原单关键词搜索: " + keyword); return sysKnowledgeBaseMapper.searchSysKnowledgeBaseByKeyword(keyword); } - /** * 关键词提取方法(改进版) */ diff --git a/chenhai-system/src/main/resources/mapper/muhu/MuhuFeedMarketMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MuhuFeedMarketMapper.xml new file mode 100644 index 0000000..363b26e --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/muhu/MuhuFeedMarketMapper.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + select id, feed_name, supplier, price, update_time, update_date, created_at, unit from muhu_feed_market + + + + + + + + insert into muhu_feed_market + + feed_name, + supplier, + price, + update_time, + update_date, + created_at, + unit, + + + #{feedName}, + #{supplier}, + #{price}, + #{updateTime}, + #{updateDate}, + #{createdAt}, + #{unit}, + + + + + update muhu_feed_market + + feed_name = #{feedName}, + supplier = #{supplier}, + price = #{price}, + update_time = #{updateTime}, + update_date = #{updateDate}, + created_at = #{createdAt}, + unit = #{unit}, + + where id = #{id} + + + + delete from muhu_feed_market where id = #{id} + + + + delete from muhu_feed_market where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml deleted file mode 100644 index e8f30ac..0000000 --- a/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - select id, title, content, info_type, publish_source, region, attachment_url, view_count, publish_user_id, is_top, status, publish_time, update_time from muhu_market_info - - - - - - - - insert into muhu_market_info - - title, - content, - info_type, - publish_source, - region, - attachment_url, - view_count, - publish_user_id, - is_top, - status, - publish_time, - update_time, - - - #{title}, - #{content}, - #{infoType}, - #{publishSource}, - #{region}, - #{attachmentUrl}, - #{viewCount}, - #{publishUserId}, - #{isTop}, - #{status}, - #{publishTime}, - #{updateTime}, - - - - - update muhu_market_info - - title = #{title}, - content = #{content}, - info_type = #{infoType}, - publish_source = #{publishSource}, - region = #{region}, - attachment_url = #{attachmentUrl}, - view_count = #{viewCount}, - publish_user_id = #{publishUserId}, - is_top = #{isTop}, - status = #{status}, - publish_time = #{publishTime}, - update_time = #{updateTime}, - - where id = #{id} - - - - delete from muhu_market_info where id = #{id} - - - - delete from muhu_market_info where id in - - #{id} - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketTrendMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketTrendMapper.xml new file mode 100644 index 0000000..4ee8057 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketTrendMapper.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, title, info_type, category, price_index, month_compare_rate, year_compare_rate, report_date, region, severity, expected_impact, advice, source, publish_date, content, tags, created_at from muhu_market_trend + + + + + + + + insert into muhu_market_trend + + title, + info_type, + category, + price_index, + month_compare_rate, + year_compare_rate, + report_date, + region, + severity, + expected_impact, + advice, + source, + publish_date, + content, + tags, + created_at, + + + #{title}, + #{infoType}, + #{category}, + #{priceIndex}, + #{monthCompareRate}, + #{yearCompareRate}, + #{reportDate}, + #{region}, + #{severity}, + #{expectedImpact}, + #{advice}, + #{source}, + #{publishDate}, + #{content}, + #{tags}, + #{createdAt}, + + + + + update muhu_market_trend + + title = #{title}, + info_type = #{infoType}, + category = #{category}, + price_index = #{priceIndex}, + month_compare_rate = #{monthCompareRate}, + year_compare_rate = #{yearCompareRate}, + report_date = #{reportDate}, + region = #{region}, + severity = #{severity}, + expected_impact = #{expectedImpact}, + advice = #{advice}, + source = #{source}, + publish_date = #{publishDate}, + content = #{content}, + tags = #{tags}, + created_at = #{createdAt}, + + where id = #{id} + + + + delete from muhu_market_trend where id = #{id} + + + + delete from muhu_market_trend where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/muhu/MuhuSalesMarketMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MuhuSalesMarketMapper.xml new file mode 100644 index 0000000..67fb7cf --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/muhu/MuhuSalesMarketMapper.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, product_name, product_type, price, unit, price_change, market_name, region_province, region_city, region_detail, price_time, price_date, update_time, data_source, status, remark from muhu_sales_market + + + + + + + + insert into muhu_sales_market + + product_name, + product_type, + price, + unit, + price_change, + market_name, + region_province, + region_city, + region_detail, + price_time, + price_date, + update_time, + data_source, + status, + remark, + + + #{productName}, + #{productType}, + #{price}, + #{unit}, + #{priceChange}, + #{marketName}, + #{regionProvince}, + #{regionCity}, + #{regionDetail}, + #{priceTime}, + #{priceDate}, + #{updateTime}, + #{dataSource}, + #{status}, + #{remark}, + + + + + update muhu_sales_market + + product_name = #{productName}, + product_type = #{productType}, + price = #{price}, + unit = #{unit}, + price_change = #{priceChange}, + market_name = #{marketName}, + region_province = #{regionProvince}, + region_city = #{regionCity}, + region_detail = #{regionDetail}, + price_time = #{priceTime}, + price_date = #{priceDate}, + update_time = #{updateTime}, + data_source = #{dataSource}, + status = #{status}, + remark = #{remark}, + + where id = #{id} + + + + delete from muhu_sales_market where id = #{id} + + + + delete from muhu_sales_market where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml b/chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml deleted file mode 100644 index 9ab5a3e..0000000 --- a/chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - select id, title, category, keywords, summary, content, applicable_species, source_name, author, created_time, updated_time, publish_time from knowledge_base - - - - - - - - insert into knowledge_base - - title, - category, - keywords, - summary, - content, - applicable_species, - source_name, - author, - created_time, - updated_time, - publish_time, - - - #{title}, - #{category}, - #{keywords}, - #{summary}, - #{content}, - #{applicableSpecies}, - #{sourceName}, - #{author}, - #{createdTime}, - #{updatedTime}, - #{publishTime}, - - - - - update knowledge_base - - title = #{title}, - category = #{category}, - keywords = #{keywords}, - summary = #{summary}, - content = #{content}, - applicable_species = #{applicableSpecies}, - source_name = #{sourceName}, - author = #{author}, - created_time = #{createdTime}, - updated_time = #{updatedTime}, - publish_time = #{publishTime}, - - where id = #{id} - - - - delete from knowledge_base where id = #{id} - - - - delete from knowledge_base where id in - - #{id} - - - \ No newline at end of file diff --git a/chenhai-ui/src/api/muhu/feed.js b/chenhai-ui/src/api/muhu/feed.js new file mode 100644 index 0000000..0c23ebc --- /dev/null +++ b/chenhai-ui/src/api/muhu/feed.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询饲料市场列表 +export function listFeed(query) { + return request({ + url: '/muhu/feed/list', + method: 'get', + params: query + }) +} + +// 查询饲料市场详细 +export function getFeed(id) { + return request({ + url: '/muhu/feed/' + id, + method: 'get' + }) +} + +// 新增饲料市场 +export function addFeed(data) { + return request({ + url: '/muhu/feed', + method: 'post', + data: data + }) +} + +// 修改饲料市场 +export function updateFeed(data) { + return request({ + url: '/muhu/feed', + method: 'put', + data: data + }) +} + +// 删除饲料市场 +export function delFeed(id) { + return request({ + url: '/muhu/feed/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/muhu/market.js b/chenhai-ui/src/api/muhu/market.js deleted file mode 100644 index f2f1afe..0000000 --- a/chenhai-ui/src/api/muhu/market.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询市场信息列表 -export function listMarket(query) { - return request({ - url: '/muhu/market/list', - method: 'get', - params: query - }) -} - -// 查询市场信息详细 -export function getMarket(id) { - return request({ - url: '/muhu/market/' + id, - method: 'get' - }) -} - -// 新增市场信息 -export function addMarket(data) { - return request({ - url: '/muhu/market', - method: 'post', - data: data - }) -} - -// 修改市场信息 -export function updateMarket(data) { - return request({ - url: '/muhu/market', - method: 'put', - data: data - }) -} - -// 删除市场信息 -export function delMarket(id) { - return request({ - url: '/muhu/market/' + id, - method: 'delete' - }) -} diff --git a/chenhai-ui/src/api/muhu/sales.js b/chenhai-ui/src/api/muhu/sales.js new file mode 100644 index 0000000..ddef14a --- /dev/null +++ b/chenhai-ui/src/api/muhu/sales.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询销售市场列表 +export function listSales(query) { + return request({ + url: '/muhu/sales/list', + method: 'get', + params: query + }) +} + +// 查询销售市场详细 +export function getSales(id) { + return request({ + url: '/muhu/sales/' + id, + method: 'get' + }) +} + +// 新增销售市场 +export function addSales(data) { + return request({ + url: '/muhu/sales', + method: 'post', + data: data + }) +} + +// 修改销售市场 +export function updateSales(data) { + return request({ + url: '/muhu/sales', + method: 'put', + data: data + }) +} + +// 删除销售市场 +export function delSales(id) { + return request({ + url: '/muhu/sales/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/muhu/trend.js b/chenhai-ui/src/api/muhu/trend.js new file mode 100644 index 0000000..cec8622 --- /dev/null +++ b/chenhai-ui/src/api/muhu/trend.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询市场趋势列表 +export function listTrend(query) { + return request({ + url: '/muhu/trend/list', + method: 'get', + params: query + }) +} + +// 查询市场趋势详细 +export function getTrend(id) { + return request({ + url: '/muhu/trend/' + id, + method: 'get' + }) +} + +// 新增市场趋势 +export function addTrend(data) { + return request({ + url: '/muhu/trend', + method: 'post', + data: data + }) +} + +// 修改市场趋势 +export function updateTrend(data) { + return request({ + url: '/muhu/trend', + method: 'put', + data: data + }) +} + +// 删除市场趋势 +export function delTrend(id) { + return request({ + url: '/muhu/trend/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/views/muhu/feed/index.vue b/chenhai-ui/src/views/muhu/feed/index.vue new file mode 100644 index 0000000..45096a0 --- /dev/null +++ b/chenhai-ui/src/views/muhu/feed/index.vue @@ -0,0 +1,287 @@ + + + diff --git a/chenhai-ui/src/views/muhu/market/index.vue b/chenhai-ui/src/views/muhu/sales/index.vue similarity index 60% rename from chenhai-ui/src/views/muhu/market/index.vue rename to chenhai-ui/src/views/muhu/sales/index.vue index 85501e7..62a92a3 100644 --- a/chenhai-ui/src/views/muhu/market/index.vue +++ b/chenhai-ui/src/views/muhu/sales/index.vue @@ -1,10 +1,10 @@