From 24090e99c5c52c10a5057cbe5a67c1b7f5e71f4a Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Wed, 18 Oct 2023 10:43:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=90=AF=E7=94=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E8=88=86=E6=83=85=E8=B5=B0=E5=8A=BFxml?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tcZz/controller/TcAqgController.java | 16 ++++++++++ .../tcZz/controller/TcYqzsController.java | 31 ++++++------------- .../java/com/ruoyi/tcZz/domain/TcYqzs.java | 22 ++++++++++++- .../com/ruoyi/tcZz/mapper/TcAqgMapper.java | 10 ++++++ .../com/ruoyi/tcZz/mapper/TcYqzsMapper.java | 4 +++ .../com/ruoyi/tcZz/service/ITcAqgService.java | 9 ++++++ .../ruoyi/tcZz/service/ITcYqzsService.java | 3 ++ .../tcZz/service/impl/TcAqgServiceImpl.java | 6 ++++ .../tcZz/service/impl/TcBmtbServiceImpl.java | 1 + .../tcZz/service/impl/TcYqzsServiceImpl.java | 2 ++ .../mapper/tcZz/netManage/TcBzhanMapper.xml | 1 + .../mapper/tcZz/netWorkYq/TcYqzsMapper.xml | 3 ++ .../tcZz/networkEcology/TcAqgMapper.xml | 12 ++++++- 13 files changed, 97 insertions(+), 23 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcAqgController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcAqgController.java index 946cc5bd..72a4e059 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcAqgController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcAqgController.java @@ -97,4 +97,20 @@ public class TcAqgController extends BaseController { tcAqgService.importUser(tcAqgList); return AjaxResult.success(); } + + + + /** + * 批量启用禁用 + * + * @param isStatus 启用禁用状态 + * @return + */ + + @ApiOperation("批量启用禁用") + @GetMapping("/isStatus") + public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus,@RequestParam("ids") List ids) { + tcAqgService.updateByisStatus(isStatus,ids); + return AjaxResult.success(); + } } 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 index 84319138..8c995590 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java @@ -1,31 +1,20 @@ package com.ruoyi.tcZz.controller; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import com.ruoyi.tcZz.domain.TcWljgtj; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -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.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; 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; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + /** * 舆情走势图Controller * @@ -40,7 +29,6 @@ public class TcYqzsController extends BaseController { private ITcYqzsService tcYqzsService; - /** * 导出舆情走势图列表 */ @@ -111,4 +99,5 @@ public class TcYqzsController extends BaseController { tcYqzsService.importUser(tcYqzsList); return AjaxResult.success(); } + } 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 index 14db72bf..d17165cf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcYqzs.java @@ -9,6 +9,7 @@ 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; +import org.springframework.format.annotation.DateTimeFormat; /** * 舆情走势图对象 tc_yqzs @@ -32,7 +33,7 @@ public class TcYqzs extends BaseEntity private Long areaId; /** 日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "日期") @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date dateTime; @@ -46,4 +47,23 @@ public class TcYqzs extends BaseEntity @Excel(name = "敏感数量") @ApiModelProperty(value = "敏感数量") private Long count2; + + + /** + * 开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "开始时间") + private Date beginDateTime; + + + + /** + * 结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "结束时间") + private Date endDateTime; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcAqgMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcAqgMapper.java index e16c27c4..da494034 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcAqgMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcAqgMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.mapper; import java.util.List; import com.ruoyi.tcZz.domain.TcAqg; +import org.apache.ibatis.annotations.Param; /** * 网络安全官Mapper接口 @@ -58,4 +59,13 @@ public interface TcAqgMapper * @return 结果 */ public int deleteTcAqgByIds(Long[] ids); + + + + /** + * 批量启用禁用 + * + * + */ + public void updateByisStatus(@Param("isStatus") Integer isStatus,@Param("ids") List 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 index 4983db0f..92470ad0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcYqzsMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcYqzsMapper.java @@ -58,4 +58,8 @@ public interface TcYqzsMapper * @return 结果 */ public int deleteTcYqzsByIds(Long[] ids); + + + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcAqgService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcAqgService.java index 5e3a6a0c..cce2cae5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcAqgService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcAqgService.java @@ -68,4 +68,13 @@ public interface ITcAqgService * @return 结果 */ public String importUser(List tcAqgList); + + + + /** + * 批量启用禁用 + * + * + */ + public void updateByisStatus(Integer isStatus,List ids); } 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 index 750ac18f..74aaca08 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java @@ -66,4 +66,7 @@ public interface ITcYqzsService { * @return 结果 */ public String importUser(List tcYqzsList); + + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcAqgServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcAqgServiceImpl.java index f8fbaa88..cc063d46 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcAqgServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcAqgServiceImpl.java @@ -106,4 +106,10 @@ public class TcAqgServiceImpl implements ITcAqgService } return successMsg.toString(); } + + + @Override + public void updateByisStatus(Integer isStatus,List ids) { + tcAqgMapper.updateByisStatus(isStatus,ids); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcBmtbServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcBmtbServiceImpl.java index 3f3f8c61..1e845798 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcBmtbServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcBmtbServiceImpl.java @@ -94,6 +94,7 @@ public class TcBmtbServiceImpl implements ITcBmtbService { StringBuilder successMsg = new StringBuilder(); if (!tcBmtbList.isEmpty()) { for (TcBmtb tcBmtb : tcBmtbList) { + tcBmtb.setCreateTime(DateUtils.getNowDate()); tcBmtbMapper.insertTcBmtb(tcBmtb); } successMsg.append("导入成功"); 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 index 8bf1159b..075a2c2d 100644 --- 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 @@ -106,4 +106,6 @@ public class TcYqzsServiceImpl implements ITcYqzsService } return successMsg.toString(); } + + } diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcBzhanMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcBzhanMapper.xml index 5007cf85..a6a56b80 100644 --- a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcBzhanMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcBzhanMapper.xml @@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and update_by = #{updateBy} and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime} and remark = #{remark} + and isStatus = 1 diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml index 255fe4ec..1342c327 100644 --- a/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netWorkYq/TcYqzsMapper.xml @@ -31,10 +31,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and create_time between #{params.beginCreateTime} and #{params.endCreateTime} and update_by = #{updateBy} and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime} + and date_time between #{beginDateTime} and #{endDateTime} and remark = #{remark} and count1 = #{count1} and count2 = #{count2} + order by date_time asc