Browse Source

解决页面报错问题

master
maotiantian 2 months ago
parent
commit
86493172dd
  1. 104
      chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuMarketInfoController.java
  2. 109
      chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysKnowledgeBaseController.java
  3. 24
      chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetPersonalInfoController.java
  4. 28
      chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java
  5. 206
      chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuMarketInfo.java
  6. 28
      chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuServiceGuide.java
  7. 61
      chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuMarketInfoMapper.java
  8. 61
      chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuMarketInfoService.java
  9. 95
      chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuMarketInfoServiceImpl.java
  10. 187
      chenhai-system/src/main/java/com/chenhai/system/domain/SysKnowledgeBase.java
  11. 79
      chenhai-system/src/main/java/com/chenhai/system/mapper/SysKnowledgeBaseMapper.java
  12. 69
      chenhai-system/src/main/java/com/chenhai/system/service/ISysKnowledgeBaseService.java
  13. 221
      chenhai-system/src/main/java/com/chenhai/system/service/impl/SysKnowledgeBaseServiceImpl.java
  14. 65
      chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java
  15. 5
      chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java
  16. 24
      chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml
  17. 110
      chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml
  18. 12
      chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml
  19. 133
      chenhai-system/src/main/resources/mapper/system/SysKnowledgeBaseMapper.xml
  20. 2
      chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml
  21. 44
      chenhai-ui/src/api/muhu/market.js
  22. 10
      chenhai-ui/src/api/system/base.js
  23. 11
      chenhai-ui/src/views/muhu/guide/index.vue
  24. 8
      chenhai-ui/src/views/muhu/info/index.vue
  25. 310
      chenhai-ui/src/views/muhu/market/index.vue
  26. 94
      chenhai-ui/src/views/system/base/index.vue
  27. 2
      chenhai-ui/src/views/vet/certificate/index.vue

104
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<MuhuMarketInfo> 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<MuhuMarketInfo> list = muhuMarketInfoService.selectMuhuMarketInfoList(muhuMarketInfo);
ExcelUtil<MuhuMarketInfo> util = new ExcelUtil<MuhuMarketInfo>(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));
}
}

109
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<SysKnowledgeBase> 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<SysKnowledgeBase> list = sysKnowledgeBaseService.selectSysKnowledgeBaseList(sysKnowledgeBase);
ExcelUtil<SysKnowledgeBase> util = new ExcelUtil<SysKnowledgeBase>(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<SysKnowledgeBase> list = sysKnowledgeBaseService.searchSysKnowledgeBaseByKeyword(keyword);
return getDataTable(list);
}
}

24
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")

28
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();
}
}

206
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();
}
}

28
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();
}
}

61
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<MuhuMarketInfo> 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);
}

61
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<MuhuMarketInfo> 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);
}

95
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<MuhuMarketInfo> 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);
}
}

187
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();
}
}

79
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<SysKnowledgeBase> 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<SysKnowledgeBase> searchSysKnowledgeBaseByKeyword(String keyword);
/**
* 模糊搜索知识库多关键词
*
* @param keywords 搜索关键词列表
* @return 知识库集合
*/
public List<SysKnowledgeBase> searchByKeywords(@Param("keywords") List<String> keywords);
}

69
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<SysKnowledgeBase> 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<SysKnowledgeBase> searchSysKnowledgeBaseByKeyword(String keyword);
}

221
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<SysKnowledgeBase> 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<SysKnowledgeBase> searchSysKnowledgeBaseByKeyword(String keyword) {
System.out.println("=== 开始搜索 ===");
System.out.println("原始输入: " + keyword);
// 1. 关键词提取
List<String> 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<String> extractKeywords(String input) {
if (StringUtils.isEmpty(input)) {
return new ArrayList<>();
}
// 中文停用词扩展版
List<String> stopWords = Arrays.asList(
"我的", "你的", "他的", "她的", "我们的",
"怎么办", "怎么", "如何", "什么", "为什么", "为何", "怎样",
"原因", "症状", "治疗", "预防", "诊断", "救治",
"请问", "求助", "帮忙", "帮帮我", "请问一下", "你好",
"症状", "表现", "特征", "现象", "情况", "问题",
"的", "了", "啊", "呢", "吗", "吧", "呀", "有"
);
// 移除标点符号
String cleaned = input.replaceAll("[,。!?、;:'\"(),.]", " ");
List<String> 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;
}
}

