From 742ac9134a6dd808196c894ded82627155fafc37 Mon Sep 17 00:00:00 2001 From: maotiantian Date: Tue, 30 Dec 2025 19:10:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A3=E4=BC=A0=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=92=8C=E7=81=BE=E5=AE=B3=E9=A2=84=E8=AD=A6=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muhu/CarouselAdsController.java | 14 +- .../muhu/DisasterWarningController.java | 104 ++++++ .../muhu/MerchantMapInfoController.java | 104 ++++++ .../system/KnowledgeBaseController.java | 104 ++++++ .../com/chenhai/muhu/domain/CarouselAds.java | 15 + .../chenhai/muhu/domain/DisasterWarning.java | 191 ++++++++++ .../chenhai/muhu/domain/MerchantMapInfo.java | 143 ++++++++ .../muhu/mapper/DisasterWarningMapper.java | 61 ++++ .../muhu/mapper/MerchantMapInfoMapper.java | 61 ++++ .../muhu/service/IDisasterWarningService.java | 61 ++++ .../muhu/service/IMerchantMapInfoService.java | 61 ++++ .../impl/DisasterWarningServiceImpl.java | 93 +++++ .../impl/MerchantMapInfoServiceImpl.java | 93 +++++ .../chenhai/system/domain/KnowledgeBase.java | 230 ++++++++++++ .../system/mapper/KnowledgeBaseMapper.java | 61 ++++ .../system/service/IKnowledgeBaseService.java | 61 ++++ .../impl/KnowledgeBaseServiceImpl.java | 93 +++++ .../mapper/muhu/CarouselAdsMapper.xml | 7 +- .../mapper/muhu/DisasterWarningMapper.xml | 101 ++++++ .../mapper/muhu/MerchantMapInfoMapper.xml | 86 +++++ .../mapper/system/KnowledgeBaseMapper.xml | 106 ++++++ chenhai-ui/src/api/muhu/ads.js | 44 +++ chenhai-ui/src/api/muhu/warning.js | 44 +++ chenhai-ui/src/views/muhu/ads/index.vue | 343 ++++++++++++++++++ chenhai-ui/src/views/muhu/warning/index.vue | 303 ++++++++++++++++ 25 files changed, 2576 insertions(+), 8 deletions(-) create mode 100644 chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.java create mode 100644 chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.java create mode 100644 chenhai-admin/src/main/java/com/chenhai/web/controller/system/KnowledgeBaseController.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/domain/DisasterWarning.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/mapper/DisasterWarningMapper.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/mapper/MerchantMapInfoMapper.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/service/IDisasterWarningService.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/service/IMerchantMapInfoService.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/service/impl/DisasterWarningServiceImpl.java create mode 100644 chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MerchantMapInfoServiceImpl.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java create mode 100644 chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java create mode 100644 chenhai-system/src/main/resources/mapper/muhu/DisasterWarningMapper.xml create mode 100644 chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml create mode 100644 chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml create mode 100644 chenhai-ui/src/api/muhu/ads.js create mode 100644 chenhai-ui/src/api/muhu/warning.js create mode 100644 chenhai-ui/src/views/muhu/ads/index.vue create mode 100644 chenhai-ui/src/views/muhu/warning/index.vue diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java index 8c35878..d59a60b 100644 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java @@ -22,7 +22,7 @@ import java.util.List; * @date 2025-12-26 */ @RestController -@RequestMapping("/system/ads") +@RequestMapping("/muhu/ads") public class CarouselAdsController extends BaseController { @Autowired @@ -31,7 +31,7 @@ public class CarouselAdsController extends BaseController /** * 查询轮播广告列表 */ - @PreAuthorize("@ss.hasPermi('system:ads:list')") + @PreAuthorize("@ss.hasPermi('muhu:ads:list')") @GetMapping("/list") public TableDataInfo list(CarouselAds carouselAds) { @@ -43,7 +43,7 @@ public class CarouselAdsController extends BaseController /** * 导出轮播广告列表 */ - @PreAuthorize("@ss.hasPermi('system:ads:export')") + @PreAuthorize("@ss.hasPermi('muhu:ads:export')") @Log(title = "轮播广告", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, CarouselAds carouselAds) @@ -56,7 +56,7 @@ public class CarouselAdsController extends BaseController /** * 获取轮播广告详细信息 */ - @PreAuthorize("@ss.hasPermi('system:ads:query')") + @PreAuthorize("@ss.hasPermi('muhu:ads:query')") @GetMapping(value = "/{carouselId}") public AjaxResult getInfo(@PathVariable("carouselId") Long carouselId) { @@ -66,7 +66,7 @@ public class CarouselAdsController extends BaseController /** * 新增轮播广告 */ - @PreAuthorize("@ss.hasPermi('system:ads:add')") + @PreAuthorize("@ss.hasPermi('muhu:ads:add')") @Log(title = "轮播广告", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody CarouselAds carouselAds) @@ -77,7 +77,7 @@ public class CarouselAdsController extends BaseController /** * 修改轮播广告 */ - @PreAuthorize("@ss.hasPermi('system:ads:edit')") + @PreAuthorize("@ss.hasPermi('muhu:ads:edit')") @Log(title = "轮播广告", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody CarouselAds carouselAds) @@ -88,7 +88,7 @@ public class CarouselAdsController extends BaseController /** * 删除轮播广告 */ - @PreAuthorize("@ss.hasPermi('system:ads:remove')") + @PreAuthorize("@ss.hasPermi('muhu:ads:remove')") @Log(title = "轮播广告", businessType = BusinessType.DELETE) @DeleteMapping("/{carouselIds}") public AjaxResult remove(@PathVariable Long[] carouselIds) diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.java new file mode 100644 index 0000000..16d4e53 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.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.DisasterWarning; +import com.chenhai.muhu.service.IDisasterWarningService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 灾害预警信息Controller + * + * @author ruoyi + * @date 2025-12-30 + */ +@RestController +@RequestMapping("/muhu/warning") +public class DisasterWarningController extends BaseController +{ + @Autowired + private IDisasterWarningService disasterWarningService; + + /** + * 查询灾害预警信息列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:warning:list')") + @GetMapping("/list") + public TableDataInfo list(DisasterWarning disasterWarning) + { + startPage(); + List list = disasterWarningService.selectDisasterWarningList(disasterWarning); + return getDataTable(list); + } + + /** + * 导出灾害预警信息列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:warning:export')") + @Log(title = "灾害预警信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DisasterWarning disasterWarning) + { + List list = disasterWarningService.selectDisasterWarningList(disasterWarning); + ExcelUtil util = new ExcelUtil(DisasterWarning.class); + util.exportExcel(response, list, "灾害预警信息数据"); + } + + /** + * 获取灾害预警信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:warning:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(disasterWarningService.selectDisasterWarningById(id)); + } + + /** + * 新增灾害预警信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:warning:add')") + @Log(title = "灾害预警信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DisasterWarning disasterWarning) + { + return toAjax(disasterWarningService.insertDisasterWarning(disasterWarning)); + } + + /** + * 修改灾害预警信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:warning:edit')") + @Log(title = "灾害预警信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DisasterWarning disasterWarning) + { + return toAjax(disasterWarningService.updateDisasterWarning(disasterWarning)); + } + + /** + * 删除灾害预警信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:warning:remove')") + @Log(title = "灾害预警信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(disasterWarningService.deleteDisasterWarningByIds(ids)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.java new file mode 100644 index 0000000..a0a0c60 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.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.MerchantMapInfo; +import com.chenhai.muhu.service.IMerchantMapInfoService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 商户地图信息Controller + * + * @author ruoyi + * @date 2025-12-30 + */ +@RestController +@RequestMapping("/muhu/info") +public class MerchantMapInfoController extends BaseController +{ + @Autowired + private IMerchantMapInfoService merchantMapInfoService; + + /** + * 查询商户地图信息列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:info:list')") + @GetMapping("/list") + public TableDataInfo list(MerchantMapInfo merchantMapInfo) + { + startPage(); + List list = merchantMapInfoService.selectMerchantMapInfoList(merchantMapInfo); + return getDataTable(list); + } + + /** + * 导出商户地图信息列表 + */ + @PreAuthorize("@ss.hasPermi('muhu:info:export')") + @Log(title = "商户地图信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MerchantMapInfo merchantMapInfo) + { + List list = merchantMapInfoService.selectMerchantMapInfoList(merchantMapInfo); + ExcelUtil util = new ExcelUtil(MerchantMapInfo.class); + util.exportExcel(response, list, "商户地图信息数据"); + } + + /** + * 获取商户地图信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(merchantMapInfoService.selectMerchantMapInfoById(id)); + } + + /** + * 新增商户地图信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:info:add')") + @Log(title = "商户地图信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MerchantMapInfo merchantMapInfo) + { + return toAjax(merchantMapInfoService.insertMerchantMapInfo(merchantMapInfo)); + } + + /** + * 修改商户地图信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:info:edit')") + @Log(title = "商户地图信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MerchantMapInfo merchantMapInfo) + { + return toAjax(merchantMapInfoService.updateMerchantMapInfo(merchantMapInfo)); + } + + /** + * 删除商户地图信息 + */ + @PreAuthorize("@ss.hasPermi('muhu:info:remove')") + @Log(title = "商户地图信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(merchantMapInfoService.deleteMerchantMapInfoByIds(ids)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/KnowledgeBaseController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/KnowledgeBaseController.java new file mode 100644 index 0000000..825aa61 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/KnowledgeBaseController.java @@ -0,0 +1,104 @@ +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.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.system.domain.KnowledgeBase; +import com.chenhai.system.service.IKnowledgeBaseService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 知识库管理Controller + * + * @author ruoyi + * @date 2025-12-30 + */ +@RestController +@RequestMapping("/system/base") +public class KnowledgeBaseController extends BaseController +{ + @Autowired + private IKnowledgeBaseService knowledgeBaseService; + + /** + * 查询知识库管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:base:list')") + @GetMapping("/list") + public TableDataInfo list(KnowledgeBase knowledgeBase) + { + startPage(); + List list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase); + return getDataTable(list); + } + + /** + * 导出知识库管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:base:export')") + @Log(title = "知识库管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, KnowledgeBase knowledgeBase) + { + List list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase); + ExcelUtil util = new ExcelUtil(KnowledgeBase.class); + util.exportExcel(response, list, "知识库管理数据"); + } + + /** + * 获取知识库管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:base:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(knowledgeBaseService.selectKnowledgeBaseById(id)); + } + + /** + * 新增知识库管理 + */ + @PreAuthorize("@ss.hasPermi('system:base:add')") + @Log(title = "知识库管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase) + { + return toAjax(knowledgeBaseService.insertKnowledgeBase(knowledgeBase)); + } + + /** + * 修改知识库管理 + */ + @PreAuthorize("@ss.hasPermi('system:base:edit')") + @Log(title = "知识库管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody KnowledgeBase knowledgeBase) + { + return toAjax(knowledgeBaseService.updateKnowledgeBase(knowledgeBase)); + } + + /** + * 删除知识库管理 + */ + @PreAuthorize("@ss.hasPermi('system:base:remove')") + @Log(title = "知识库管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(knowledgeBaseService.deleteKnowledgeBaseByIds(ids)); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/CarouselAds.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/CarouselAds.java index c435ef6..fb5d3af 100644 --- a/chenhai-system/src/main/java/com/chenhai/muhu/domain/CarouselAds.java +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/CarouselAds.java @@ -36,6 +36,10 @@ public class CarouselAds extends BaseEntity @Excel(name = "图片替代文本") private String altText; + /** 轮播类型 */ + @Excel(name = "轮播类型") + private String adsType; + /** 图片尺寸 */ @Excel(name = "图片尺寸") private String imageSize; @@ -145,6 +149,16 @@ public class CarouselAds extends BaseEntity @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") private Date updatedAt; + public void setAdsType(String adsType) + { + this.adsType = adsType; + } + + public String getAdsType() + { + return adsType; + } + public void setCarouselId(Long carouselId) { this.carouselId = carouselId; @@ -489,6 +503,7 @@ public class CarouselAds extends BaseEntity .append("createdBy", getCreatedBy()) .append("createdAt", getCreatedAt()) .append("updatedAt", getUpdatedAt()) + .append("adsType",getAdsType()) .toString(); } } diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/domain/DisasterWarning.java b/chenhai-system/src/main/java/com/chenhai/muhu/domain/DisasterWarning.java new file mode 100644 index 0000000..024feaa --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/DisasterWarning.java @@ -0,0 +1,191 @@ +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; + +/** + * 灾害预警信息对象 disaster_warning + * + * @author ruoyi + * @date 2025-12-30 + */ +public class DisasterWarning extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 预警ID */ + private Long id; + + /** 预警类型:天气/疫病/环境 */ + @Excel(name = "预警类型:天气/疫病/环境") + private String warningType; + + /** 预警级别:蓝/黄/橙/红 */ + @Excel(name = "预警级别:蓝/黄/橙/红") + private String warningLevel; + + /** 预警编码(如:TEMP001) */ + @Excel(name = "预警编码", readConverterExp = "如=:TEMP001") + private String warningCode; + + /** 预警标题 */ + @Excel(name = "预警标题") + private String title; + + /** 简要内容(用于弹窗显示) */ + @Excel(name = "简要内容", readConverterExp = "用=于弹窗显示") + private String briefContent; + + /** 详细内容 */ + @Excel(name = "详细内容") + private String detailContent; + + /** 应对措施 */ + @Excel(name = "应对措施") + private String responseMeasures; + + /** 影响区域列表,如:["左旗", "右旗", "额旗"] */ + @Excel(name = "影响区域列表") + private String affectedRegions; + + /** 最后更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastUpdated; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setWarningType(String warningType) + { + this.warningType = warningType; + } + + public String getWarningType() + { + return warningType; + } + + public void setWarningLevel(String warningLevel) + { + this.warningLevel = warningLevel; + } + + public String getWarningLevel() + { + return warningLevel; + } + + public void setWarningCode(String warningCode) + { + this.warningCode = warningCode; + } + + public String getWarningCode() + { + return warningCode; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + + public void setBriefContent(String briefContent) + { + this.briefContent = briefContent; + } + + public String getBriefContent() + { + return briefContent; + } + + public void setDetailContent(String detailContent) + { + this.detailContent = detailContent; + } + + public String getDetailContent() + { + return detailContent; + } + + public void setResponseMeasures(String responseMeasures) + { + this.responseMeasures = responseMeasures; + } + + public String getResponseMeasures() + { + return responseMeasures; + } + + public void setAffectedRegions(String affectedRegions) + { + this.affectedRegions = affectedRegions; + } + + public String getAffectedRegions() + { + return affectedRegions; + } + + public void setLastUpdated(Date lastUpdated) + { + this.lastUpdated = lastUpdated; + } + + public Date getLastUpdated() + { + return lastUpdated; + } + + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("warningType", getWarningType()) + .append("warningLevel", getWarningLevel()) + .append("warningCode", getWarningCode()) + .append("title", getTitle()) + .append("briefContent", getBriefContent()) + .append("detailContent", getDetailContent()) + .append("responseMeasures", getResponseMeasures()) + .append("affectedRegions", getAffectedRegions()) + .append("lastUpdated", getLastUpdated()) + .append("createdTime", getCreatedTime()) + .toString(); + } +} 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 new file mode 100644 index 0000000..94a41de --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java @@ -0,0 +1,143 @@ +package com.chenhai.muhu.domain; + +import java.math.BigDecimal; +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; + +/** + * 商户地图信息对象 merchant_map_info + * + * @author ruoyi + * @date 2025-12-30 + */ +public class MerchantMapInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 商户ID */ + private Long id; + + /** 商户名称 */ + @Excel(name = "商户名称") + private String merchantName; + + /** 商户类型:药店/兽医诊所/畜牧站/农牧局/其他 */ + @Excel(name = "商户类型:药店/兽医诊所/畜牧站/农牧局/其他") + private String merchantType; + + /** 商户子类型(如:药店_兽药、药店_人药) */ + @Excel(name = "商户子类型", readConverterExp = "如=:药店_兽药、药店_人药") + private String merchantSubtype; + + /** 所在区域 */ + @Excel(name = "所在区域") + private String region; + + /** 详细地址 */ + @Excel(name = "详细地址") + private String address; + + /** 纬度 */ + @Excel(name = "纬度") + private BigDecimal latitude; + + /** 经度 */ + @Excel(name = "经度") + private BigDecimal longitude; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setMerchantName(String merchantName) + { + this.merchantName = merchantName; + } + + public String getMerchantName() + { + return merchantName; + } + + public void setMerchantType(String merchantType) + { + this.merchantType = merchantType; + } + + public String getMerchantType() + { + return merchantType; + } + + public void setMerchantSubtype(String merchantSubtype) + { + this.merchantSubtype = merchantSubtype; + } + + public String getMerchantSubtype() + { + return merchantSubtype; + } + + public void setRegion(String region) + { + this.region = region; + } + + public String getRegion() + { + return region; + } + + public void setAddress(String address) + { + this.address = address; + } + + public String getAddress() + { + return address; + } + + public void setLatitude(BigDecimal latitude) + { + this.latitude = latitude; + } + + public BigDecimal getLatitude() + { + return latitude; + } + + public void setLongitude(BigDecimal longitude) + { + this.longitude = longitude; + } + + public BigDecimal getLongitude() + { + return longitude; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("merchantName", getMerchantName()) + .append("merchantType", getMerchantType()) + .append("merchantSubtype", getMerchantSubtype()) + .append("region", getRegion()) + .append("address", getAddress()) + .append("latitude", getLatitude()) + .append("longitude", getLongitude()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/DisasterWarningMapper.java b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/DisasterWarningMapper.java new file mode 100644 index 0000000..bec24c1 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/DisasterWarningMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.mapper; + +import java.util.List; +import com.chenhai.muhu.domain.DisasterWarning; + +/** + * 灾害预警信息Mapper接口 + * + * @author ruoyi + * @date 2025-12-30 + */ +public interface DisasterWarningMapper +{ + /** + * 查询灾害预警信息 + * + * @param id 灾害预警信息主键 + * @return 灾害预警信息 + */ + public DisasterWarning selectDisasterWarningById(Long id); + + /** + * 查询灾害预警信息列表 + * + * @param disasterWarning 灾害预警信息 + * @return 灾害预警信息集合 + */ + public List selectDisasterWarningList(DisasterWarning disasterWarning); + + /** + * 新增灾害预警信息 + * + * @param disasterWarning 灾害预警信息 + * @return 结果 + */ + public int insertDisasterWarning(DisasterWarning disasterWarning); + + /** + * 修改灾害预警信息 + * + * @param disasterWarning 灾害预警信息 + * @return 结果 + */ + public int updateDisasterWarning(DisasterWarning disasterWarning); + + /** + * 删除灾害预警信息 + * + * @param id 灾害预警信息主键 + * @return 结果 + */ + public int deleteDisasterWarningById(Long id); + + /** + * 批量删除灾害预警信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDisasterWarningByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MerchantMapInfoMapper.java b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MerchantMapInfoMapper.java new file mode 100644 index 0000000..69f4ab1 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/mapper/MerchantMapInfoMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.mapper; + +import java.util.List; +import com.chenhai.muhu.domain.MerchantMapInfo; + +/** + * 商户地图信息Mapper接口 + * + * @author ruoyi + * @date 2025-12-30 + */ +public interface MerchantMapInfoMapper +{ + /** + * 查询商户地图信息 + * + * @param id 商户地图信息主键 + * @return 商户地图信息 + */ + public MerchantMapInfo selectMerchantMapInfoById(Long id); + + /** + * 查询商户地图信息列表 + * + * @param merchantMapInfo 商户地图信息 + * @return 商户地图信息集合 + */ + public List selectMerchantMapInfoList(MerchantMapInfo merchantMapInfo); + + /** + * 新增商户地图信息 + * + * @param merchantMapInfo 商户地图信息 + * @return 结果 + */ + public int insertMerchantMapInfo(MerchantMapInfo merchantMapInfo); + + /** + * 修改商户地图信息 + * + * @param merchantMapInfo 商户地图信息 + * @return 结果 + */ + public int updateMerchantMapInfo(MerchantMapInfo merchantMapInfo); + + /** + * 删除商户地图信息 + * + * @param id 商户地图信息主键 + * @return 结果 + */ + public int deleteMerchantMapInfoById(Long id); + + /** + * 批量删除商户地图信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMerchantMapInfoByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/IDisasterWarningService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IDisasterWarningService.java new file mode 100644 index 0000000..eaeb458 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/IDisasterWarningService.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.service; + +import java.util.List; +import com.chenhai.muhu.domain.DisasterWarning; + +/** + * 灾害预警信息Service接口 + * + * @author ruoyi + * @date 2025-12-30 + */ +public interface IDisasterWarningService +{ + /** + * 查询灾害预警信息 + * + * @param id 灾害预警信息主键 + * @return 灾害预警信息 + */ + public DisasterWarning selectDisasterWarningById(Long id); + + /** + * 查询灾害预警信息列表 + * + * @param disasterWarning 灾害预警信息 + * @return 灾害预警信息集合 + */ + public List selectDisasterWarningList(DisasterWarning disasterWarning); + + /** + * 新增灾害预警信息 + * + * @param disasterWarning 灾害预警信息 + * @return 结果 + */ + public int insertDisasterWarning(DisasterWarning disasterWarning); + + /** + * 修改灾害预警信息 + * + * @param disasterWarning 灾害预警信息 + * @return 结果 + */ + public int updateDisasterWarning(DisasterWarning disasterWarning); + + /** + * 批量删除灾害预警信息 + * + * @param ids 需要删除的灾害预警信息主键集合 + * @return 结果 + */ + public int deleteDisasterWarningByIds(Long[] ids); + + /** + * 删除灾害预警信息信息 + * + * @param id 灾害预警信息主键 + * @return 结果 + */ + public int deleteDisasterWarningById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/IMerchantMapInfoService.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMerchantMapInfoService.java new file mode 100644 index 0000000..c21b3c7 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/IMerchantMapInfoService.java @@ -0,0 +1,61 @@ +package com.chenhai.muhu.service; + +import java.util.List; +import com.chenhai.muhu.domain.MerchantMapInfo; + +/** + * 商户地图信息Service接口 + * + * @author ruoyi + * @date 2025-12-30 + */ +public interface IMerchantMapInfoService +{ + /** + * 查询商户地图信息 + * + * @param id 商户地图信息主键 + * @return 商户地图信息 + */ + public MerchantMapInfo selectMerchantMapInfoById(Long id); + + /** + * 查询商户地图信息列表 + * + * @param merchantMapInfo 商户地图信息 + * @return 商户地图信息集合 + */ + public List selectMerchantMapInfoList(MerchantMapInfo merchantMapInfo); + + /** + * 新增商户地图信息 + * + * @param merchantMapInfo 商户地图信息 + * @return 结果 + */ + public int insertMerchantMapInfo(MerchantMapInfo merchantMapInfo); + + /** + * 修改商户地图信息 + * + * @param merchantMapInfo 商户地图信息 + * @return 结果 + */ + public int updateMerchantMapInfo(MerchantMapInfo merchantMapInfo); + + /** + * 批量删除商户地图信息 + * + * @param ids 需要删除的商户地图信息主键集合 + * @return 结果 + */ + public int deleteMerchantMapInfoByIds(Long[] ids); + + /** + * 删除商户地图信息信息 + * + * @param id 商户地图信息主键 + * @return 结果 + */ + public int deleteMerchantMapInfoById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/DisasterWarningServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/DisasterWarningServiceImpl.java new file mode 100644 index 0000000..bb3c48e --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/DisasterWarningServiceImpl.java @@ -0,0 +1,93 @@ +package com.chenhai.muhu.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.muhu.mapper.DisasterWarningMapper; +import com.chenhai.muhu.domain.DisasterWarning; +import com.chenhai.muhu.service.IDisasterWarningService; + +/** + * 灾害预警信息Service业务层处理 + * + * @author ruoyi + * @date 2025-12-30 + */ +@Service +public class DisasterWarningServiceImpl implements IDisasterWarningService +{ + @Autowired + private DisasterWarningMapper disasterWarningMapper; + + /** + * 查询灾害预警信息 + * + * @param id 灾害预警信息主键 + * @return 灾害预警信息 + */ + @Override + public DisasterWarning selectDisasterWarningById(Long id) + { + return disasterWarningMapper.selectDisasterWarningById(id); + } + + /** + * 查询灾害预警信息列表 + * + * @param disasterWarning 灾害预警信息 + * @return 灾害预警信息 + */ + @Override + public List selectDisasterWarningList(DisasterWarning disasterWarning) + { + return disasterWarningMapper.selectDisasterWarningList(disasterWarning); + } + + /** + * 新增灾害预警信息 + * + * @param disasterWarning 灾害预警信息 + * @return 结果 + */ + @Override + public int insertDisasterWarning(DisasterWarning disasterWarning) + { + return disasterWarningMapper.insertDisasterWarning(disasterWarning); + } + + /** + * 修改灾害预警信息 + * + * @param disasterWarning 灾害预警信息 + * @return 结果 + */ + @Override + public int updateDisasterWarning(DisasterWarning disasterWarning) + { + return disasterWarningMapper.updateDisasterWarning(disasterWarning); + } + + /** + * 批量删除灾害预警信息 + * + * @param ids 需要删除的灾害预警信息主键 + * @return 结果 + */ + @Override + public int deleteDisasterWarningByIds(Long[] ids) + { + return disasterWarningMapper.deleteDisasterWarningByIds(ids); + } + + /** + * 删除灾害预警信息信息 + * + * @param id 灾害预警信息主键 + * @return 结果 + */ + @Override + public int deleteDisasterWarningById(Long id) + { + return disasterWarningMapper.deleteDisasterWarningById(id); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MerchantMapInfoServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MerchantMapInfoServiceImpl.java new file mode 100644 index 0000000..e5044ce --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MerchantMapInfoServiceImpl.java @@ -0,0 +1,93 @@ +package com.chenhai.muhu.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.muhu.mapper.MerchantMapInfoMapper; +import com.chenhai.muhu.domain.MerchantMapInfo; +import com.chenhai.muhu.service.IMerchantMapInfoService; + +/** + * 商户地图信息Service业务层处理 + * + * @author ruoyi + * @date 2025-12-30 + */ +@Service +public class MerchantMapInfoServiceImpl implements IMerchantMapInfoService +{ + @Autowired + private MerchantMapInfoMapper merchantMapInfoMapper; + + /** + * 查询商户地图信息 + * + * @param id 商户地图信息主键 + * @return 商户地图信息 + */ + @Override + public MerchantMapInfo selectMerchantMapInfoById(Long id) + { + return merchantMapInfoMapper.selectMerchantMapInfoById(id); + } + + /** + * 查询商户地图信息列表 + * + * @param merchantMapInfo 商户地图信息 + * @return 商户地图信息 + */ + @Override + public List selectMerchantMapInfoList(MerchantMapInfo merchantMapInfo) + { + return merchantMapInfoMapper.selectMerchantMapInfoList(merchantMapInfo); + } + + /** + * 新增商户地图信息 + * + * @param merchantMapInfo 商户地图信息 + * @return 结果 + */ + @Override + public int insertMerchantMapInfo(MerchantMapInfo merchantMapInfo) + { + return merchantMapInfoMapper.insertMerchantMapInfo(merchantMapInfo); + } + + /** + * 修改商户地图信息 + * + * @param merchantMapInfo 商户地图信息 + * @return 结果 + */ + @Override + public int updateMerchantMapInfo(MerchantMapInfo merchantMapInfo) + { + return merchantMapInfoMapper.updateMerchantMapInfo(merchantMapInfo); + } + + /** + * 批量删除商户地图信息 + * + * @param ids 需要删除的商户地图信息主键 + * @return 结果 + */ + @Override + public int deleteMerchantMapInfoByIds(Long[] ids) + { + return merchantMapInfoMapper.deleteMerchantMapInfoByIds(ids); + } + + /** + * 删除商户地图信息信息 + * + * @param id 商户地图信息主键 + * @return 结果 + */ + @Override + public int deleteMerchantMapInfoById(Long id) + { + return merchantMapInfoMapper.deleteMerchantMapInfoById(id); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java b/chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java new file mode 100644 index 0000000..ea36dd1 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java @@ -0,0 +1,230 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 知识库管理对象 knowledge_base + */ +public class KnowledgeBase extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 知识ID */ + private Long id; + + /** 知识标题 */ + @Excel(name = "知识标题") + private String title; + + /** 知识类别 */ + @Excel(name = "知识类别") + private String category; + + /** 关键词,逗号分隔(用于搜索) */ + @Excel(name = "关键词") + private String keywords; + + /** 知识摘要 */ + @Excel(name = "知识摘要") + private String summary; + + /** 详细内容 */ + @Excel(name = "详细内容") + private String content; + + /** 适用物种,逗号分隔(如:鸡,鸭,猪,牛,羊) */ + @Excel(name = "适用物种") + private String applicableSpecies; + + /** 来源名称 */ + @Excel(name = "来源名称") + private String sourceName; + + /** 作者 */ + @Excel(name = "作者") + private String author; + + /** 状态(DRAFT草稿/PUBLISHED已发布/ARCHIVED已归档) */ + @Excel(name = "状态", readConverterExp = "D=RAFT草稿/PUBLISHED已发布/ARCHIVED已归档") + private String status; + + /** 是否推荐(0否 1是) */ + @Excel(name = "是否推荐", readConverterExp = "0=否,1=是") + private String isRecommended; + + /** 查看次数 */ + @Excel(name = "查看次数") + private Long viewCount; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date updatedTime; + + /** 发布时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date publishTime; + + // 以下是BaseEntity可能已有的字段,如果BaseEntity没有则需要添加 + /** 创建者 */ + @Excel(name = "创建者") + private String createBy; + + /** 更新者 */ + @Excel(name = "更新者") + private String updateBy; + + // getter和setter方法 + public void setId(Long id) { + this.id = id; + } + public Long getId() { + return id; + } + + public void setTitle(String title) { + this.title = title; + } + public String getTitle() { + return title; + } + + public void setCategory(String category) { + this.category = category; + } + public String getCategory() { + return category; + } + + public void setKeywords(String keywords) { + this.keywords = keywords; + } + public String getKeywords() { + return keywords; + } + + public void setSummary(String summary) { + this.summary = summary; + } + public String getSummary() { + return summary; + } + + public void setContent(String content) { + this.content = content; + } + public String getContent() { + return content; + } + + public void setApplicableSpecies(String applicableSpecies) { + this.applicableSpecies = applicableSpecies; + } + public String getApplicableSpecies() { + return applicableSpecies; + } + + public void setSourceName(String sourceName) { + this.sourceName = sourceName; + } + public String getSourceName() { + return sourceName; + } + + public void setAuthor(String author) { + this.author = author; + } + public String getAuthor() { + return author; + } + + public void setStatus(String status) { + this.status = status; + } + public String getStatus() { + return status; + } + + public void setIsRecommended(String isRecommended) { + this.isRecommended = isRecommended; + } + public String getIsRecommended() { + return isRecommended; + } + + public void setViewCount(Long viewCount) { + this.viewCount = viewCount; + } + public Long getViewCount() { + return viewCount; + } + + public void setCreatedTime(Date createdTime) { + this.createdTime = createdTime; + } + public Date getCreatedTime() { + return createdTime; + } + + public void setUpdatedTime(Date updatedTime) { + this.updatedTime = updatedTime; + } + public Date getUpdatedTime() { + return updatedTime; + } + + public void setPublishTime(Date publishTime) { + this.publishTime = publishTime; + } + public Date getPublishTime() { + return publishTime; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public String getCreateBy() { + return createBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + public String getUpdateBy() { + return updateBy; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("category", getCategory()) + .append("keywords", getKeywords()) + .append("summary", getSummary()) + .append("content", getContent()) + .append("applicableSpecies", getApplicableSpecies()) + .append("sourceName", getSourceName()) + .append("author", getAuthor()) + .append("status", getStatus()) + .append("isRecommended", getIsRecommended()) + .append("viewCount", getViewCount()) + .append("createdTime", getCreatedTime()) + .append("updatedTime", getUpdatedTime()) + .append("publishTime", getPublishTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} \ No newline at end of file diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java new file mode 100644 index 0000000..e0e9294 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.KnowledgeBase; + +/** + * 知识库管理Mapper接口 + * + * @author ruoyi + * @date 2025-12-30 + */ +public interface KnowledgeBaseMapper +{ + /** + * 查询知识库管理 + * + * @param id 知识库管理主键 + * @return 知识库管理 + */ + public KnowledgeBase selectKnowledgeBaseById(Long id); + + /** + * 查询知识库管理列表 + * + * @param knowledgeBase 知识库管理 + * @return 知识库管理集合 + */ + public List selectKnowledgeBaseList(KnowledgeBase knowledgeBase); + + /** + * 新增知识库管理 + * + * @param knowledgeBase 知识库管理 + * @return 结果 + */ + public int insertKnowledgeBase(KnowledgeBase knowledgeBase); + + /** + * 修改知识库管理 + * + * @param knowledgeBase 知识库管理 + * @return 结果 + */ + public int updateKnowledgeBase(KnowledgeBase knowledgeBase); + + /** + * 删除知识库管理 + * + * @param id 知识库管理主键 + * @return 结果 + */ + public int deleteKnowledgeBaseById(Long id); + + /** + * 批量删除知识库管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteKnowledgeBaseByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java b/chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java new file mode 100644 index 0000000..990a248 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java @@ -0,0 +1,61 @@ +package com.chenhai.system.service; + +import java.util.List; +import com.chenhai.system.domain.KnowledgeBase; + +/** + * 知识库管理Service接口 + * + * @author ruoyi + * @date 2025-12-30 + */ +public interface IKnowledgeBaseService +{ + /** + * 查询知识库管理 + * + * @param id 知识库管理主键 + * @return 知识库管理 + */ + public KnowledgeBase selectKnowledgeBaseById(Long id); + + /** + * 查询知识库管理列表 + * + * @param knowledgeBase 知识库管理 + * @return 知识库管理集合 + */ + public List selectKnowledgeBaseList(KnowledgeBase knowledgeBase); + + /** + * 新增知识库管理 + * + * @param knowledgeBase 知识库管理 + * @return 结果 + */ + public int insertKnowledgeBase(KnowledgeBase knowledgeBase); + + /** + * 修改知识库管理 + * + * @param knowledgeBase 知识库管理 + * @return 结果 + */ + public int updateKnowledgeBase(KnowledgeBase knowledgeBase); + + /** + * 批量删除知识库管理 + * + * @param ids 需要删除的知识库管理主键集合 + * @return 结果 + */ + public int deleteKnowledgeBaseByIds(Long[] ids); + + /** + * 删除知识库管理信息 + * + * @param id 知识库管理主键 + * @return 结果 + */ + public int deleteKnowledgeBaseById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java new file mode 100644 index 0000000..efea76f --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java @@ -0,0 +1,93 @@ +package com.chenhai.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.system.mapper.KnowledgeBaseMapper; +import com.chenhai.system.domain.KnowledgeBase; +import com.chenhai.system.service.IKnowledgeBaseService; + +/** + * 知识库管理Service业务层处理 + * + * @author ruoyi + * @date 2025-12-30 + */ +@Service +public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService +{ + @Autowired + private KnowledgeBaseMapper knowledgeBaseMapper; + + /** + * 查询知识库管理 + * + * @param id 知识库管理主键 + * @return 知识库管理 + */ + @Override + public KnowledgeBase selectKnowledgeBaseById(Long id) + { + return knowledgeBaseMapper.selectKnowledgeBaseById(id); + } + + /** + * 查询知识库管理列表 + * + * @param knowledgeBase 知识库管理 + * @return 知识库管理 + */ + @Override + public List selectKnowledgeBaseList(KnowledgeBase knowledgeBase) + { + return knowledgeBaseMapper.selectKnowledgeBaseList(knowledgeBase); + } + + /** + * 新增知识库管理 + * + * @param knowledgeBase 知识库管理 + * @return 结果 + */ + @Override + public int insertKnowledgeBase(KnowledgeBase knowledgeBase) + { + return knowledgeBaseMapper.insertKnowledgeBase(knowledgeBase); + } + + /** + * 修改知识库管理 + * + * @param knowledgeBase 知识库管理 + * @return 结果 + */ + @Override + public int updateKnowledgeBase(KnowledgeBase knowledgeBase) + { + return knowledgeBaseMapper.updateKnowledgeBase(knowledgeBase); + } + + /** + * 批量删除知识库管理 + * + * @param ids 需要删除的知识库管理主键 + * @return 结果 + */ + @Override + public int deleteKnowledgeBaseByIds(Long[] ids) + { + return knowledgeBaseMapper.deleteKnowledgeBaseByIds(ids); + } + + /** + * 删除知识库管理信息 + * + * @param id 知识库管理主键 + * @return 结果 + */ + @Override + public int deleteKnowledgeBaseById(Long id) + { + return knowledgeBaseMapper.deleteKnowledgeBaseById(id); + } +} diff --git a/chenhai-system/src/main/resources/mapper/muhu/CarouselAdsMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/CarouselAdsMapper.xml index e4070fc..dc961f6 100644 --- a/chenhai-system/src/main/resources/mapper/muhu/CarouselAdsMapper.xml +++ b/chenhai-system/src/main/resources/mapper/muhu/CarouselAdsMapper.xml @@ -36,10 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select carousel_id, title, subtitle, image_url, alt_text, image_size, bg_color, text_color, button_text, button_class, link_type, link_url, link_params, sort_order, display_type, is_active, start_time, end_time, is_always_valid, caption_position, caption_style, button_style, display_count, click_count, status, review_notes, reviewed_by, reviewed_at, created_by, created_at, updated_at from carousel_ads + select carousel_id, title, subtitle, image_url, alt_text, image_size, bg_color, text_color, button_text, button_class, link_type, link_url, link_params, sort_order, display_type, is_active, start_time, end_time, is_always_valid, caption_position, caption_style, button_style, display_count, click_count, status, review_notes, reviewed_by, reviewed_at, created_by, created_at, updated_at, ads_type from muhu_carousel_ads @@ -116,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" created_by, created_at, updated_at, + ads_type, #{title}, @@ -148,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createdBy}, #{createdAt}, #{updatedAt}, + #{adsType}, @@ -184,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" created_by = #{createdBy}, created_at = #{createdAt}, updated_at = #{updatedAt}, + ads_type = #{adsType} where carousel_id = #{carouselId} diff --git a/chenhai-system/src/main/resources/mapper/muhu/DisasterWarningMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/DisasterWarningMapper.xml new file mode 100644 index 0000000..322f611 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/muhu/DisasterWarningMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + select id, warning_type, warning_level, warning_code, title, brief_content, detail_content, response_measures, affected_regions, last_updated, created_time from muhu_disaster_warning + + + + + + + + insert into disaster_warning + + warning_type, + warning_level, + warning_code, + title, + brief_content, + detail_content, + response_measures, + affected_regions, + last_updated, + created_time, + + + #{warningType}, + #{warningLevel}, + #{warningCode}, + #{title}, + #{briefContent}, + #{detailContent}, + #{responseMeasures}, + #{affectedRegions}, + #{lastUpdated}, + #{createdTime}, + + + + + update disaster_warning + + warning_type = #{warningType}, + warning_level = #{warningLevel}, + warning_code = #{warningCode}, + title = #{title}, + brief_content = #{briefContent}, + detail_content = #{detailContent}, + response_measures = #{responseMeasures}, + affected_regions = #{affectedRegions}, + last_updated = #{lastUpdated}, + created_time = #{createdTime}, + + where id = #{id} + + + + delete from disaster_warning where id = #{id} + + + + delete from disaster_warning where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml b/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml new file mode 100644 index 0000000..2798d5a --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + select id, merchant_name, merchant_type, merchant_subtype, region, address, latitude, longitude from merchant_map_info + + + + + + + + insert into merchant_map_info + + merchant_name, + merchant_type, + merchant_subtype, + region, + address, + latitude, + longitude, + + + #{merchantName}, + #{merchantType}, + #{merchantSubtype}, + #{region}, + #{address}, + #{latitude}, + #{longitude}, + + + + + update merchant_map_info + + merchant_name = #{merchantName}, + merchant_type = #{merchantType}, + merchant_subtype = #{merchantSubtype}, + region = #{region}, + address = #{address}, + latitude = #{latitude}, + longitude = #{longitude}, + + where id = #{id} + + + + delete from merchant_map_info where id = #{id} + + + + delete from merchant_map_info where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml b/chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml new file mode 100644 index 0000000..9ab5a3e --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + select id, title, category, keywords, summary, content, applicable_species, source_name, author, created_time, updated_time, publish_time from knowledge_base + + + + + + + + insert into knowledge_base + + title, + category, + keywords, + summary, + content, + applicable_species, + source_name, + author, + created_time, + updated_time, + publish_time, + + + #{title}, + #{category}, + #{keywords}, + #{summary}, + #{content}, + #{applicableSpecies}, + #{sourceName}, + #{author}, + #{createdTime}, + #{updatedTime}, + #{publishTime}, + + + + + update knowledge_base + + title = #{title}, + category = #{category}, + keywords = #{keywords}, + summary = #{summary}, + content = #{content}, + applicable_species = #{applicableSpecies}, + source_name = #{sourceName}, + author = #{author}, + created_time = #{createdTime}, + updated_time = #{updatedTime}, + publish_time = #{publishTime}, + + where id = #{id} + + + + delete from knowledge_base where id = #{id} + + + + delete from knowledge_base where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-ui/src/api/muhu/ads.js b/chenhai-ui/src/api/muhu/ads.js new file mode 100644 index 0000000..a638a47 --- /dev/null +++ b/chenhai-ui/src/api/muhu/ads.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询轮播广告列表 +export function listAds(query) { + return request({ + url: '/muhu/ads/list', + method: 'get', + params: query + }) +} + +// 查询轮播广告详细 +export function getAds(carouselId) { + return request({ + url: '/muhu/ads/' + carouselId, + method: 'get' + }) +} + +// 新增轮播广告 +export function addAds(data) { + return request({ + url: '/muhu/ads', + method: 'post', + data: data + }) +} + +// 修改轮播广告 +export function updateAds(data) { + return request({ + url: '/muhu/ads', + method: 'put', + data: data + }) +} + +// 删除轮播广告 +export function delAds(carouselId) { + return request({ + url: '/muhu/ads/' + carouselId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/muhu/warning.js b/chenhai-ui/src/api/muhu/warning.js new file mode 100644 index 0000000..74481e2 --- /dev/null +++ b/chenhai-ui/src/api/muhu/warning.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询灾害预警信息列表 +export function listWarning(query) { + return request({ + url: '/muhu/warning/list', + method: 'get', + params: query + }) +} + +// 查询灾害预警信息详细 +export function getWarning(id) { + return request({ + url: '/muhu/warning/' + id, + method: 'get' + }) +} + +// 新增灾害预警信息 +export function addWarning(data) { + return request({ + url: '/muhu/warning', + method: 'post', + data: data + }) +} + +// 修改灾害预警信息 +export function updateWarning(data) { + return request({ + url: '/muhu/warning', + method: 'put', + data: data + }) +} + +// 删除灾害预警信息 +export function delWarning(id) { + return request({ + url: '/muhu/warning/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/views/muhu/ads/index.vue b/chenhai-ui/src/views/muhu/ads/index.vue new file mode 100644 index 0000000..76aabdc --- /dev/null +++ b/chenhai-ui/src/views/muhu/ads/index.vue @@ -0,0 +1,343 @@ + + + diff --git a/chenhai-ui/src/views/muhu/warning/index.vue b/chenhai-ui/src/views/muhu/warning/index.vue new file mode 100644 index 0000000..b3d5f67 --- /dev/null +++ b/chenhai-ui/src/views/muhu/warning/index.vue @@ -0,0 +1,303 @@ + + +