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()); + } +} +