65
chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java

@ -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;
@ -129,6 +130,16 @@ public class VetPersonalInfo extends BaseEntity
return gender;
}
public void setIphone(String iphone)
{
this.iphone = iphone;
}
public String getIphone()
{
return iphone;
}
public void setBirthday(Date birthday)
{
this.birthday = birthday;
@ -169,16 +180,6 @@ 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)
{
this.address = address;
@ -189,14 +190,14 @@ public class VetPersonalInfo extends BaseEntity
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)
@ -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();
}
}

5
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
{

24
chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml

@ -13,11 +13,13 @@
<result property="address" column="address" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
<result property="iconPath" column="icon_path"/> <!-- 改为 icon_path -->
<result property="iconPath" column="icon_path"/>
<result property="name" column="name"/>
<result property="iphone" column="iphone"/>
</resultMap>
<sql id="selectMerchantMapInfoVo">
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
</sql>
<select id="selectMerchantMapInfoList" parameterType="MerchantMapInfo" resultMap="MerchantMapInfoResult">
@ -30,7 +32,9 @@
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="iconPath != null "> and icon_path = #{iconPath}</if> <!-- 改为 iconPath -->
<if test="iconPath != null "> and icon_path = #{iconPath}</if>
<if test="name != null"> and name = #{name}</if>
<if test="iphone != null"> and iphone = #{iphone}</if>
</where>
</select>
@ -49,7 +53,9 @@
<if test="address != null and address != ''">address,</if>
<if test="latitude != null">latitude,</if>
<if test="longitude != null">longitude,</if>
<if test="iconPath != null">icon_path,</if> <!-- 改为 iconPath -->
<if test="iconPath != null">icon_path,</if>
<if test="name != null and name != ''">name,</if>
<if test="iphone != null and iphone != ''">iphone,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
@ -59,21 +65,25 @@
<if test="address != null and address != ''">#{address},</if>
<if test="latitude != null">#{latitude},</if>
<if test="longitude != null">#{longitude},</if>
<if test="iconPath != null">#{iconPath},</if> <!-- 改为 iconPath -->
<if test="iconPath != null">#{iconPath},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="iphone != null and iphone != ''">#{iphone},</if>
</trim>
</insert>
<update id="updateMerchantMapInfo" parameterType="MerchantMapInfo">
update muhu_merchant_map_info
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if> <!-- 注意:改为 title 而不是 merchant_name -->
<if test="title != null and title != ''">title = #{title},</if>
<if test="merchantType != null and merchantType != ''">merchant_type = #{merchantType},</if>
<if test="merchantSubtype != null">merchant_subtype = #{merchantSubtype},</if>
<if test="region != null and region != ''">region = #{region},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="iconPath != null">icon_path = #{iconPath},</if> <!-- 改为 iconPath -->
<if test="iconPath != null">icon_path = #{iconPath},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="iphone != null and iphone != ''">iphone = #{iphone},</if>
</trim>
where id = #{id}
</update>

110
chenhai-system/src/main/resources/mapper/muhu/MuhuMarketInfoMapper.xml

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chenhai.muhu.mapper.MuhuMarketInfoMapper">
<resultMap type="MuhuMarketInfo" id="MuhuMarketInfoResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="infoType" column="info_type" />
<result property="publishSource" column="publish_source" />
<result property="region" column="region" />
<result property="attachmentUrl" column="attachment_url" />
<result property="viewCount" column="view_count" />
<result property="publishUserId" column="publish_user_id" />
<result property="isTop" column="is_top" />
<result property="status" column="status" />
<result property="publishTime" column="publish_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMuhuMarketInfoVo">
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
</sql>
<select id="selectMuhuMarketInfoList" parameterType="MuhuMarketInfo" resultMap="MuhuMarketInfoResult">
<include refid="selectMuhuMarketInfoVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="infoType != null and infoType != ''"> and info_type = #{infoType}</if>
<if test="publishSource != null and publishSource != ''"> and publish_source = #{publishSource}</if>
<if test="region != null and region != ''"> and region = #{region}</if>
<if test="attachmentUrl != null and attachmentUrl != ''"> and attachment_url = #{attachmentUrl}</if>
<if test="viewCount != null "> and view_count = #{viewCount}</if>
<if test="publishUserId != null "> and publish_user_id = #{publishUserId}</if>
<if test="isTop != null and isTop != ''"> and is_top = #{isTop}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="publishTime != null "> and publish_time = #{publishTime}</if>
</where>
</select>
<select id="selectMuhuMarketInfoById" parameterType="Long" resultMap="MuhuMarketInfoResult">
<include refid="selectMuhuMarketInfoVo"/>
where id = #{id}
</select>
<insert id="insertMuhuMarketInfo" parameterType="MuhuMarketInfo" useGeneratedKeys="true" keyProperty="id">
insert into muhu_market_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="content != null and content != ''">content,</if>
<if test="infoType != null and infoType != ''">info_type,</if>
<if test="publishSource != null and publishSource != ''">publish_source,</if>
<if test="region != null">region,</if>
<if test="attachmentUrl != null">attachment_url,</if>
<if test="viewCount != null">view_count,</if>
<if test="publishUserId != null">publish_user_id,</if>
<if test="isTop != null and isTop != ''">is_top,</if>
<if test="status != null and status != ''">status,</if>
<if test="publishTime != null">publish_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="infoType != null and infoType != ''">#{infoType},</if>
<if test="publishSource != null and publishSource != ''">#{publishSource},</if>
<if test="region != null">#{region},</if>
<if test="attachmentUrl != null">#{attachmentUrl},</if>
<if test="viewCount != null">#{viewCount},</if>
<if test="publishUserId != null">#{publishUserId},</if>
<if test="isTop != null and isTop != ''">#{isTop},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="publishTime != null">#{publishTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMuhuMarketInfo" parameterType="MuhuMarketInfo">
update muhu_market_info
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="infoType != null and infoType != ''">info_type = #{infoType},</if>
<if test="publishSource != null and publishSource != ''">publish_source = #{publishSource},</if>
<if test="region != null">region = #{region},</if>
<if test="attachmentUrl != null">attachment_url = #{attachmentUrl},</if>
<if test="viewCount != null">view_count = #{viewCount},</if>
<if test="publishUserId != null">publish_user_id = #{publishUserId},</if>
<if test="isTop != null and isTop != ''">is_top = #{isTop},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="publishTime != null">publish_time = #{publishTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMuhuMarketInfoById" parameterType="Long">
delete from muhu_market_info where id = #{id}
</delete>
<delete id="deleteMuhuMarketInfoByIds" parameterType="String">
delete from muhu_market_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

12
chenhai-system/src/main/resources/mapper/muhu/MuhuServiceGuideMapper.xml

@ -14,10 +14,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="address" column="address" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
<result property="name" column="name"/>
<result property="iphone" column="iphone"/>
</resultMap>
<sql id="selectMuhuServiceGuideVo">
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
</sql>
<select id="selectMuhuServiceGuideList" parameterType="MuhuServiceGuide" resultMap="MuhuServiceGuideResult">
@ -31,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="name != null"> and name = #{name}</if>
<if test="iphone != null"> and iphone = #{iphone}</if>
</where>
</select>
@ -50,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null">address,</if>
<if test="latitude != null">latitude,</if>
<if test="longitude != null">longitude,</if>
<if test="name != null and name != ''">name,</if>
<if test="iphone != null and iphone != ''">iphone,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="iconPath != null">#{iconPath},</if>
@ -60,6 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null">#{address},</if>
<if test="latitude != null">#{latitude},</if>
<if test="longitude != null">#{longitude},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="iphone != null and iphone != ''">#{iphone},</if>
</trim>
</insert>
@ -74,6 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="address != null">address = #{address},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="iphone != null and iphone != ''">iphone = #{iphone},</if>
</trim>
where id = #{id}
</update>

133
chenhai-system/src/main/resources/mapper/system/SysKnowledgeBaseMapper.xml

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chenhai.system.mapper.SysKnowledgeBaseMapper">
<resultMap type="SysKnowledgeBase" id="SysKnowledgeBaseResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="category" column="category" />
<result property="keywords" column="keywords" />
<result property="possibleDiseases" column="possible_diseases" />
<result property="severityLevel" column="severity_level" />
<result property="suggestions" column="suggestions" />
<result property="content" column="content" />
<result property="suitableSpecies" column="suitable_species" />
<result property="viewCount" column="view_count" />
<result property="status" column="status" />
</resultMap>
<sql id="selectSysKnowledgeBaseVo">
select id, title, category, keywords, possible_diseases, severity_level, suggestions, content, suitable_species, view_count, status from sys_knowledge_base
</sql>
<select id="selectSysKnowledgeBaseList" parameterType="SysKnowledgeBase" resultMap="SysKnowledgeBaseResult">
<include refid="selectSysKnowledgeBaseVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="category != null and category != ''"> and category = #{category}</if>
<if test="keywords != null and keywords != ''"> and keywords = #{keywords}</if>
<if test="possibleDiseases != null and possibleDiseases != ''"> and possible_diseases = #{possibleDiseases}</if>
<if test="severityLevel != null and severityLevel != ''"> and severity_level = #{severityLevel}</if>
<if test="suggestions != null and suggestions != ''"> and suggestions = #{suggestions}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="suitableSpecies != null and suitableSpecies != ''"> and suitable_species = #{suitableSpecies}</if>
<if test="viewCount != null "> and view_count = #{viewCount}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectSysKnowledgeBaseById" parameterType="Long" resultMap="SysKnowledgeBaseResult">
<include refid="selectSysKnowledgeBaseVo"/>
where id = #{id}
</select>
<insert id="insertSysKnowledgeBase" parameterType="SysKnowledgeBase" useGeneratedKeys="true" keyProperty="id">
insert into sys_knowledge_base
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="category != null and category != ''">category,</if>
<if test="keywords != null">keywords,</if>
<if test="possibleDiseases != null">possible_diseases,</if>
<if test="severityLevel != null">severity_level,</if>
<if test="suggestions != null">suggestions,</if>
<if test="content != null and content != ''">content,</if>
<if test="suitableSpecies != null">suitable_species,</if>
<if test="viewCount != null">view_count,</if>
<if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="category != null and category != ''">#{category},</if>
<if test="keywords != null">#{keywords},</if>
<if test="possibleDiseases != null">#{possibleDiseases},</if>
<if test="severityLevel != null">#{severityLevel},</if>
<if test="suggestions != null">#{suggestions},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="suitableSpecies != null">#{suitableSpecies},</if>
<if test="viewCount != null">#{viewCount},</if>
<if test="status != null">#{status},</if>
</trim>
</insert>
<update id="updateSysKnowledgeBase" parameterType="SysKnowledgeBase">
update sys_knowledge_base
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="category != null and category != ''">category = #{category},</if>
<if test="keywords != null">keywords = #{keywords},</if>
<if test="possibleDiseases != null">possible_diseases = #{possibleDiseases},</if>
<if test="severityLevel != null">severity_level = #{severityLevel},</if>
<if test="suggestions != null">suggestions = #{suggestions},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="suitableSpecies != null">suitable_species = #{suitableSpecies},</if>
<if test="viewCount != null">view_count = #{viewCount},</if>
<if test="status != null">status = #{status},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysKnowledgeBaseById" parameterType="Long">
delete from sys_knowledge_base where id = #{id}
</delete>
<delete id="deleteSysKnowledgeBaseByIds" parameterType="String">
delete from sys_knowledge_base where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!-- 新增:模糊搜索方法 -->
<select id="searchSysKnowledgeBaseByKeyword" parameterType="String" resultMap="SysKnowledgeBaseResult">
<include refid="selectSysKnowledgeBaseVo"/>
<where>
<if test="keyword != null and keyword != ''">
title like concat('%', #{keyword}, '%')
or category like concat('%', #{keyword}, '%')
or keywords like concat('%', #{keyword}, '%')
or possible_diseases like concat('%', #{keyword}, '%')
or suggestions like concat('%', #{keyword}, '%')
or content like concat('%', #{keyword}, '%')
</if>
</where>
order by view_count desc, id desc
</select>
<!-- 新增:多关键词搜索 -->
<select id="searchByKeywords" parameterType="map" resultMap="SysKnowledgeBaseResult">
<include refid="selectSysKnowledgeBaseVo"/>
<where>
<foreach collection="keywords" item="kw" open="(" separator=" OR " close=")">
title like concat('%', #{kw}, '%')
or category like concat('%', #{kw}, '%')
or keywords like concat('%', #{kw}, '%')
or possible_diseases like concat('%', #{kw}, '%')
or suggestions like concat('%', #{kw}, '%')
or content like concat('%', #{kw}, '%')
</foreach>
</where>
order by view_count desc, id desc
</select>
</mapper>

2
chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml

@ -113,11 +113,11 @@
<if test="userId != null">user_id = #{userId},</if>
<if test="realName != null">real_name = #{realName},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="iphone != null">iphone = #{iphone},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="specialty != null">specialty = #{specialty},</if>
<if test="workExperience != null">work_experience = #{workExperience},</if>
<if test="hospital != null">hospital = #{hospital},</if>
<if test="address != null">address = #{address},</if>
<if test="introduction != null">introduction = #{introduction},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>

44
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'
})
}

10
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,

11
chenhai-ui/src/views/muhu/guide/index.vue

@ -67,12 +67,15 @@
<template slot-scope="scope">
<image-preview :src="scope.row.iconPath" :width="50" :height="50" />
</template>
</el-table-column> <el-table-column label="商户名称" align="center" prop="title" />
</el-table-column>
<el-table-column label="商户名称" align="center" prop="title" />
<el-table-column label="商户类型" align="center" prop="guideType">
<template slot-scope="scope">
<dict-tag :options="dict.type.guide_type" :value="scope.row.guideType" />
</template>
</el-table-column>
<el-table-column label="联系人" align="center" prop="name" />
<el-table-column label="联系方式" align="center" prop="iphone" />
<el-table-column label="所在区域" align="center" prop="region" />
<el-table-column label="详细地址" align="center" prop="address" />
<el-table-column label="纬度" align="center" prop="latitude" />
@ -116,6 +119,12 @@
<el-form-item label="商户名称" prop="title">
<el-input v-model="form.title" placeholder="请输入商户名称" />
</el-form-item>
<el-form-item label="联系人" prop="title">
<el-input v-model="form.name" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="联系方式" prop="title">
<el-input v-model="form.iphone" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="所在区域" prop="region">
<el-input v-model="form.region" placeholder="请输入所在区域" />
</el-form-item>

8
chenhai-ui/src/views/muhu/info/index.vue

@ -74,6 +74,8 @@
<dict-tag :options="dict.type.merchant_type" :value="scope.row.merchantType" />
</template>
</el-table-column>
<el-table-column label="联系人" align="center" prop="name" />
<el-table-column label="联系方式" align="center" prop="iphone" />
<el-table-column label="所在区域" align="center" prop="region" />
<el-table-column label="详细地址" align="center" prop="address" />
<el-table-column label="纬度" align="center" prop="latitude" />
@ -117,6 +119,12 @@
<el-form-item label="商户名称" prop="title">
<el-input v-model="form.title" placeholder="请输入商户名称" />
</el-form-item>
<el-form-item label="联系人" prop="title">
<el-input v-model="form.name" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="联系方式" prop="title">
<el-input v-model="form.iphone" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="所在区域" prop="region">
<el-input v-model="form.region" placeholder="请输入所在区域" />
</el-form-item>

310
chenhai-ui/src/views/muhu/market/index.vue

@ -0,0 +1,310 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="信息标题" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入信息标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['muhu:market:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['muhu:market:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['muhu:market:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['muhu:market:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="marketList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="信息标题" align="center" prop="title" />
<el-table-column label="详细内容" align="center" prop="content" />
<el-table-column label="信息类型" align="center" prop="infoType" />
<el-table-column label="市场范围" align="center" prop="region" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['muhu:market:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['muhu:market:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改市场信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="信息标题" prop="title">
<el-input v-model="form.title" placeholder="请输入信息标题" />
</el-form-item>
<el-form-item label="详细内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
<el-form-item label="信息类型" prop="infoType">
<el-select v-model="form.infoType" placeholder="请选择信息类型" clearable>
<el-option v-for="dict in dict.type.info_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="市场范围" prop="region">
<el-input v-model="form.region" placeholder="请输入市场范围" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listMarket, getMarket, delMarket, addMarket, updateMarket } from "@/api/muhu/market"
export default {
name: "Market",
dicts: ['info_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
marketList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
title: null,
content: null,
infoType: null,
publishSource: null,
region: null,
attachmentUrl: null,
viewCount: null,
publishUserId: null,
isTop: null,
status: null,
publishTime: null,
},
//
form: {},
//
rules: {
title: [
{ required: true, message: "信息标题不能为空", trigger: "blur" }
],
content: [
{ required: true, message: "详细内容/报告正文不能为空", trigger: "blur" }
],
infoType: [
{ required: true, message: "信息类型:1-农牧产品销售;2-饲草料销售;3-畜产品市场价格;4-饲料供应商价格;5-市场趋势报告不能为空", trigger: "change" }
],
publishSource: [
{ required: true, message: "发布来源:1-管理员发布;2-系统关联不能为空", trigger: "blur" }
],
viewCount: [
{ required: true, message: "查看次数不能为空", trigger: "blur" }
],
publishUserId: [
{ required: true, message: "发布者ID不能为空", trigger: "blur" }
],
isTop: [
{ required: true, message: "是否置顶不能为空", trigger: "blur" }
],
status: [
{ required: true, message: "状态不能为空", trigger: "change" }
],
publishTime: [
{ required: true, message: "发布时间不能为空", trigger: "blur" }
],
updateTime: [
{ required: true, message: "更新时间不能为空", trigger: "blur" }
]
}
}
},
created() {
this.getList()
},
methods: {
/** 查询市场信息列表 */
getList() {
this.loading = true
listMarket(this.queryParams).then(response => {
this.marketList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
title: null,
content: null,
infoType: null,
publishSource: null,
region: null,
attachmentUrl: null,
viewCount: null,
publishUserId: null,
isTop: null,
status: null,
publishTime: null,
updateTime: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加市场信息"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getMarket(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改市场信息"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateMarket(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addMarket(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除市场信息编号为"' + ids + '"的数据项?').then(function() {
return delMarket(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('muhu/market/export', {
...this.queryParams
}, `market_${new Date().getTime()}.xlsx`)
}
}
}
</script>

94
chenhai-ui/src/views/system/base/index.vue

@ -9,22 +9,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="知识类别" prop="category">
<el-input
v-model="queryParams.category"
placeholder="请输入知识类别"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input
v-model="queryParams.author"
placeholder="请输入作者"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -80,18 +64,12 @@
<el-table v-loading="loading" :data="baseList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="知识标题" align="center" prop="title" />
<el-table-column label="知识类别" align="center" prop="category" />
<el-table-column label="关键词" align="center" prop="keywords" />
<el-table-column label="知识摘要" align="center" prop="summary" />
<el-table-column label="可能病症" align="center" prop="possibleDiseases" />
<el-table-column label="严重程度" align="center" prop="severityLevel" />
<el-table-column label="建议措施" align="center" prop="suggestions" />
<el-table-column label="详细内容" align="center" prop="content" />
<el-table-column label="适用物种" align="center" prop="applicableSpecies" />
<el-table-column label="来源名称" align="center" prop="sourceName" />
<el-table-column label="作者" align="center" prop="author" />
<el-table-column label="发布时间" align="center" prop="publishTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.publishTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="适用物种" align="center" prop="suitableSpecies" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -120,32 +98,31 @@
@pagination="getList"
/>
<!-- 添加或修改知识库管理对话框 -->
<!-- 添加或修改知识库对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="知识标题" prop="title">
<el-input v-model="form.title" placeholder="请输入知识标题" />
</el-form-item>
<el-form-item label="知识类别" prop="category">
<el-input v-model="form.category" placeholder="请输入知识类别" />
</el-form-item>
<el-form-item label="关键词" prop="keywords">
<el-input v-model="form.keywords" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="知识摘要" prop="summary">
<el-input v-model="form.summary" type="textarea" placeholder="请输入内容" />
<el-form-item label="可能病症" prop="possibleDiseases">
<el-input v-model="form.possibleDiseases" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="详细内容">
<editor v-model="form.content" :min-height="192"/>
<el-form-item label="严重程度" prop="severityLevel">
<el-select v-model="form.severityLevel" placeholder="请选择严重程度" clearable>
<el-option v-for="dict in dict.type.severity_level" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="适用物种" prop="applicableSpecies">
<el-input v-model="form.applicableSpecies" placeholder="请输入适用物种,逗号分隔" />
<el-form-item label="建议措施" prop="suggestions">
<el-input v-model="form.suggestions" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="来源名称" prop="sourceName">
<el-input v-model="form.sourceName" placeholder="请输入来源名称" />
<el-form-item label="详细内容">
<editor v-model="form.content" :min-height="192"/>
</el-form-item>
<el-form-item label="作者" prop="author">
<el-input v-model="form.author" placeholder="请输入作者" />
<el-form-item label="适用物种" prop="suitableSpecies">
<el-input v-model="form.suitableSpecies" placeholder="请输入适用物种,逗号分隔" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -161,6 +138,7 @@ import { listBase, getBase, delBase, addBase, updateBase } from "@/api/system/ba
export default {
name: "Base",
dicts: ['severity_level'],
data() {
return {
//
@ -175,7 +153,7 @@ export default {
showSearch: true,
//
total: 0,
//
//
baseList: [],
//
title: "",
@ -188,14 +166,13 @@ export default {
title: null,
category: null,
keywords: null,
summary: null,
possibleDiseases: null,
severityLevel: null,
suggestions: null,
content: null,
applicableSpecies: null,
sourceName: null,
author: null,
createdTime: null,
updatedTime: null,
publishTime: null
suitableSpecies: null,
viewCount: null,
status: null
},
//
form: {},
@ -217,7 +194,7 @@ export default {
this.getList()
},
methods: {
/** 查询知识库管理列表 */
/** 查询知识库列表 */
getList() {
this.loading = true
listBase(this.queryParams).then(response => {
@ -238,14 +215,13 @@ export default {
title: null,
category: null,
keywords: null,
summary: null,
possibleDiseases: null,
severityLevel: null,
suggestions: null,
content: null,
applicableSpecies: null,
sourceName: null,
author: null,
createdTime: null,
updatedTime: null,
publishTime: null
suitableSpecies: null,
viewCount: null,
status: null
}
this.resetForm("form")
},
@ -269,7 +245,7 @@ export default {
handleAdd() {
this.reset()
this.open = true
this.title = "添加知识库管理"
this.title = "添加知识库"
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -278,7 +254,7 @@ export default {
getBase(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改知识库管理"
this.title = "修改知识库"
})
},
/** 提交按钮 */
@ -304,7 +280,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除知识库管理编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除知识库编号为"' + ids + '"的数据项?').then(function() {
return delBase(ids)
}).then(() => {
this.getList()

2
chenhai-ui/src/views/vet/certificate/index.vue

@ -230,7 +230,7 @@
</template>
<script>
import { listCertificate, getCertificate, delCertificate, addCertificate, updateCertificate } from "@/api/system/certificate"
import { listCertificate, getCertificate, delCertificate, addCertificate, updateCertificate } from "@/api/vet/certificate"
export default {
name: "Certificate",

Loading…
Cancel
Save