25 changed files with 2576 additions and 8 deletions
-
14chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/CarouselAdsController.java
-
104chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/DisasterWarningController.java
-
104chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MerchantMapInfoController.java
-
104chenhai-admin/src/main/java/com/chenhai/web/controller/system/KnowledgeBaseController.java
-
15chenhai-system/src/main/java/com/chenhai/muhu/domain/CarouselAds.java
-
191chenhai-system/src/main/java/com/chenhai/muhu/domain/DisasterWarning.java
-
143chenhai-system/src/main/java/com/chenhai/muhu/domain/MerchantMapInfo.java
-
61chenhai-system/src/main/java/com/chenhai/muhu/mapper/DisasterWarningMapper.java
-
61chenhai-system/src/main/java/com/chenhai/muhu/mapper/MerchantMapInfoMapper.java
-
61chenhai-system/src/main/java/com/chenhai/muhu/service/IDisasterWarningService.java
-
61chenhai-system/src/main/java/com/chenhai/muhu/service/IMerchantMapInfoService.java
-
93chenhai-system/src/main/java/com/chenhai/muhu/service/impl/DisasterWarningServiceImpl.java
-
93chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MerchantMapInfoServiceImpl.java
-
230chenhai-system/src/main/java/com/chenhai/system/domain/KnowledgeBase.java
-
61chenhai-system/src/main/java/com/chenhai/system/mapper/KnowledgeBaseMapper.java
-
61chenhai-system/src/main/java/com/chenhai/system/service/IKnowledgeBaseService.java
-
93chenhai-system/src/main/java/com/chenhai/system/service/impl/KnowledgeBaseServiceImpl.java
-
7chenhai-system/src/main/resources/mapper/muhu/CarouselAdsMapper.xml
-
101chenhai-system/src/main/resources/mapper/muhu/DisasterWarningMapper.xml
-
86chenhai-system/src/main/resources/mapper/muhu/MerchantMapInfoMapper.xml
-
106chenhai-system/src/main/resources/mapper/system/KnowledgeBaseMapper.xml
-
44chenhai-ui/src/api/muhu/ads.js
-
44chenhai-ui/src/api/muhu/warning.js
-
343chenhai-ui/src/views/muhu/ads/index.vue
-
303chenhai-ui/src/views/muhu/warning/index.vue
@ -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<DisasterWarning> 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<DisasterWarning> list = disasterWarningService.selectDisasterWarningList(disasterWarning); |
|||
ExcelUtil<DisasterWarning> util = new ExcelUtil<DisasterWarning>(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)); |
|||
} |
|||
} |
|||
@ -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<MerchantMapInfo> 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<MerchantMapInfo> list = merchantMapInfoService.selectMerchantMapInfoList(merchantMapInfo); |
|||
ExcelUtil<MerchantMapInfo> util = new ExcelUtil<MerchantMapInfo>(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)); |
|||
} |
|||
} |
|||
@ -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<KnowledgeBase> 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<KnowledgeBase> list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase); |
|||
ExcelUtil<KnowledgeBase> util = new ExcelUtil<KnowledgeBase>(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)); |
|||
} |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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<DisasterWarning> 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); |
|||
} |
|||
@ -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<MerchantMapInfo> 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); |
|||
} |
|||
@ -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<DisasterWarning> 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); |
|||
} |
|||
@ -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<MerchantMapInfo> 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); |
|||
} |
|||
@ -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<DisasterWarning> 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); |
|||
} |
|||
} |
|||
@ -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<MerchantMapInfo> 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); |
|||
} |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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<KnowledgeBase> 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); |
|||
} |
|||
@ -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<KnowledgeBase> 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); |
|||
} |
|||
@ -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<KnowledgeBase> 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); |
|||
} |
|||
} |
|||
@ -0,0 +1,101 @@ |
|||
<?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.DisasterWarningMapper"> |
|||
|
|||
<resultMap type="DisasterWarning" id="DisasterWarningResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="warningType" column="warning_type" /> |
|||
<result property="warningLevel" column="warning_level" /> |
|||
<result property="warningCode" column="warning_code" /> |
|||
<result property="title" column="title" /> |
|||
<result property="briefContent" column="brief_content" /> |
|||
<result property="detailContent" column="detail_content" /> |
|||
<result property="responseMeasures" column="response_measures" /> |
|||
<result property="affectedRegions" column="affected_regions" /> |
|||
<result property="lastUpdated" column="last_updated" /> |
|||
<result property="createdTime" column="created_time" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectDisasterWarningVo"> |
|||
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 |
|||
</sql> |
|||
|
|||
<select id="selectDisasterWarningList" parameterType="DisasterWarning" resultMap="DisasterWarningResult"> |
|||
<include refid="selectDisasterWarningVo"/> |
|||
<where> |
|||
<if test="warningType != null and warningType != ''"> and warning_type = #{warningType}</if> |
|||
<if test="warningLevel != null and warningLevel != ''"> and warning_level = #{warningLevel}</if> |
|||
<if test="warningCode != null and warningCode != ''"> and warning_code = #{warningCode}</if> |
|||
<if test="title != null and title != ''"> and title = #{title}</if> |
|||
<if test="briefContent != null and briefContent != ''"> and brief_content = #{briefContent}</if> |
|||
<if test="detailContent != null and detailContent != ''"> and detail_content = #{detailContent}</if> |
|||
<if test="responseMeasures != null and responseMeasures != ''"> and response_measures = #{responseMeasures}</if> |
|||
<if test="affectedRegions != null and affectedRegions != ''"> and affected_regions = #{affectedRegions}</if> |
|||
<if test="lastUpdated != null "> and last_updated = #{lastUpdated}</if> |
|||
<if test="createdTime != null "> and created_time = #{createdTime}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDisasterWarningById" parameterType="Long" resultMap="DisasterWarningResult"> |
|||
<include refid="selectDisasterWarningVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertDisasterWarning" parameterType="DisasterWarning" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into disaster_warning |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="warningType != null and warningType != ''">warning_type,</if> |
|||
<if test="warningLevel != null and warningLevel != ''">warning_level,</if> |
|||
<if test="warningCode != null">warning_code,</if> |
|||
<if test="title != null and title != ''">title,</if> |
|||
<if test="briefContent != null">brief_content,</if> |
|||
<if test="detailContent != null and detailContent != ''">detail_content,</if> |
|||
<if test="responseMeasures != null">response_measures,</if> |
|||
<if test="affectedRegions != null and affectedRegions != ''">affected_regions,</if> |
|||
<if test="lastUpdated != null">last_updated,</if> |
|||
<if test="createdTime != null">created_time,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="warningType != null and warningType != ''">#{warningType},</if> |
|||
<if test="warningLevel != null and warningLevel != ''">#{warningLevel},</if> |
|||
<if test="warningCode != null">#{warningCode},</if> |
|||
<if test="title != null and title != ''">#{title},</if> |
|||
<if test="briefContent != null">#{briefContent},</if> |
|||
<if test="detailContent != null and detailContent != ''">#{detailContent},</if> |
|||
<if test="responseMeasures != null">#{responseMeasures},</if> |
|||
<if test="affectedRegions != null and affectedRegions != ''">#{affectedRegions},</if> |
|||
<if test="lastUpdated != null">#{lastUpdated},</if> |
|||
<if test="createdTime != null">#{createdTime},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateDisasterWarning" parameterType="DisasterWarning"> |
|||
update disaster_warning |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="warningType != null and warningType != ''">warning_type = #{warningType},</if> |
|||
<if test="warningLevel != null and warningLevel != ''">warning_level = #{warningLevel},</if> |
|||
<if test="warningCode != null">warning_code = #{warningCode},</if> |
|||
<if test="title != null and title != ''">title = #{title},</if> |
|||
<if test="briefContent != null">brief_content = #{briefContent},</if> |
|||
<if test="detailContent != null and detailContent != ''">detail_content = #{detailContent},</if> |
|||
<if test="responseMeasures != null">response_measures = #{responseMeasures},</if> |
|||
<if test="affectedRegions != null and affectedRegions != ''">affected_regions = #{affectedRegions},</if> |
|||
<if test="lastUpdated != null">last_updated = #{lastUpdated},</if> |
|||
<if test="createdTime != null">created_time = #{createdTime},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteDisasterWarningById" parameterType="Long"> |
|||
delete from disaster_warning where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteDisasterWarningByIds" parameterType="String"> |
|||
delete from disaster_warning where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
|||
@ -0,0 +1,86 @@ |
|||
<?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.MerchantMapInfoMapper"> |
|||
|
|||
<resultMap type="MerchantMapInfo" id="MerchantMapInfoResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="merchantName" column="merchant_name" /> |
|||
<result property="merchantType" column="merchant_type" /> |
|||
<result property="merchantSubtype" column="merchant_subtype" /> |
|||
<result property="region" column="region" /> |
|||
<result property="address" column="address" /> |
|||
<result property="latitude" column="latitude" /> |
|||
<result property="longitude" column="longitude" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectMerchantMapInfoVo"> |
|||
select id, merchant_name, merchant_type, merchant_subtype, region, address, latitude, longitude from merchant_map_info |
|||
</sql> |
|||
|
|||
<select id="selectMerchantMapInfoList" parameterType="MerchantMapInfo" resultMap="MerchantMapInfoResult"> |
|||
<include refid="selectMerchantMapInfoVo"/> |
|||
<where> |
|||
<if test="merchantName != null and merchantName != ''"> and merchant_name like concat('%', #{merchantName}, '%')</if> |
|||
<if test="merchantType != null and merchantType != ''"> and merchant_type = #{merchantType}</if> |
|||
<if test="merchantSubtype != null and merchantSubtype != ''"> and merchant_subtype = #{merchantSubtype}</if> |
|||
<if test="region != null and region != ''"> and region = #{region}</if> |
|||
<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> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectMerchantMapInfoById" parameterType="Long" resultMap="MerchantMapInfoResult"> |
|||
<include refid="selectMerchantMapInfoVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertMerchantMapInfo" parameterType="MerchantMapInfo" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into merchant_map_info |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="merchantName != null and merchantName != ''">merchant_name,</if> |
|||
<if test="merchantType != null and merchantType != ''">merchant_type,</if> |
|||
<if test="merchantSubtype != null">merchant_subtype,</if> |
|||
<if test="region != null and region != ''">region,</if> |
|||
<if test="address != null and address != ''">address,</if> |
|||
<if test="latitude != null">latitude,</if> |
|||
<if test="longitude != null">longitude,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="merchantName != null and merchantName != ''">#{merchantName},</if> |
|||
<if test="merchantType != null and merchantType != ''">#{merchantType},</if> |
|||
<if test="merchantSubtype != null">#{merchantSubtype},</if> |
|||
<if test="region != null and region != ''">#{region},</if> |
|||
<if test="address != null and address != ''">#{address},</if> |
|||
<if test="latitude != null">#{latitude},</if> |
|||
<if test="longitude != null">#{longitude},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateMerchantMapInfo" parameterType="MerchantMapInfo"> |
|||
update merchant_map_info |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="merchantName != null and merchantName != ''">merchant_name = #{merchantName},</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> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteMerchantMapInfoById" parameterType="Long"> |
|||
delete from merchant_map_info where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteMerchantMapInfoByIds" parameterType="String"> |
|||
delete from merchant_map_info where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
|||
@ -0,0 +1,106 @@ |
|||
<?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.KnowledgeBaseMapper"> |
|||
|
|||
<resultMap type="KnowledgeBase" id="KnowledgeBaseResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="title" column="title" /> |
|||
<result property="category" column="category" /> |
|||
<result property="keywords" column="keywords" /> |
|||
<result property="summary" column="summary" /> |
|||
<result property="content" column="content" /> |
|||
<result property="applicableSpecies" column="applicable_species" /> |
|||
<result property="sourceName" column="source_name" /> |
|||
<result property="author" column="author" /> |
|||
<result property="createdTime" column="created_time" /> |
|||
<result property="updatedTime" column="updated_time" /> |
|||
<result property="publishTime" column="publish_time" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectKnowledgeBaseVo"> |
|||
select id, title, category, keywords, summary, content, applicable_species, source_name, author, created_time, updated_time, publish_time from knowledge_base |
|||
</sql> |
|||
|
|||
<select id="selectKnowledgeBaseList" parameterType="KnowledgeBase" resultMap="KnowledgeBaseResult"> |
|||
<include refid="selectKnowledgeBaseVo"/> |
|||
<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="summary != null and summary != ''"> and summary = #{summary}</if> |
|||
<if test="content != null and content != ''"> and content = #{content}</if> |
|||
<if test="applicableSpecies != null and applicableSpecies != ''"> and applicable_species = #{applicableSpecies}</if> |
|||
<if test="sourceName != null and sourceName != ''"> and source_name like concat('%', #{sourceName}, '%')</if> |
|||
<if test="author != null and author != ''"> and author = #{author}</if> |
|||
<if test="createdTime != null "> and created_time = #{createdTime}</if> |
|||
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if> |
|||
<if test="publishTime != null "> and publish_time = #{publishTime}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectKnowledgeBaseById" parameterType="Long" resultMap="KnowledgeBaseResult"> |
|||
<include refid="selectKnowledgeBaseVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertKnowledgeBase" parameterType="KnowledgeBase" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into 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="summary != null">summary,</if> |
|||
<if test="content != null and content != ''">content,</if> |
|||
<if test="applicableSpecies != null">applicable_species,</if> |
|||
<if test="sourceName != null">source_name,</if> |
|||
<if test="author != null">author,</if> |
|||
<if test="createdTime != null">created_time,</if> |
|||
<if test="updatedTime != null">updated_time,</if> |
|||
<if test="publishTime != null">publish_time,</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="summary != null">#{summary},</if> |
|||
<if test="content != null and content != ''">#{content},</if> |
|||
<if test="applicableSpecies != null">#{applicableSpecies},</if> |
|||
<if test="sourceName != null">#{sourceName},</if> |
|||
<if test="author != null">#{author},</if> |
|||
<if test="createdTime != null">#{createdTime},</if> |
|||
<if test="updatedTime != null">#{updatedTime},</if> |
|||
<if test="publishTime != null">#{publishTime},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateKnowledgeBase" parameterType="KnowledgeBase"> |
|||
update 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="summary != null">summary = #{summary},</if> |
|||
<if test="content != null and content != ''">content = #{content},</if> |
|||
<if test="applicableSpecies != null">applicable_species = #{applicableSpecies},</if> |
|||
<if test="sourceName != null">source_name = #{sourceName},</if> |
|||
<if test="author != null">author = #{author},</if> |
|||
<if test="createdTime != null">created_time = #{createdTime},</if> |
|||
<if test="updatedTime != null">updated_time = #{updatedTime},</if> |
|||
<if test="publishTime != null">publish_time = #{publishTime},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteKnowledgeBaseById" parameterType="Long"> |
|||
delete from knowledge_base where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteKnowledgeBaseByIds" parameterType="String"> |
|||
delete from knowledge_base where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
|||
@ -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' |
|||
}) |
|||
} |
|||
@ -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' |
|||
}) |
|||
} |
|||
@ -0,0 +1,343 @@ |
|||
<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 label="广告副标题" prop="subtitle"> |
|||
<el-input |
|||
v-model="queryParams.subtitle" |
|||
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:ads: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:ads: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:ads: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:ads:export']" |
|||
>导出</el-button> |
|||
</el-col> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table v-loading="loading" :data="adsList" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column label="轮播类型" align="center" prop="adsType"> |
|||
<template slot-scope="scope"> |
|||
<dict-tag :options="dict.type.ads_type" :value="scope.row.adsType" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="广告标题" align="center" prop="title" /> |
|||
<el-table-column label="广告副标题" align="center" prop="subtitle" /> |
|||
<el-table-column label="图片" align="center" prop="imageUrl" width="100"> |
|||
<template slot-scope="scope"> |
|||
<image-preview :src="scope.row.imageUrl" :width="50" :height="50" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="跳转链接" align="center" prop="linkUrl" /> |
|||
<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:ads:edit']" |
|||
>修改</el-button> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['muhu:ads: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="adsType"> |
|||
<el-select v-model="form.adsType" placeholder="请选择轮播类型" clearable> |
|||
<el-option v-for="dict in dict.type.ads_type" :key="dict.value" :label="dict.label" :value="dict.value" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="广告标题" prop="title"> |
|||
<el-input v-model="form.title" placeholder="请输入广告标题" /> |
|||
</el-form-item> |
|||
<el-form-item label="广告副标题" prop="subtitle"> |
|||
<el-input v-model="form.subtitle" placeholder="请输入广告副标题" /> |
|||
</el-form-item> |
|||
<el-form-item label="图片" prop="imageUrl"> |
|||
<image-upload v-model="form.imageUrl" /> |
|||
</el-form-item> |
|||
<el-form-item label="跳转链接" prop="linkUrl"> |
|||
<el-input v-model="form.linkUrl" type="textarea" 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 { listAds, getAds, delAds, addAds, updateAds } from "@/api/muhu/ads" |
|||
|
|||
export default { |
|||
name: "Ads", |
|||
dicts: ['ads_type'], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 轮播广告表格数据 |
|||
adsList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
title: null, |
|||
subtitle: null, |
|||
imageUrl: null, |
|||
altText: null, |
|||
imageSize: null, |
|||
bgColor: null, |
|||
textColor: null, |
|||
buttonText: null, |
|||
buttonClass: null, |
|||
linkType: null, |
|||
linkUrl: null, |
|||
linkParams: null, |
|||
sortOrder: null, |
|||
displayType: null, |
|||
isActive: null, |
|||
startTime: null, |
|||
endTime: null, |
|||
isAlwaysValid: null, |
|||
captionPosition: null, |
|||
captionStyle: null, |
|||
buttonStyle: null, |
|||
displayCount: null, |
|||
clickCount: null, |
|||
status: null, |
|||
reviewNotes: null, |
|||
reviewedBy: null, |
|||
reviewedAt: null, |
|||
createdBy: null, |
|||
createdAt: null, |
|||
updatedAt: null |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
title: [ |
|||
{ required: true, message: "广告标题不能为空", trigger: "blur" } |
|||
], |
|||
imageUrl: [ |
|||
{ required: true, message: "图片URL不能为空", trigger: "blur" } |
|||
], |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
}, |
|||
methods: { |
|||
/** 查询轮播广告列表 */ |
|||
getList() { |
|||
this.loading = true |
|||
listAds(this.queryParams).then(response => { |
|||
this.adsList = response.rows |
|||
this.total = response.total |
|||
this.loading = false |
|||
}) |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false |
|||
this.reset() |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
carouselId: null, |
|||
title: null, |
|||
subtitle: null, |
|||
imageUrl: null, |
|||
altText: null, |
|||
imageSize: null, |
|||
bgColor: null, |
|||
textColor: null, |
|||
buttonText: null, |
|||
buttonClass: null, |
|||
linkType: null, |
|||
linkUrl: null, |
|||
linkParams: null, |
|||
sortOrder: null, |
|||
displayType: null, |
|||
isActive: null, |
|||
startTime: null, |
|||
endTime: null, |
|||
isAlwaysValid: null, |
|||
captionPosition: null, |
|||
captionStyle: null, |
|||
buttonStyle: null, |
|||
displayCount: null, |
|||
clickCount: null, |
|||
status: null, |
|||
reviewNotes: null, |
|||
reviewedBy: null, |
|||
reviewedAt: null, |
|||
createdBy: null, |
|||
createdAt: null, |
|||
updatedAt: 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.carouselId) |
|||
this.single = selection.length!==1 |
|||
this.multiple = !selection.length |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset() |
|||
this.open = true |
|||
this.title = "添加轮播广告" |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset() |
|||
const carouselId = row.carouselId || this.ids |
|||
getAds(carouselId).then(response => { |
|||
this.form = response.data |
|||
this.open = true |
|||
this.title = "修改轮播广告" |
|||
}) |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate(valid => { |
|||
if (valid) { |
|||
if (this.form.carouselId != null) { |
|||
updateAds(this.form).then(response => { |
|||
this.$modal.msgSuccess("修改成功") |
|||
this.open = false |
|||
this.getList() |
|||
}) |
|||
} else { |
|||
addAds(this.form).then(response => { |
|||
this.$modal.msgSuccess("新增成功") |
|||
this.open = false |
|||
this.getList() |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const carouselIds = row.carouselId || this.ids |
|||
this.$modal.confirm('是否确认删除轮播广告编号为"' + carouselIds + '"的数据项?').then(function() { |
|||
return delAds(carouselIds) |
|||
}).then(() => { |
|||
this.getList() |
|||
this.$modal.msgSuccess("删除成功") |
|||
}).catch(() => {}) |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
this.download('muhu/ads/export', { |
|||
...this.queryParams |
|||
}, `ads_${new Date().getTime()}.xlsx`) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
@ -0,0 +1,303 @@ |
|||
<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:warning: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:warning: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:warning: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:warning:export']" |
|||
>导出</el-button> |
|||
</el-col> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table v-loading="loading" :data="warningList" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column label="预警类型" align="center" prop="warningType" /> |
|||
<el-table-column label="预警级别" align="center" prop="warningLevel" /> |
|||
<el-table-column label="预警标题" align="center" prop="title" /> |
|||
<el-table-column label="简要内容" align="center" prop="briefContent" /> |
|||
<el-table-column label="详细内容" align="center" prop="detailContent" /> |
|||
<el-table-column label="应对措施" align="center" prop="responseMeasures" /> |
|||
<el-table-column label="影响区域" align="center" prop="affectedRegions" /> |
|||
<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:warning:edit']" |
|||
>修改</el-button> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['muhu:warning: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="warningType"> |
|||
<el-select v-model="form.warningType" placeholder="请选择预警类型" clearable> |
|||
<el-option v-for="dict in dict.type.warning_type" :key="dict.value" :label="dict.label" :value="dict.value" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="预警级别" prop="warningLevel"> |
|||
<el-select v-model="form.warningLevel" placeholder="请选择预警级别" clearable> |
|||
<el-option v-for="dict in dict.type.warning_level" :key="dict.value" :label="dict.label" :value="dict.value" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="预警标题" prop="title"> |
|||
<el-input v-model="form.title" placeholder="请输入预警标题" /> |
|||
</el-form-item> |
|||
<el-form-item label="简要内容"> |
|||
<editor v-model="form.briefContent" :min-height="192"/> |
|||
</el-form-item> |
|||
<el-form-item label="详细内容"> |
|||
<editor v-model="form.detailContent" :min-height="192"/> |
|||
</el-form-item> |
|||
<el-form-item label="应对措施" prop="responseMeasures"> |
|||
<el-input v-model="form.responseMeasures" type="textarea" placeholder="请输入内容" /> |
|||
</el-form-item> |
|||
<el-form-item label="影响区域" prop="affectedRegions"> |
|||
<el-input v-model="form.affectedRegions" 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 { listWarning, getWarning, delWarning, addWarning, updateWarning } from "@/api/muhu/warning" |
|||
|
|||
export default { |
|||
name: "Warning", |
|||
dicts: ['warning_type', 'warning_level'], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 灾害预警信息表格数据 |
|||
warningList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
warningType: null, |
|||
warningLevel: null, |
|||
warningCode: null, |
|||
title: null, |
|||
briefContent: null, |
|||
detailContent: null, |
|||
responseMeasures: null, |
|||
affectedRegions: null, |
|||
lastUpdated: null, |
|||
createdTime: null |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
warningType: [ |
|||
{ required: true, message: "预警类型:天气/疫病/环境不能为空", trigger: "change" } |
|||
], |
|||
warningLevel: [ |
|||
{ required: true, message: "预警级别:蓝/黄/橙/红不能为空", trigger: "blur" } |
|||
], |
|||
title: [ |
|||
{ required: true, message: "预警标题不能为空", trigger: "blur" } |
|||
], |
|||
detailContent: [ |
|||
{ required: true, message: "详细内容不能为空", trigger: "blur" } |
|||
], |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
}, |
|||
methods: { |
|||
/** 查询灾害预警信息列表 */ |
|||
getList() { |
|||
this.loading = true |
|||
listWarning(this.queryParams).then(response => { |
|||
this.warningList = response.rows |
|||
this.total = response.total |
|||
this.loading = false |
|||
}) |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false |
|||
this.reset() |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
warningType: null, |
|||
warningLevel: null, |
|||
warningCode: null, |
|||
title: null, |
|||
briefContent: null, |
|||
detailContent: null, |
|||
responseMeasures: null, |
|||
affectedRegions: null, |
|||
lastUpdated: null, |
|||
createdTime: 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 |
|||
getWarning(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) { |
|||
updateWarning(this.form).then(response => { |
|||
this.$modal.msgSuccess("修改成功") |
|||
this.open = false |
|||
this.getList() |
|||
}) |
|||
} else { |
|||
addWarning(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 delWarning(ids) |
|||
}).then(() => { |
|||
this.getList() |
|||
this.$modal.msgSuccess("删除成功") |
|||
}).catch(() => {}) |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
this.download('muhu/warning/export', { |
|||
...this.queryParams |
|||
}, `warning_${new Date().getTime()}.xlsx`) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue