From bbe54f88d005668b8ea8646338756bb592e1018e Mon Sep 17 00:00:00 2001 From: ljl Date: Mon, 20 May 2024 19:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ms/api/dto/DsMessageDao.java | 8 ++++++ .../spi/timer/ProcessDsMessageService.java | 28 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 ms-api/src/main/java/com/ms/api/dto/DsMessageDao.java create mode 100644 ms-biz/src/main/java/com/ms/biz/spi/timer/ProcessDsMessageService.java diff --git a/ms-api/src/main/java/com/ms/api/dto/DsMessageDao.java b/ms-api/src/main/java/com/ms/api/dto/DsMessageDao.java new file mode 100644 index 0000000..a2e1a1d --- /dev/null +++ b/ms-api/src/main/java/com/ms/api/dto/DsMessageDao.java @@ -0,0 +1,8 @@ +package com.ms.api.dto; + +import lombok.Data; + +@Data +public class DsMessageDao { + Long messageId; +} diff --git a/ms-biz/src/main/java/com/ms/biz/spi/timer/ProcessDsMessageService.java b/ms-biz/src/main/java/com/ms/biz/spi/timer/ProcessDsMessageService.java new file mode 100644 index 0000000..325bd16 --- /dev/null +++ b/ms-biz/src/main/java/com/ms/biz/spi/timer/ProcessDsMessageService.java @@ -0,0 +1,28 @@ +package com.ms.biz.spi.timer; + +import com.jinritemai.cloud.base.api.BaseRequest; +import com.jinritemai.cloud.base.api.BaseResponse; +import com.jinritemai.cloud.base.api.ExtensionService; +import com.jinritemai.cloud.base.api.ExtensionServiceHandler; +import com.ms.api.dto.DsMessageDao; +import com.ms.biz.common.R; +import com.ms.biz.common.Ret; +import com.ms.biz.common.TimerBaseService; +import com.ms.biz.service.DsMessageService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; + +@ExtensionService("processDsMessage") +@Slf4j +public class ProcessDsMessageService extends TimerBaseService implements ExtensionServiceHandler { + @Autowired + private DsMessageService dsMessageService; + + @Override + public BaseResponse handle(BaseRequest req) { + Long messageId = req.getData().getMessageId(); + dsMessageService.processDsMessage(messageId); + return R.ok(Ret.success()); + } +} +