From 86493172dd7e0ba1d0ef6d8bc61df0467f71ac39 Mon Sep 17 00:00:00 2001 From: maotiantian Date: Mon, 5 Jan 2026 15:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B5=E9=9D=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muhu/MuhuMarketInfoController.java | 104 ++++++ .../system/SysKnowledgeBaseController.java | 109 ++++++ .../vet/VetPersonalInfoController.java | 24 +- .../chenhai/muhu/domain/MerchantMapInfo.java | 28 ++ .../chenhai/muhu/domain/MuhuMarketInfo.java | 206 ++++++++++++ .../chenhai/muhu/domain/MuhuServiceGuide.java | 28 ++ .../muhu/mapper/MuhuMarketInfoMapper.java | 61 ++++ .../muhu/service/IMuhuMarketInfoService.java | 61 ++++ .../impl/MuhuMarketInfoServiceImpl.java | 95 ++++++ .../system/domain/SysKnowledgeBase.java | 187 +++++++++++ .../system/mapper/SysKnowledgeBaseMapper.java | 79 +++++ .../service/ISysKnowledgeBaseService.java | 69 ++++ .../impl/SysKnowledgeBaseServiceImpl.java | 221 +++++++++++++ .../chenhai/vet/domain/VetPersonalInfo.java | 107 +++--- .../vet/mapper/VetPersonalInfoMapper.java | 5 +- .../mapper/muhu/MerchantMapInfoMapper.xml | 24 +- .../mapper/muhu/MuhuMarketInfoMapper.xml | 110 +++++++ .../mapper/muhu/MuhuServiceGuideMapper.xml | 12 +- .../mapper/system/SysKnowledgeBaseMapper.xml | 133 ++++++++ .../mapper/vet/VetPersonalInfoMapper.xml | 2 +- chenhai-ui/src/api/muhu/market.js | 44 +++ chenhai-ui/src/api/system/base.js | 10 +- chenhai-ui/src/views/muhu/guide/index.vue | 11 +- chenhai-ui/src/views/muhu/info/index.vue | 8 + chenhai-ui/src/views/muhu/market/index.vue | 310 ++++++++++++++++++ chenhai-ui/src/views/system/base/index.vue | 94 ++---- .../src/views/vet/certificate/index.vue | 2 +- 27 files changed, 2004 insertions(+), 140 deletions(-) create mode 100644 chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketInfoController.java create mode 100644 chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysKnowledgeBaseController.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketInfo.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketInfoMapper.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/domain/SysKnowledgeBase.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/mapper/SysKnowledgeBaseMapper.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/service/ISysKnowledgeBaseService.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java create mode 100644 chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml create mode 100644 chenhai-system/src/main/resources/mapper/system/SysKnowledgeBaseMapper.xml create mode 100644 chenhai-ui/src/api/muhu/market.js create mode 100644 chenhai-ui/src/views/muhu/market/index.vue 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 new file mode 100644 index 0000000..4dda58e --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketInfoController.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.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/system/SysKnowledgeBaseController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysKnowledgeBaseController.java new file mode 100644 index 0000000..7298dfe --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysKnowledgeBaseController.java @@ -0,0 +1,109 @@ +package com.chenhai.web.controller.system; + +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.*; +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.system.domain.SysKnowledgeBase; +import com.chenhai.system.service.ISysKnowledgeBaseService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 知识库Controller + * + * @author ruoyi + * @date 2026-01-04 + */ +@RestController +@RequestMapping("/system/base") +public class SysKnowledgeBaseController extends BaseController +{ + @Autowired + private ISysKnowledgeBaseService sysKnowledgeBaseService; + + /** + * 查询知识库列表 + */ + @PreAuthorize("@ss.hasPermi('system:base:list') or @ss.hasRole('muhu')") + @GetMapping("/list") + public TableDataInfo list(SysKnowledgeBase sysKnowledgeBase) + { + startPage(); + List list = sysKnowledgeBaseService.selectSysKnowledgeBaseList(sysKnowledgeBase); + return getDataTable(list); + } + + /** + * 导出知识库列表 + */ + @PreAuthorize("@ss.hasPermi('system:base:export') or @ss.hasRole('muhu')") + @Log(title = "知识库", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysKnowledgeBase sysKnowledgeBase) + { + List list = sysKnowledgeBaseService.selectSysKnowledgeBaseList(sysKnowledgeBase); + ExcelUtil util = new ExcelUtil(SysKnowledgeBase.class); + util.exportExcel(response, list, "知识库数据"); + } + + /** + * 获取知识库详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:base:query') or @ss.hasRole('muhu')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysKnowledgeBaseService.selectSysKnowledgeBaseById(id)); + } + + /** + * 新增知识库 + */ + @PreAuthorize("@ss.hasPermi('system:base:add') or @ss.hasRole('muhu')") + @Log(title = "知识库", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysKnowledgeBase sysKnowledgeBase) + { + return toAjax(sysKnowledgeBaseService.insertSysKnowledgeBase(sysKnowledgeBase)); + } + + /** + * 修改知识库 + */ + @PreAuthorize("@ss.hasPermi('system:base:edit') or @ss.hasRole('muhu')") + @Log(title = "知识库", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysKnowledgeBase sysKnowledgeBase) + { + return toAjax(sysKnowledgeBaseService.updateSysKnowledgeBase(sysKnowledgeBase)); + } + + /** + * 删除知识库 + */ + @PreAuthorize("@ss.hasPermi('system:base:remove') or @ss.hasRole('muhu')") + @Log(title = "知识库", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysKnowledgeBaseService.deleteSysKnowledgeBaseByIds(ids)); + } + + /** + * 模糊搜索知识库 + */ + @PreAuthorize("@ss.hasPermi('system:base:search') or @ss.hasRole('muhu')") + @GetMapping("/search") + public TableDataInfo search(@RequestParam(value = "keyword", required = false) String keyword) + { + startPage(); + List list = sysKnowledgeBaseService.searchSysKnowledgeBaseByKeyword(keyword); + return getDataTable(list); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetPersonalInfoController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetPersonalInfoController.java index f505ccb..7f4a62e 100644 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetPersonalInfoController.java +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetPersonalInfoController.java @@ -1,27 +1,33 @@ package com.chenhai.web.controller.vet; +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.core.page.TableDataInfo; import com.chenhai.common.enums.BusinessType; -import com.chenhai.common.utils.poi.ExcelUtil; import com.chenhai.vet.domain.VetPersonalInfo; import com.chenhai.vet.mapper.VetPersonalInfoMapper; import com.chenhai.vet.service.IVetPersonalInfoService; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.List; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; import java.util.Map; /** * 兽医个人信息Controller * * @author ruoyi - * @date 2025-12-29 + * @date 2025-12-31 */ @RestController @RequestMapping("/vet/info") diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java index 70790f9..842d481 100644 --- a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java @@ -50,6 +50,12 @@ public class MerchantMapInfo extends BaseEntity @Excel(name = "图标") private String iconPath; + @Excel(name = "联系人") + private String name; + + @Excel(name = "联系方式") + private String iphone; + public void setIconPath(String iconPath) { this.iconPath = iconPath; @@ -60,6 +66,26 @@ public class MerchantMapInfo extends BaseEntity return iconPath; } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setIphone(String iphone) + { + this.iphone = iphone; + } + + public String getIphone() + { + return iphone; + } + public void setId(Long id) { this.id = id; @@ -152,6 +178,8 @@ public class MerchantMapInfo extends BaseEntity .append("latitude", getLatitude()) .append("longitude", getLongitude()) .append("iconPath", getIconPath()) + .append("name",getName()) + .append("iphone",getIphone()) .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 new file mode 100644 index 0000000..a62768b --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketInfo.java @@ -0,0 +1,206 @@ +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/MuhuServiceGuide.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuServiceGuide.java index fd53373..f1a6ad9 100644 --- a/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuServiceGuide.java +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuServiceGuide.java @@ -51,6 +51,12 @@ public class MuhuServiceGuide extends BaseEntity @Excel(name = "经度") private BigDecimal longitude; + @Excel(name = "联系人") + private String name; + + @Excel(name = "联系方式") + private String iphone; + public void setId(Long id) { this.id = id; @@ -61,6 +67,26 @@ public class MuhuServiceGuide extends BaseEntity return id; } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setIphone(String iphone) + { + this.iphone = iphone; + } + + public String getIphone() + { + return iphone; + } + public void setIconPath(String iconPath) { this.iconPath = iconPath; @@ -153,6 +179,8 @@ public class MuhuServiceGuide extends BaseEntity .append("address", getAddress()) .append("latitude", getLatitude()) .append("longitude", getLongitude()) + .append("name",getName()) + .append("iphone",getIphone()) .toString(); } } 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 new file mode 100644 index 0000000..8551996 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketInfoMapper.java @@ -0,0 +1,61 @@ +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/service/IMuhuMarketInfoService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java new file mode 100644 index 0000000..f73d562 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java @@ -0,0 +1,61 @@ +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/impl/MuhuMarketInfoServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.java new file mode 100644 index 0000000..5f31536 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.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.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/system/domain/SysKnowledgeBase.java b/chenhai-system/src/main/java/com/chenhai/system/domain/SysKnowledgeBase.java new file mode 100644 index 0000000..b5af38d --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/SysKnowledgeBase.java @@ -0,0 +1,187 @@ +package com.chenhai.system.domain; + +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; + +/** + * 知识库对象 sys_knowledge_base + * + * @author ruoyi + * @date 2026-01-04 + */ +public class SysKnowledgeBase extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 知识ID */ + private Long id; + + /** 知识标题 */ + @Excel(name = "知识标题") + private String title; + + /** 知识类别 */ + @Excel(name = "知识类别") + private String category; + + /** 关键词,逗号分隔(用于搜索) */ + @Excel(name = "关键词,逗号分隔", readConverterExp = "用=于搜索") + private String keywords; + + /** 可能病症,逗号分隔 */ + @Excel(name = "可能病症,逗号分隔") + private String possibleDiseases; + + /** 严重程度:轻度/中度/重度 */ + @Excel(name = "严重程度:轻度/中度/重度") + private String severityLevel; + + /** 建议措施 */ + @Excel(name = "建议措施") + private String suggestions; + + /** 详细内容 */ + @Excel(name = "详细内容") + private String content; + + /** 适用物种,逗号分隔 */ + @Excel(name = "适用物种,逗号分隔") + private String suitableSpecies; + + /** 查看次数 */ + @Excel(name = "查看次数") + private Long viewCount; + + /** 状态(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 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 setPossibleDiseases(String possibleDiseases) + { + this.possibleDiseases = possibleDiseases; + } + + public String getPossibleDiseases() + { + return possibleDiseases; + } + + public void setSeverityLevel(String severityLevel) + { + this.severityLevel = severityLevel; + } + + public String getSeverityLevel() + { + return severityLevel; + } + + public void setSuggestions(String suggestions) + { + this.suggestions = suggestions; + } + + public String getSuggestions() + { + return suggestions; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setSuitableSpecies(String suitableSpecies) + { + this.suitableSpecies = suitableSpecies; + } + + public String getSuitableSpecies() + { + return suitableSpecies; + } + + public void setViewCount(Long viewCount) + { + this.viewCount = viewCount; + } + + public Long getViewCount() + { + return viewCount; + } + + 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("title", getTitle()) + .append("category", getCategory()) + .append("keywords", getKeywords()) + .append("possibleDiseases", getPossibleDiseases()) + .append("severityLevel", getSeverityLevel()) + .append("suggestions", getSuggestions()) + .append("content", getContent()) + .append("suitableSpecies", getSuitableSpecies()) + .append("viewCount", getViewCount()) + .append("status", getStatus()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/SysKnowledgeBaseMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysKnowledgeBaseMapper.java new file mode 100644 index 0000000..2148dc5 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysKnowledgeBaseMapper.java @@ -0,0 +1,79 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.SysKnowledgeBase; +import org.apache.ibatis.annotations.Param; + +/** + * 知识库Mapper接口 + * + * @author ruoyi + * @date 2026-01-04 + */ +public interface SysKnowledgeBaseMapper +{ + /** + * 查询知识库 + * + * @param id 知识库主键 + * @return 知识库 + */ + public SysKnowledgeBase selectSysKnowledgeBaseById(Long id); + + /** + * 查询知识库列表 + * + * @param sysKnowledgeBase 知识库 + * @return 知识库集合 + */ + public List selectSysKnowledgeBaseList(SysKnowledgeBase sysKnowledgeBase); + + /** + * 新增知识库 + * + * @param sysKnowledgeBase 知识库 + * @return 结果 + */ + public int insertSysKnowledgeBase(SysKnowledgeBase sysKnowledgeBase); + + /** + * 修改知识库 + * + * @param sysKnowledgeBase 知识库 + * @return 结果 + */ + public int updateSysKnowledgeBase(SysKnowledgeBase sysKnowledgeBase); + + /** + * 删除知识库 + * + * @param id 知识库主键 + * @return 结果 + */ + public int deleteSysKnowledgeBaseById(Long id); + + /** + * 批量删除知识库 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysKnowledgeBaseByIds(Long[] ids); + + /** + * 模糊搜索知识库(单关键词) + * + * @param keyword 搜索关键词 + * @return 知识库集合 + */ + public List searchSysKnowledgeBaseByKeyword(String keyword); + + /** + * 模糊搜索知识库(多关键词) + * + * @param keywords 搜索关键词列表 + * @return 知识库集合 + */ + public List searchByKeywords(@Param("keywords") List keywords); + +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/ISysKnowledgeBaseService.java b/chenhai-system/src/main/java/com/chenhai/system/service/ISysKnowledgeBaseService.java new file mode 100644 index 0000000..c179625 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/ISysKnowledgeBaseService.java @@ -0,0 +1,69 @@ +package com.chenhai.system.service; + +import java.util.List; +import com.chenhai.system.domain.SysKnowledgeBase; + +/** + * 知识库Service接口 + * + * @author ruoyi + * @date 2026-01-04 + */ +public interface ISysKnowledgeBaseService +{ + /** + * 查询知识库 + * + * @param id 知识库主键 + * @return 知识库 + */ + public SysKnowledgeBase selectSysKnowledgeBaseById(Long id); + + /** + * 查询知识库列表 + * + * @param sysKnowledgeBase 知识库 + * @return 知识库集合 + */ + public List selectSysKnowledgeBaseList(SysKnowledgeBase sysKnowledgeBase); + + /** + * 新增知识库 + * + * @param sysKnowledgeBase 知识库 + * @return 结果 + */ + public int insertSysKnowledgeBase(SysKnowledgeBase sysKnowledgeBase); + + /** + * 修改知识库 + * + * @param sysKnowledgeBase 知识库 + * @return 结果 + */ + public int updateSysKnowledgeBase(SysKnowledgeBase sysKnowledgeBase); + + /** + * 批量删除知识库 + * + * @param ids 需要删除的知识库主键集合 + * @return 结果 + */ + public int deleteSysKnowledgeBaseByIds(Long[] ids); + + /** + * 删除知识库信息 + * + * @param id 知识库主键 + * @return 结果 + */ + public int deleteSysKnowledgeBaseById(Long id); + + /** + * 模糊搜索知识库 + * + * @param keyword 搜索关键词 + * @return 知识库集合 + */ + public List searchSysKnowledgeBaseByKeyword(String keyword); +} 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 new file mode 100644 index 0000000..3d7ee9b --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java @@ -0,0 +1,221 @@ +package com.chenhai.system.service.impl; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import com.chenhai.common.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.system.mapper.SysKnowledgeBaseMapper; +import com.chenhai.system.domain.SysKnowledgeBase; +import com.chenhai.system.service.ISysKnowledgeBaseService; + +/** + * 知识库Service业务层处理 + * + * @author ruoyi + * @date 2026-01-04 + */ +@Service +public class SysKnowledgeBaseServiceImpl implements ISysKnowledgeBaseService +{ + @Autowired + private SysKnowledgeBaseMapper sysKnowledgeBaseMapper; + + /** + * 查询知识库 + * + * @param id 知识库主键 + * @return 知识库 + */ + @Override + public SysKnowledgeBase selectSysKnowledgeBaseById(Long id) + { + return sysKnowledgeBaseMapper.selectSysKnowledgeBaseById(id); + } + + /** + * 查询知识库列表 + * + * @param sysKnowledgeBase 知识库 + * @return 知识库 + */ + @Override + public List selectSysKnowledgeBaseList(SysKnowledgeBase sysKnowledgeBase) + { + return sysKnowledgeBaseMapper.selectSysKnowledgeBaseList(sysKnowledgeBase); + } + + /** + * 新增知识库 + * + * @param sysKnowledgeBase 知识库 + * @return 结果 + */ + @Override + public int insertSysKnowledgeBase(SysKnowledgeBase sysKnowledgeBase) + { + return sysKnowledgeBaseMapper.insertSysKnowledgeBase(sysKnowledgeBase); + } + + /** + * 修改知识库 + * + * @param sysKnowledgeBase 知识库 + * @return 结果 + */ + @Override + public int updateSysKnowledgeBase(SysKnowledgeBase sysKnowledgeBase) + { + return sysKnowledgeBaseMapper.updateSysKnowledgeBase(sysKnowledgeBase); + } + + /** + * 批量删除知识库 + * + * @param ids 需要删除的知识库主键 + * @return 结果 + */ + @Override + public int deleteSysKnowledgeBaseByIds(Long[] ids) + { + return sysKnowledgeBaseMapper.deleteSysKnowledgeBaseByIds(ids); + } + + /** + * 删除知识库信息 + * + * @param id 知识库主键 + * @return 结果 + */ + @Override + public int deleteSysKnowledgeBaseById(Long id) + { + return sysKnowledgeBaseMapper.deleteSysKnowledgeBaseById(id); + } + + /** + * 模糊搜索知识库 + * + * @param keyword 搜索关键词 + * @return 知识库集合 + */ + @Override + public List searchSysKnowledgeBaseByKeyword(String keyword) { + System.out.println("=== 开始搜索 ==="); + System.out.println("原始输入: " + keyword); + + // 1. 关键词提取 + 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); + } + + /** + * 关键词提取方法(改进版) + */ + private List extractKeywords(String input) { + if (StringUtils.isEmpty(input)) { + return new ArrayList<>(); + } + + // 中文停用词(扩展版) + List stopWords = Arrays.asList( + "我的", "你的", "他的", "她的", "我们的", + "怎么办", "怎么", "如何", "什么", "为什么", "为何", "怎样", + "原因", "症状", "治疗", "预防", "诊断", "救治", + "请问", "求助", "帮忙", "帮帮我", "请问一下", "你好", + "症状", "表现", "特征", "现象", "情况", "问题", + "的", "了", "啊", "呢", "吗", "吧", "呀", "有" + ); + + // 移除标点符号 + String cleaned = input.replaceAll("[,。!?、;:'\"(),.]", " "); + + List keywords = new ArrayList<>(); + + // 优先提取兽医领域关键词 + String[] vetKeywords = { + // 症状 + "咳嗽", "发烧", "发热", "腹泻", "拉稀", "呕吐", "厌食", "不吃", "呼吸困难", + "喘气", "打喷嚏", "流鼻涕", "流泪", "眼屎", "皮肤", "瘙痒", "脱毛", "流血", + "肿胀", "溃烂", "瘸腿", "跛行", "抽搐", "痉挛", "昏迷", + // 疾病 + "感染", "炎症", "病毒", "细菌", "寄生虫", "真菌", "传染病", + // 治疗 + "疫苗", "免疫", "驱虫", "消毒", "抗生素", "手术", "治疗", "用药", + // 皮肤病相关(重点!) + "湿疹", "皮炎", "皮肤病", "皮肤", "瘙痒", "痒", "脱毛", "红肿", + "溃烂", "皮疹", "红斑", "水泡", "脓疱", "结痂", "脱屑" + }; + + // 检查是否包含兽医关键词 + for (String vetWord : vetKeywords) { + if (cleaned.contains(vetWord) && !keywords.contains(vetWord)) { + keywords.add(vetWord); + } + } + + // 如果没找到专业词汇,使用简单分词 + if (keywords.isEmpty()) { + // 简单分词:取2-4个字符的组合 + cleaned = cleaned.replaceAll("\\s+", ""); + + for (int len = 4; len >= 2; len--) { + for (int i = 0; i <= cleaned.length() - len; i++) { + String word = cleaned.substring(i, i + len); + if (!stopWords.contains(word) && + !isNumeric(word) && + !keywords.contains(word)) { + keywords.add(word); + break; // 找到一个就跳出内层循环 + } + } + if (!keywords.isEmpty()) break; // 找到一个就跳出外层循环 + } + } + + // 如果没有提取到任何关键词,使用原输入(过滤停用词后) + if (keywords.isEmpty()) { + String simple = input; + for (String stopWord : stopWords) { + simple = simple.replace(stopWord, ""); + } + simple = simple.trim(); + if (simple.length() >= 2) { + keywords.add(simple); + } + } + + return keywords.stream() + .limit(5) // 最多5个关键词 + .collect(Collectors.toList()); + } + + /** + * 判断是否为数字 + */ + private boolean isNumeric(String str) { + if (str == null || str.isEmpty()) { + return false; + } + for (char c : str.toCharArray()) { + if (!Character.isDigit(c)) { + return false; + } + } + return true; + } + +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java index 6504c65..fa3b74e 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java @@ -10,7 +10,7 @@ import java.util.Date; /** * 兽医个人信息对象 vet_personal_info - * + * * @author ruoyi * @date 2025-12-29 */ @@ -46,8 +46,8 @@ public class VetPersonalInfo extends BaseEntity @Excel(name = "擅长领域") private String specialty; - /** 工作经验(年) */ - @Excel(name = "工作经验", readConverterExp = "年=") + /** 工作经验 */ + @Excel(name = "工作经验") private String workExperience; /** 所属医院 */ @@ -57,6 +57,7 @@ public class VetPersonalInfo extends BaseEntity /** 联系地址 */ @Excel(name = "联系地址") private String address; + /** 联系方式 */ @Excel(name = "联系方式") private String iphone; @@ -89,72 +90,82 @@ public class VetPersonalInfo extends BaseEntity this.certNames = certNames; } - public void setId(Long id) + public void setId(Long id) { this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setUserId(Long userId) + public void setUserId(Long userId) { this.userId = userId; } - public Long getUserId() + public Long getUserId() { return userId; } - public void setRealName(String realName) + public void setRealName(String realName) { this.realName = realName; } - public String getRealName() + public String getRealName() { return realName; } - public void setGender(String gender) + public void setGender(String gender) { this.gender = gender; } - public String getGender() + public String getGender() { return gender; } - public void setBirthday(Date birthday) + public void setIphone(String iphone) + { + this.iphone = iphone; + } + + public String getIphone() + { + return iphone; + } + + public void setBirthday(Date birthday) { this.birthday = birthday; } - public Date getBirthday() + public Date getBirthday() { return birthday; } - public void setIdCard(String idCard) + public void setIdCard(String idCard) { this.idCard = idCard; } - public String getIdCard() + public String getIdCard() { return idCard; } - public void setSpecialty(String specialty) + public void setSpecialty(String specialty) { this.specialty = specialty; } - public String getSpecialty() + public String getSpecialty() { return specialty; } @@ -169,42 +180,32 @@ public class VetPersonalInfo extends BaseEntity return workExperience; } - public void setHospital(String hospital) - { - this.hospital = hospital; - } - - public String getHospital() - { - return hospital; - } - - public void setAddress(String address) + public void setAddress(String address) { this.address = address; } - public String getAddress() + public String getAddress() { return address; } - public void setIphone(String address) + public void setHospital(String hospital) { - this.iphone = iphone; + this.hospital = hospital; } - public String getIphone() + public String getHospital() { - return iphone; + return hospital; } - public void setIntroduction(String introduction) + public void setIntroduction(String introduction) { this.introduction = introduction; } - public String getIntroduction() + public String getIntroduction() { return introduction; } @@ -212,22 +213,22 @@ public class VetPersonalInfo extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("realName", getRealName()) - .append("gender", getGender()) - .append("birthday", getBirthday()) - .append("idCard", getIdCard()) - .append("specialty", getSpecialty()) - .append("workExperience", getWorkExperience()) - .append("hospital", getHospital()) - .append("address", getAddress()) + .append("id", getId()) + .append("userId", getUserId()) + .append("realName", getRealName()) + .append("gender", getGender()) + .append("birthday", getBirthday()) + .append("idCard", getIdCard()) + .append("specialty", getSpecialty()) + .append("workExperience", getWorkExperience()) + .append("hospital", getHospital()) + .append("address", getAddress()) .append("iphone", getIphone()) - .append("introduction", getIntroduction()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } -} + .append("introduction", getIntroduction()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} \ No newline at end of file diff --git a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java index d687dd8..bc85d47 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java @@ -1,14 +1,13 @@ package com.chenhai.vet.mapper; -import com.chenhai.vet.domain.VetPersonalInfo; - import java.util.List; +import com.chenhai.vet.domain.VetPersonalInfo; /** * 兽医个人信息Mapper接口 * * @author ruoyi - * @date 2025-12-29 + * @date 2025-12-31 */ public interface VetPersonalInfoMapper { diff --git a/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml index 2d0fd74..f52d450 100644 --- a/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml +++ b/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml @@ -13,11 +13,13 @@ - + + + - select id, title, merchant_type, merchant_subtype, region, address, latitude, longitude, icon_path from muhu_merchant_map_info + select id, title, merchant_type, merchant_subtype, region, address, latitude, longitude, icon_path, name, iphone from muhu_merchant_map_info @@ -49,7 +53,9 @@ address, latitude, longitude, - icon_path, + icon_path, + name, + iphone, #{title}, @@ -59,21 +65,25 @@ #{address}, #{latitude}, #{longitude}, - #{iconPath}, + #{iconPath}, + #{name}, + #{iphone}, update muhu_merchant_map_info - title = #{title}, + title = #{title}, merchant_type = #{merchantType}, merchant_subtype = #{merchantSubtype}, region = #{region}, address = #{address}, latitude = #{latitude}, longitude = #{longitude}, - icon_path = #{iconPath}, + icon_path = #{iconPath}, + name = #{name}, + iphone = #{iphone}, where id = #{id} diff --git a/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml new file mode 100644 index 0000000..e8f30ac --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + 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/MuhuServiceGuideMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml index bc98f19..0023e4e 100644 --- a/chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml +++ b/chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml @@ -14,10 +14,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select id, iconPath, title, guide_type, merchant_subtype, region, address, latitude, longitude from muhu_service_guide + select id, iconPath, title, guide_type, merchant_subtype, region, address, latitude, longitude, name, iphone from muhu_service_guide @@ -50,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" address, latitude, longitude, + name, + iphone, #{iconPath}, @@ -60,6 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{address}, #{latitude}, #{longitude}, + #{name}, + #{iphone}, @@ -74,6 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" address = #{address}, latitude = #{latitude}, longitude = #{longitude}, + name = #{name}, + iphone = #{iphone}, where id = #{id} diff --git a/chenhai-system/src/main/resources/mapper/system/SysKnowledgeBaseMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysKnowledgeBaseMapper.xml new file mode 100644 index 0000000..b75a37c --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysKnowledgeBaseMapper.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + select id, title, category, keywords, possible_diseases, severity_level, suggestions, content, suitable_species, view_count, status from sys_knowledge_base + + + + + + + + insert into sys_knowledge_base + + title, + category, + keywords, + possible_diseases, + severity_level, + suggestions, + content, + suitable_species, + view_count, + status, + + + #{title}, + #{category}, + #{keywords}, + #{possibleDiseases}, + #{severityLevel}, + #{suggestions}, + #{content}, + #{suitableSpecies}, + #{viewCount}, + #{status}, + + + + + update sys_knowledge_base + + title = #{title}, + category = #{category}, + keywords = #{keywords}, + possible_diseases = #{possibleDiseases}, + severity_level = #{severityLevel}, + suggestions = #{suggestions}, + content = #{content}, + suitable_species = #{suitableSpecies}, + view_count = #{viewCount}, + status = #{status}, + + where id = #{id} + + + + delete from sys_knowledge_base where id = #{id} + + + + delete from sys_knowledge_base where id in + + #{id} + + + + + + + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml b/chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml index b77fa80..78f77a2 100644 --- a/chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml +++ b/chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml @@ -113,11 +113,11 @@ user_id = #{userId}, real_name = #{realName}, gender = #{gender}, + iphone = #{iphone}, birthday = #{birthday}, id_card = #{idCard}, specialty = #{specialty}, work_experience = #{workExperience}, - hospital = #{hospital}, address = #{address}, introduction = #{introduction}, update_by = #{updateBy}, diff --git a/chenhai-ui/src/api/muhu/market.js b/chenhai-ui/src/api/muhu/market.js new file mode 100644 index 0000000..f2f1afe --- /dev/null +++ b/chenhai-ui/src/api/muhu/market.js @@ -0,0 +1,44 @@ +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/system/base.js b/chenhai-ui/src/api/system/base.js index b357abc..689d130 100644 --- a/chenhai-ui/src/api/system/base.js +++ b/chenhai-ui/src/api/system/base.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询知识库管理列表 +// 查询知识库列表 export function listBase(query) { return request({ url: '/system/base/list', @@ -9,7 +9,7 @@ export function listBase(query) { }) } -// 查询知识库管理详细 +// 查询知识库详细 export function getBase(id) { return request({ url: '/system/base/' + id, @@ -17,7 +17,7 @@ export function getBase(id) { }) } -// 新增知识库管理 +// 新增知识库 export function addBase(data) { return request({ url: '/system/base', @@ -26,7 +26,7 @@ export function addBase(data) { }) } -// 修改知识库管理 +// 修改知识库 export function updateBase(data) { return request({ url: '/system/base', @@ -35,7 +35,7 @@ export function updateBase(data) { }) } -// 删除知识库管理 +// 删除知识库 export function delBase(id) { return request({ url: '/system/base/' + id, diff --git a/chenhai-ui/src/views/muhu/guide/index.vue b/chenhai-ui/src/views/muhu/guide/index.vue index fea7620..18fd864 100644 --- a/chenhai-ui/src/views/muhu/guide/index.vue +++ b/chenhai-ui/src/views/muhu/guide/index.vue @@ -67,12 +67,15 @@ - + + + + @@ -116,6 +119,12 @@ + + + + + + diff --git a/chenhai-ui/src/views/muhu/info/index.vue b/chenhai-ui/src/views/muhu/info/index.vue index 399474b..bee5050 100644 --- a/chenhai-ui/src/views/muhu/info/index.vue +++ b/chenhai-ui/src/views/muhu/info/index.vue @@ -74,6 +74,8 @@ + + @@ -117,6 +119,12 @@ + + + + + + diff --git a/chenhai-ui/src/views/muhu/market/index.vue b/chenhai-ui/src/views/muhu/market/index.vue new file mode 100644 index 0000000..85501e7 --- /dev/null +++ b/chenhai-ui/src/views/muhu/market/index.vue @@ -0,0 +1,310 @@ + + + diff --git a/chenhai-ui/src/views/system/base/index.vue b/chenhai-ui/src/views/system/base/index.vue index 32d584a..0b7a549 100644 --- a/chenhai-ui/src/views/system/base/index.vue +++ b/chenhai-ui/src/views/system/base/index.vue @@ -9,22 +9,6 @@ @keyup.enter.native="handleQuery" /> - - - - - - 搜索 重置 @@ -80,18 +64,12 @@ - - + + + - - - - - - +