From 8974b6ef99e474fc5a412ba5173ca6e46aa354e5 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 20 Mar 2024 09:33:07 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=B6=88=E6=81=AF=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=B3=A8=E8=A7=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/MessagePushRecordController.java | 20 +++++++++++++------- .../controller/web/MessageStatisticsController.java | 8 ++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java index ecb676c..33c3cd1 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java @@ -5,13 +5,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.common.logs.annotation.OperationAnnotation; -import com.hnac.hzims.common.logs.enums.BusinessType; -import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.entity.MessagePushRecordEntity; import com.hnac.hzims.message.service.IMessagePushRecordService; import com.hnac.hzims.message.vo.UnreadMessageVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.BusinessType; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -30,6 +31,7 @@ import java.util.List; @RequestMapping("/message/record") @Api(value = "消息推送记录", tags = "消息推送记录") @AllArgsConstructor +@Business(module = MessageConstants.APP_NAME,value = "消息中心管理",ignore = false) public class MessagePushRecordController extends BladeController { private final IMessagePushRecordService messagePushRecordService; @@ -37,6 +39,7 @@ public class MessagePushRecordController extends BladeController { @PostMapping("/save") @ApiOperation("保存消息推送") @ApiOperationSupport(order = 1) + @Operate(label = "保存消息推送记录",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@RequestBody MessagePushRecordEntity request) { return R.status(messagePushRecordService.save(request)); } @@ -44,6 +47,7 @@ public class MessagePushRecordController extends BladeController { @PostMapping("/update") @ApiOperation("更新消息推送记录") @ApiOperationSupport(order = 2) + @Operate(label = "保存消息推送记录",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@RequestBody MessagePushRecordEntity request) { return R.status(messagePushRecordService.updateById(request)); } @@ -51,6 +55,7 @@ public class MessagePushRecordController extends BladeController { @GetMapping("/list") @ApiOperation("查询消息推送记录列表") @ApiOperationSupport(order = 3) + @Operate(label = "查询消息推送记录列表",type = BusinessType.QUERY,ignore = false) public R> list(MessagePushRecordEntity request) { return R.data(messagePushRecordService.listNoUserScope(request)); } @@ -58,10 +63,7 @@ public class MessagePushRecordController extends BladeController { @GetMapping("/listPage") @ApiOperation("分页查询消息推送记录列表") @ApiOperationSupport(order = 4) - @OperationAnnotation( - moduleName = "消息管理", - title = "消息管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, - action = "分页查询消息推送记录列表") + @Operate(label = "查询消息推送记录分页列表",type = BusinessType.QUERY,ignore = false) public R> listPage(MessagePushRecordEntity request, Query query) { return R.data(messagePushRecordService.listPageNoUserScope(request, query)); } @@ -69,6 +71,7 @@ public class MessagePushRecordController extends BladeController { @GetMapping("/send/{id}") @ApiOperation("推送消息记录") @ApiOperationSupport(order = 5) + @Operate(label = "根据消息记录发送消息",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R send(@PathVariable @ApiParam("消息记录ID") Long id) { return R.data(messagePushRecordService.send(id)); } @@ -76,6 +79,7 @@ public class MessagePushRecordController extends BladeController { @GetMapping("/readMessage/{id}") @ApiOperation("读取消息") @ApiOperationSupport(order = 6) + @Operate(label = "将消息设为已读",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R readMessage(@PathVariable @ApiParam("消息记录ID") String id) { MessagePushRecordEntity record = messagePushRecordService.getById(id); if (!(Long.parseLong(record.getPusher()) == AuthUtil.getUserId())) { @@ -91,6 +95,7 @@ public class MessagePushRecordController extends BladeController { @GetMapping("/readMessageBatch") @ApiOperation("批量处理消息") @ApiOperationSupport(order = 7) + @Operate(label = "批量将消息设为已读",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R readMessageBatch(@RequestParam(required = false) String businessClassify,@RequestParam(required = false) String type) { LambdaUpdateWrapper eq = Wrappers.lambdaUpdate() .set(MessagePushRecordEntity::getStatus, MessageConstants.CONFIRM) @@ -113,6 +118,7 @@ public class MessagePushRecordController extends BladeController { @GetMapping("/getPersonalAppUnreadMessage") @ApiOperation("获取当前登录人APP待办消息") @ApiOperationSupport(order = 9) + @Operate(label = "获取当前登录人APP待办消息",type = BusinessType.QUERY,ignore = false) public R> getPersonalAppUnreadMessage() { List personalUnreadMessage = messagePushRecordService.getPersonalAppUnreadMessage(); return R.data(personalUnreadMessage); diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/web/MessageStatisticsController.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/web/MessageStatisticsController.java index 154660e..dc0acc4 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/web/MessageStatisticsController.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/web/MessageStatisticsController.java @@ -1,7 +1,11 @@ package com.hnac.hzims.message.controller.web; +import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.service.IMessagePushRecordService; import com.hnac.hzims.message.vo.msgpushrecord.*; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.BusinessType; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; @@ -21,6 +25,7 @@ import java.util.List; @RestController @RequiredArgsConstructor @RequestMapping("/message/statistics") +@Business(module = MessageConstants.APP_NAME,value = "消息推送统计管理",ignore = false) public class MessageStatisticsController { @@ -32,6 +37,7 @@ public class MessageStatisticsController { * @return */ @GetMapping("/smsPushStat") + @Operate(label = "过去一年消息记录类型分组统计图",type = BusinessType.QUERY,ignore = false) public R smsPushStat(MessagePushRecordEntityVo vo) { log.info("短信推送统计"); List messagePushRecordVos = messagePushRecordService.smsPushStat(vo); @@ -69,6 +75,7 @@ public class MessageStatisticsController { * 新人员发送统计 */ @GetMapping("/userPushStat") + @Operate(label = "过去一年消息记录推送人员分组统计图",type = BusinessType.QUERY,ignore = false) public R userPushStat(MessagePushRecordEntityVo vo) { log.info("人员发送统计"); UserPushStatTypeResponseVo messagePushRecordVos = messagePushRecordService.newUserPushStat(vo); @@ -81,6 +88,7 @@ public class MessageStatisticsController { * 推送成功失败统计 */ @GetMapping("/pushStat") + @Operate(label = "过去一年消息记录推送结果分组统计图",type = BusinessType.QUERY,ignore = false) public R pushStat(MessagePushRecordEntityVo vo) { List messagePushRecordVos = messagePushRecordService.pushStat(vo); log.info("推送成功失败统计 返回的数据: {}",messagePushRecordVos);