From 18be56465ed753736e04e5a9c8adba4f3e6e8de2 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 8 Jul 2024 11:53:17 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=B6=88=E6=81=AF=E4=B8=AD=E5=BF=83=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/message/fegin/IMessageConfigClient.java | 4 -- .../hzims/message/fegin/IMessagePushClient.java | 55 ---------------------- .../hzims/message/fegin/IMessageSmsClient.java | 32 ------------- .../hzims/message/fegin/MessagePushClient.java | 54 --------------------- .../hnac/hzims/message/fegin/MessageSmsClient.java | 24 ---------- .../service/impl/OperAccessTaskServiceImpl.java | 22 +-------- .../duty/controller/ImsDutyRecController.java | 12 ----- .../duty/service/IImsDutyRecService.java | 6 --- .../duty/service/impl/ImsDutyRecServiceImpl.java | 37 --------------- .../controller/OperMaintenanceTaskController.java | 14 ------ .../scheduled/SafeToolTypePushUserTask.java | 23 --------- 11 files changed, 1 insertion(+), 282 deletions(-) delete mode 100644 hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessagePushClient.java delete mode 100644 hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageSmsClient.java delete mode 100644 hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessagePushClient.java delete mode 100644 hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageSmsClient.java diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageConfigClient.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageConfigClient.java index 14f4e9a..fceb796 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageConfigClient.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageConfigClient.java @@ -5,10 +5,6 @@ import com.hnac.hzims.message.entity.config.MailConfigEntity; import com.hnac.hzims.message.entity.config.PushConfigEntity; import com.hnac.hzims.message.entity.config.SmsConfigEntity; import com.hnac.hzims.message.entity.config.WsConfigEntity; -import com.hnac.hzims.message.entity.log.AppLogEntity; -import com.hnac.hzims.message.entity.log.MailLogEntity; -import com.hnac.hzims.message.entity.log.SmsLogEntity; -import com.hnac.hzims.message.entity.log.WsLogEntity; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessagePushClient.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessagePushClient.java deleted file mode 100644 index 8437f3b..0000000 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessagePushClient.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.hnac.hzims.message.fegin; - -import com.hnac.hzims.message.MessageConstants; -import com.hnac.hzims.message.dto.PushDto; -import com.hnac.hzims.message.req.PushExtrasReq; -import com.hnac.hzims.message.req.PushReq; -import org.springblade.core.tool.api.R; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; - -/** - * @author xiashandong - * @created 2021/6/25 15:27 - **/ -@FeignClient( - value = MessageConstants.APP_NAME -) -public interface IMessagePushClient { - String API_PREFIX = "/feign/sms"; - String SEND_MESSAGE_BY_USER_ID = API_PREFIX + "/send-message-by-user-id"; - String SEND_MESSAGE_BY_TAG = API_PREFIX + "/send-message-by-tag"; - String SEND_MESSAGE_ALL = API_PREFIX + "/send-message-all"; - String SEND_MESSAGE = API_PREFIX + "/send-message"; - - /** - * 根据账户ID发送消息 - * - * @param userIds 账户ID,多个值用,分隔 - * @param req - */ - @PostMapping(SEND_MESSAGE_BY_USER_ID) - void sendMessage(@RequestParam("userIds") String userIds, @RequestBody PushExtrasReq req, @RequestParam("tenantId") String tenantId - , @RequestParam("createDept") Long createDept,@RequestParam("createUser") Long createUser); - - /** - * 根据标签发送消息 - * - * @param tags 标签,多个值用,分隔 - * @param req - */ - @PostMapping(SEND_MESSAGE_BY_TAG) - void sendMessage(@RequestParam("tags") String tags, @RequestBody PushReq req); - - /** - * 给所有账户发送消息 - * - * @param req - */ - @PostMapping(SEND_MESSAGE_ALL) - void sendMessage(@RequestBody PushExtrasReq req); - - -} diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageSmsClient.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageSmsClient.java deleted file mode 100644 index be6eca0..0000000 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageSmsClient.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hnac.hzims.message.fegin; - - -import com.hnac.hzims.message.MessageConstants; -import com.hnac.hzims.message.req.SmsReq; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.stereotype.Component; -import org.springframework.stereotype.Repository; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; - - -/** - * @author xiashandong - * @created 2021/6/25 15:27 - **/ -@FeignClient( - value = MessageConstants.APP_NAME -) -public interface IMessageSmsClient { - String API_PREFIX = "/feign/sms"; - String SEND_MESSAGE = API_PREFIX + "/send-message"; - - /** - * 发送短信 - * - * @param req - */ - @PostMapping(SEND_MESSAGE) - void sendMessage(@RequestBody SmsReq req); - -} diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessagePushClient.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessagePushClient.java deleted file mode 100644 index 0b8e16e..0000000 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessagePushClient.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.hnac.hzims.message.fegin; - -import com.hnac.hzims.message.MessageConstants; -import com.hnac.hzims.message.dto.PushDto; -import com.hnac.hzims.message.req.PushExtrasReq; -import com.hnac.hzims.message.req.PushReq; -import com.hnac.hzims.message.req.SmsReq; -import com.hnac.hzims.message.service.IMessageService; -import com.hnac.hzims.message.service.PushService; -import com.hnac.hzims.message.service.impl.SmsMessageServiceImpl; -import lombok.AllArgsConstructor; -import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.SpringUtil; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; - -/** - * @author xiashandong - * @created 2021/6/25 15:44 - **/ -@AllArgsConstructor -@RestController -public class MessagePushClient implements IMessagePushClient { - - private final PushService service; - - @Override - @PostMapping(SEND_MESSAGE_BY_USER_ID) - public void sendMessage(@RequestParam("userIds") String userIds, @RequestBody PushExtrasReq req - , @RequestParam("tenantId") String tenantId, @RequestParam("createDept") Long createDept, @RequestParam("createUser") Long createUser) { - List userIdList = Arrays.stream(userIds.split(",")).collect(Collectors.toSet()).stream().collect(Collectors.toList()); - //service.sendByUserId(userIdList, req, tenantId, createDept, createUser); - } - - @Override - @PostMapping(SEND_MESSAGE_BY_TAG) - public void sendMessage(@RequestParam("tags") String tags, @RequestBody PushReq req) { - List tagList = Arrays.stream(tags.split(",")).collect(Collectors.toSet()).stream().collect(Collectors.toList()); - //service.sendByTags(tagList, req); - } - - @Override - @PostMapping(SEND_MESSAGE_ALL) - public void sendMessage(@RequestBody PushExtrasReq req) { - service.sendAll(req); - } - -} diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageSmsClient.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageSmsClient.java deleted file mode 100644 index 0d172eb..0000000 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageSmsClient.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.hnac.hzims.message.fegin; - -import com.hnac.hzims.message.req.SmsReq; -import com.hnac.hzims.message.service.SmsService; -import lombok.AllArgsConstructor; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author xiashandong - * @created 2021/6/25 15:29 - **/ -@AllArgsConstructor -@RestController -public class MessageSmsClient implements IMessageSmsClient { - private final SmsService service; - - @Override - @PostMapping(SEND_MESSAGE) - public void sendMessage(@RequestBody SmsReq req) { - service.sendMessage(req); - } -} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java index 19025a6..5510b0d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessTaskServiceImpl.java @@ -10,11 +10,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hnac.hzims.equipment.entity.EmInfoEntity; import com.hnac.hzims.equipment.feign.IEmInfoClient; -import com.hnac.hzims.message.fegin.IMessagePushClient; -import com.hnac.hzims.message.req.PushExtrasReq; -import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.constants.AccessConstants; import com.hnac.hzims.operational.access.dto.OperAccessMaterialDTO; import com.hnac.hzims.operational.access.dto.OperAccessStatisticsDTO; @@ -48,7 +46,6 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.StringUtils; import org.springblade.core.log.exception.ServiceException; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; @@ -92,7 +89,6 @@ public class OperAccessTaskServiceImpl extends ServiceImpl { void messageRemondingV2(); /** - * 消息提醒测试 - */ - void messageRemondingTest(); - - - /** * 判断延时接班 * @param entity * @param recEntity diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java index e8be70f..ec059a2 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java @@ -12,7 +12,6 @@ import com.google.common.collect.Lists; import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.dto.MessagePushRecordDto; import com.hnac.hzims.message.fegin.IMessageClient; -import com.hnac.hzims.message.fegin.IMessagePushClient; import com.hnac.hzims.message.req.PushExtrasReq; import com.hnac.hzims.monitor.utils.DateUtils; import com.hnac.hzims.operational.OperationalConstants; @@ -99,8 +98,6 @@ public class ImsDutyRecServiceImpl extends ServiceImpl