From 22b2416258aace9035a78eb46dce73b838e0372d Mon Sep 17 00:00:00 2001 From: TiaStars Date: Thu, 12 Oct 2023 14:16:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=8D=E4=BA=91=EF=BC=8C=E8=88=86=E6=83=85?= =?UTF-8?q?=E8=B5=B0=E5=8A=BF=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/tcZz/controller/TcCyController.java | 104 ++++++++++++++++++ .../tcZz/controller/TcYqzsController.java | 104 ++++++++++++++++++ .../main/java/com/ruoyi/tcZz/domain/TcCy.java | 70 ++++++++++++ .../java/com/ruoyi/tcZz/domain/TcYqzs.java | 101 +++++++++++++++++ .../com/ruoyi/tcZz/mapper/TcCyMapper.java | 61 ++++++++++ .../com/ruoyi/tcZz/mapper/TcYqzsMapper.java | 61 ++++++++++ .../com/ruoyi/tcZz/service/ITcCyService.java | 61 ++++++++++ .../ruoyi/tcZz/service/ITcYqzsService.java | 61 ++++++++++ .../tcZz/service/impl/TcCyServiceImpl.java | 96 ++++++++++++++++ .../tcZz/service/impl/TcYqzsServiceImpl.java | 96 ++++++++++++++++ .../main/resources/mapper/tcZz/TcCyMapper.xml | 81 ++++++++++++++ .../resources/mapper/tcZz/TcYqzsMapper.xml | 91 +++++++++++++++ 12 files changed, 987 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcCyController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcCy.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcCyMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcYqzsMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcCyService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcCyServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/tcZz/TcCyMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/tcZz/TcYqzsMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcCyController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcCyController.java new file mode 100644 index 00000000..b074224f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcCyController.java @@ -0,0 +1,104 @@ +package com.ruoyi.tcZz.controller; + +import java.util.List; +import javax.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.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.tcZz.domain.TcCy; +import com.ruoyi.tcZz.service.ITcCyService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 词云Controller + * + * @author ruoyi + * @date 2023-10-12 + */ +@RestController +@RequestMapping("/tcZz/cy") +public class TcCyController extends BaseController +{ + @Autowired + private ITcCyService tcCyService; + + /** + * 查询词云列表 + */ + @PreAuthorize("@ss.hasPermi('tcZz:cy:list')") + @GetMapping("/list") + public TableDataInfo list(TcCy tcCy) + { + startPage(); + List list = tcCyService.selectTcCyList(tcCy); + return getDataTable(list); + } + + /** + * 导出词云列表 + */ + @PreAuthorize("@ss.hasPermi('tcZz:cy:export')") + @Log(title = "词云", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TcCy tcCy) + { + List list = tcCyService.selectTcCyList(tcCy); + ExcelUtil util = new ExcelUtil(TcCy.class); + util.exportExcel(response, list, "词云数据"); + } + + /** + * 获取词云详细信息 + */ + @PreAuthorize("@ss.hasPermi('tcZz:cy:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(tcCyService.selectTcCyById(id)); + } + + /** + * 新增词云 + */ + @PreAuthorize("@ss.hasPermi('tcZz:cy:add')") + @Log(title = "词云", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TcCy tcCy) + { + return toAjax(tcCyService.insertTcCy(tcCy)); + } + + /** + * 修改词云 + */ + @PreAuthorize("@ss.hasPermi('tcZz:cy:edit')") + @Log(title = "词云", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TcCy tcCy) + { + return toAjax(tcCyService.updateTcCy(tcCy)); + } + + /** + * 删除词云 + */ + @PreAuthorize("@ss.hasPermi('tcZz:cy:remove')") + @Log(title = "词云", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(tcCyService.deleteTcCyByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java new file mode 100644 index 00000000..180baab0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java @@ -0,0 +1,104 @@ +package com.ruoyi.tcZz.controller; + +import java.util.List; +import javax.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.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.tcZz.domain.TcYqzs; +import com.ruoyi.tcZz.service.ITcYqzsService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 舆情走势图Controller + * + * @author ruoyi + * @date 2023-10-12 + */ +@RestController +@RequestMapping("/tcZz/yqzs") +public class TcYqzsController extends BaseController +{ + @Autowired + private ITcYqzsService tcYqzsService; + + /** + * 查询舆情走势图列表 + */ + @PreAuthorize("@ss.hasPermi('tcZz:yqzs:list')") + @GetMapping("/list") + public TableDataInfo list(TcYqzs tcYqzs) + { + startPage(); + List list = tcYqzsService.selectTcYqzsList(tcYqzs); + return getDataTable(list); + } + + /** + * 导出舆情走势图列表 + */ + @PreAuthorize("@ss.hasPermi('tcZz:yqzs:export')") + @Log(title = "舆情走势图", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TcYqzs tcYqzs) + { + List list = tcYqzsService.selectTcYqzsList(tcYqzs); + ExcelUtil util = new ExcelUtil(TcYqzs.class); + util.exportExcel(response, list, "舆情走势图数据"); + } + + /** + * 获取舆情走势图详细信息 + */ + @PreAuthorize("@ss.hasPermi('tcZz:yqzs:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(tcYqzsService.selectTcYqzsById(id)); + } + + /** + * 新增舆情走势图 + */ + @PreAuthorize("@ss.hasPermi('tcZz:yqzs:add')") + @Log(title = "舆情走势图", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TcYqzs tcYqzs) + { + return toAjax(tcYqzsService.insertTcYqzs(tcYqzs)); + } + + /** + * 修改舆情走势图 + */ + @PreAuthorize("@ss.hasPermi('tcZz:yqzs:edit')") + @Log(title = "舆情走势图", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TcYqzs tcYqzs) + { + return toAjax(tcYqzsService.updateTcYqzs(tcYqzs)); + } + + /** + * 删除舆情走势图 + */ + @PreAuthorize("@ss.hasPermi('tcZz:yqzs:remove')") + @Log(title = "舆情走势图", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(tcYqzsService.deleteTcYqzsByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcCy.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcCy.java new file mode 100644 index 00000000..cb015c71 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcCy.java @@ -0,0 +1,70 @@ +package com.ruoyi.tcZz.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 词云对象 tc_cy + * + * @author ruoyi + * @date 2023-10-12 + */ +public class TcCy extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 词云名称 */ + @Excel(name = "词云名称") + private String cyName; + + /** 词云数量 */ + @Excel(name = "词云数量") + private Long cyCount; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCyName(String cyName) + { + this.cyName = cyName; + } + + public String getCyName() + { + return cyName; + } + public void setCyCount(Long cyCount) + { + this.cyCount = cyCount; + } + + public Long getCyCount() + { + return cyCount; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cyName", getCyName()) + .append("cyCount", getCyCount()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java new file mode 100644 index 00000000..26c62811 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java @@ -0,0 +1,101 @@ +package com.ruoyi.tcZz.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.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 舆情走势图对象 tc_yqzs + * + * @author ruoyi + * @date 2023-10-12 + */ +public class TcYqzs extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 区域id */ + @Excel(name = "区域id") + private Long areaId; + + /** 日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date dateTime; + + /** 非敏感数量 */ + @Excel(name = "非敏感数量") + private Long count1; + + /** 敏感数量 */ + @Excel(name = "敏感数量") + private Long count2; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setAreaId(Long areaId) + { + this.areaId = areaId; + } + + public Long getAreaId() + { + return areaId; + } + public void setDateTime(Date dateTime) + { + this.dateTime = dateTime; + } + + public Date getDateTime() + { + return dateTime; + } + public void setCount1(Long count1) + { + this.count1 = count1; + } + + public Long getCount1() + { + return count1; + } + public void setCount2(Long count2) + { + this.count2 = count2; + } + + public Long getCount2() + { + return count2; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("areaId", getAreaId()) + .append("dateTime", getDateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("count1", getCount1()) + .append("count2", getCount2()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcCyMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcCyMapper.java new file mode 100644 index 00000000..b1298555 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcCyMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.tcZz.mapper; + +import java.util.List; +import com.ruoyi.tcZz.domain.TcCy; + +/** + * 词云Mapper接口 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface TcCyMapper +{ + /** + * 查询词云 + * + * @param id 词云主键 + * @return 词云 + */ + public TcCy selectTcCyById(Long id); + + /** + * 查询词云列表 + * + * @param tcCy 词云 + * @return 词云集合 + */ + public List selectTcCyList(TcCy tcCy); + + /** + * 新增词云 + * + * @param tcCy 词云 + * @return 结果 + */ + public int insertTcCy(TcCy tcCy); + + /** + * 修改词云 + * + * @param tcCy 词云 + * @return 结果 + */ + public int updateTcCy(TcCy tcCy); + + /** + * 删除词云 + * + * @param id 词云主键 + * @return 结果 + */ + public int deleteTcCyById(Long id); + + /** + * 批量删除词云 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTcCyByIds(Long[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcYqzsMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcYqzsMapper.java new file mode 100644 index 00000000..6e1a719e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcYqzsMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.tcZz.mapper; + +import java.util.List; +import com.ruoyi.tcZz.domain.TcYqzs; + +/** + * 舆情走势图Mapper接口 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface TcYqzsMapper +{ + /** + * 查询舆情走势图 + * + * @param id 舆情走势图主键 + * @return 舆情走势图 + */ + public TcYqzs selectTcYqzsById(Long id); + + /** + * 查询舆情走势图列表 + * + * @param tcYqzs 舆情走势图 + * @return 舆情走势图集合 + */ + public List selectTcYqzsList(TcYqzs tcYqzs); + + /** + * 新增舆情走势图 + * + * @param tcYqzs 舆情走势图 + * @return 结果 + */ + public int insertTcYqzs(TcYqzs tcYqzs); + + /** + * 修改舆情走势图 + * + * @param tcYqzs 舆情走势图 + * @return 结果 + */ + public int updateTcYqzs(TcYqzs tcYqzs); + + /** + * 删除舆情走势图 + * + * @param id 舆情走势图主键 + * @return 结果 + */ + public int deleteTcYqzsById(Long id); + + /** + * 批量删除舆情走势图 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTcYqzsByIds(Long[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcCyService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcCyService.java new file mode 100644 index 00000000..e24f405a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcCyService.java @@ -0,0 +1,61 @@ +package com.ruoyi.tcZz.service; + +import java.util.List; +import com.ruoyi.tcZz.domain.TcCy; + +/** + * 词云Service接口 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface ITcCyService +{ + /** + * 查询词云 + * + * @param id 词云主键 + * @return 词云 + */ + public TcCy selectTcCyById(Long id); + + /** + * 查询词云列表 + * + * @param tcCy 词云 + * @return 词云集合 + */ + public List selectTcCyList(TcCy tcCy); + + /** + * 新增词云 + * + * @param tcCy 词云 + * @return 结果 + */ + public int insertTcCy(TcCy tcCy); + + /** + * 修改词云 + * + * @param tcCy 词云 + * @return 结果 + */ + public int updateTcCy(TcCy tcCy); + + /** + * 批量删除词云 + * + * @param ids 需要删除的词云主键集合 + * @return 结果 + */ + public int deleteTcCyByIds(Long[] ids); + + /** + * 删除词云信息 + * + * @param id 词云主键 + * @return 结果 + */ + public int deleteTcCyById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java new file mode 100644 index 00000000..8c7446fe --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java @@ -0,0 +1,61 @@ +package com.ruoyi.tcZz.service; + +import java.util.List; +import com.ruoyi.tcZz.domain.TcYqzs; + +/** + * 舆情走势图Service接口 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface ITcYqzsService +{ + /** + * 查询舆情走势图 + * + * @param id 舆情走势图主键 + * @return 舆情走势图 + */ + public TcYqzs selectTcYqzsById(Long id); + + /** + * 查询舆情走势图列表 + * + * @param tcYqzs 舆情走势图 + * @return 舆情走势图集合 + */ + public List selectTcYqzsList(TcYqzs tcYqzs); + + /** + * 新增舆情走势图 + * + * @param tcYqzs 舆情走势图 + * @return 结果 + */ + public int insertTcYqzs(TcYqzs tcYqzs); + + /** + * 修改舆情走势图 + * + * @param tcYqzs 舆情走势图 + * @return 结果 + */ + public int updateTcYqzs(TcYqzs tcYqzs); + + /** + * 批量删除舆情走势图 + * + * @param ids 需要删除的舆情走势图主键集合 + * @return 结果 + */ + public int deleteTcYqzsByIds(Long[] ids); + + /** + * 删除舆情走势图信息 + * + * @param id 舆情走势图主键 + * @return 结果 + */ + public int deleteTcYqzsById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcCyServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcCyServiceImpl.java new file mode 100644 index 00000000..ba3f3553 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcCyServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.tcZz.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.tcZz.mapper.TcCyMapper; +import com.ruoyi.tcZz.domain.TcCy; +import com.ruoyi.tcZz.service.ITcCyService; + +/** + * 词云Service业务层处理 + * + * @author ruoyi + * @date 2023-10-12 + */ +@Service +public class TcCyServiceImpl implements ITcCyService +{ + @Autowired + private TcCyMapper tcCyMapper; + + /** + * 查询词云 + * + * @param id 词云主键 + * @return 词云 + */ + @Override + public TcCy selectTcCyById(Long id) + { + return tcCyMapper.selectTcCyById(id); + } + + /** + * 查询词云列表 + * + * @param tcCy 词云 + * @return 词云 + */ + @Override + public List selectTcCyList(TcCy tcCy) + { + return tcCyMapper.selectTcCyList(tcCy); + } + + /** + * 新增词云 + * + * @param tcCy 词云 + * @return 结果 + */ + @Override + public int insertTcCy(TcCy tcCy) + { + tcCy.setCreateTime(DateUtils.getNowDate()); + return tcCyMapper.insertTcCy(tcCy); + } + + /** + * 修改词云 + * + * @param tcCy 词云 + * @return 结果 + */ + @Override + public int updateTcCy(TcCy tcCy) + { + tcCy.setUpdateTime(DateUtils.getNowDate()); + return tcCyMapper.updateTcCy(tcCy); + } + + /** + * 批量删除词云 + * + * @param ids 需要删除的词云主键 + * @return 结果 + */ + @Override + public int deleteTcCyByIds(Long[] ids) + { + return tcCyMapper.deleteTcCyByIds(ids); + } + + /** + * 删除词云信息 + * + * @param id 词云主键 + * @return 结果 + */ + @Override + public int deleteTcCyById(Long id) + { + return tcCyMapper.deleteTcCyById(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java new file mode 100644 index 00000000..71e5f262 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.tcZz.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.tcZz.mapper.TcYqzsMapper; +import com.ruoyi.tcZz.domain.TcYqzs; +import com.ruoyi.tcZz.service.ITcYqzsService; + +/** + * 舆情走势图Service业务层处理 + * + * @author ruoyi + * @date 2023-10-12 + */ +@Service +public class TcYqzsServiceImpl implements ITcYqzsService +{ + @Autowired + private TcYqzsMapper tcYqzsMapper; + + /** + * 查询舆情走势图 + * + * @param id 舆情走势图主键 + * @return 舆情走势图 + */ + @Override + public TcYqzs selectTcYqzsById(Long id) + { + return tcYqzsMapper.selectTcYqzsById(id); + } + + /** + * 查询舆情走势图列表 + * + * @param tcYqzs 舆情走势图 + * @return 舆情走势图 + */ + @Override + public List selectTcYqzsList(TcYqzs tcYqzs) + { + return tcYqzsMapper.selectTcYqzsList(tcYqzs); + } + + /** + * 新增舆情走势图 + * + * @param tcYqzs 舆情走势图 + * @return 结果 + */ + @Override + public int insertTcYqzs(TcYqzs tcYqzs) + { + tcYqzs.setCreateTime(DateUtils.getNowDate()); + return tcYqzsMapper.insertTcYqzs(tcYqzs); + } + + /** + * 修改舆情走势图 + * + * @param tcYqzs 舆情走势图 + * @return 结果 + */ + @Override + public int updateTcYqzs(TcYqzs tcYqzs) + { + tcYqzs.setUpdateTime(DateUtils.getNowDate()); + return tcYqzsMapper.updateTcYqzs(tcYqzs); + } + + /** + * 批量删除舆情走势图 + * + * @param ids 需要删除的舆情走势图主键 + * @return 结果 + */ + @Override + public int deleteTcYqzsByIds(Long[] ids) + { + return tcYqzsMapper.deleteTcYqzsByIds(ids); + } + + /** + * 删除舆情走势图信息 + * + * @param id 舆情走势图主键 + * @return 结果 + */ + @Override + public int deleteTcYqzsById(Long id) + { + return tcYqzsMapper.deleteTcYqzsById(id); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/TcCyMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/TcCyMapper.xml new file mode 100644 index 00000000..efa4c123 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/TcCyMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, cy_name, cy_count, create_by, create_time, update_by, update_time, remark from tc_cy + + + + + + + + insert into tc_cy + + cy_name, + cy_count, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{cyName}, + #{cyCount}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update tc_cy + + cy_name = #{cyName}, + cy_count = #{cyCount}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from tc_cy where id = #{id} + + + + delete from tc_cy where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/TcYqzsMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/TcYqzsMapper.xml new file mode 100644 index 00000000..45ad19fc --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/TcYqzsMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + select id, area_id, date_time, create_by, create_time, update_by, update_time, remark, count1, count2 from tc_yqzs + + + + + + + + insert into tc_yqzs + + area_id, + date_time, + create_by, + create_time, + update_by, + update_time, + remark, + count1, + count2, + + + #{areaId}, + #{dateTime}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{count1}, + #{count2}, + + + + + update tc_yqzs + + area_id = #{areaId}, + date_time = #{dateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + count1 = #{count1}, + count2 = #{count2}, + + where id = #{id} + + + + delete from tc_yqzs where id = #{id} + + + + delete from tc_yqzs where id in + + #{id} + + + \ No newline at end of file