From 0ca3ace8c57729a3d69627fa3a38ef8ddf4f2953 Mon Sep 17 00:00:00 2001 From: daixiaogang <2510234660@qq.com> Date: Mon, 11 Sep 2023 13:57:17 +0800 Subject: [PATCH] analysisRelateProductDsOrderUnlockTimeoutQueueTimer --- ...DsOrderUnlockTimeoutQueueTimerService.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ms-biz/src/main/java/com/ms/api/spi/timer/AnalysisRelateProductDsOrderUnlockTimeoutQueueTimerService.java diff --git a/ms-biz/src/main/java/com/ms/api/spi/timer/AnalysisRelateProductDsOrderUnlockTimeoutQueueTimerService.java b/ms-biz/src/main/java/com/ms/api/spi/timer/AnalysisRelateProductDsOrderUnlockTimeoutQueueTimerService.java new file mode 100644 index 00000000..d13e7c5e --- /dev/null +++ b/ms-biz/src/main/java/com/ms/api/spi/timer/AnalysisRelateProductDsOrderUnlockTimeoutQueueTimerService.java @@ -0,0 +1,35 @@ +package com.ms.api.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.common.R; +import com.ms.api.common.Ret; +import com.ms.api.common.TimerBaseService; +import com.ms.api.consts.StatusConst; +import com.ms.api.consts.TblConst; +import com.ms.api.dto.ItemDTO; +import com.ms.api.service.QueueService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; + +@ExtensionService("analysisRelateProductDsOrderUnlockTimeoutQueueTimer") +@Slf4j +public class AnalysisRelateProductDsOrderUnlockTimeoutQueueTimerService extends TimerBaseService implements ExtensionServiceHandler { + + @Autowired + private QueueService queueService; + + @Override + public BaseResponse handle(BaseRequest req) { + try { + queueService.unlockTimeoutSolidRedisQueue(TblConst.ds_relate_product_analysis_op_order_queue, 300, null); + return R.ok(Ret.success()); + } catch (Throwable e) { + e.printStackTrace(); + return R.ok(Ret.fail(e.getMessage())); + } + } + +}