15 changed files with 317 additions and 16 deletions
@ -0,0 +1,30 @@ |
|||||
|
package com.bnyer.img.task; |
||||
|
|
||||
|
import com.bnyer.img.service.TiktokCollectionService; |
||||
|
import com.bnyer.img.service.UserVipRecordService; |
||||
|
import com.xxl.job.core.biz.model.ReturnT; |
||||
|
import com.xxl.job.core.context.XxlJobHelper; |
||||
|
import com.xxl.job.core.handler.annotation.XxlJob; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 检查会员是否过期任务 |
||||
|
* @author chengkun |
||||
|
* @date 2023/5/22 18:13 |
||||
|
*/ |
||||
|
@Component |
||||
|
@Slf4j |
||||
|
public class CheckVipDateTask { |
||||
|
|
||||
|
@Autowired |
||||
|
private UserVipRecordService userVipRecordService; |
||||
|
|
||||
|
@XxlJob("checkVipDateTask") |
||||
|
public ReturnT<String> checkVipDateTask(String param) throws Exception { |
||||
|
userVipRecordService.checkVipDateTask(); |
||||
|
XxlJobHelper.log("{} 我执行了检查会员过期任务", System.currentTimeMillis()); |
||||
|
return ReturnT.SUCCESS; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.bnyer.img.task; |
||||
|
|
||||
|
import com.bnyer.img.service.ImgMqMessageRecordService; |
||||
|
import com.bnyer.img.service.UserVipRecordService; |
||||
|
import com.xxl.job.core.biz.model.ReturnT; |
||||
|
import com.xxl.job.core.context.XxlJobHelper; |
||||
|
import com.xxl.job.core.handler.annotation.XxlJob; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* img服务消息补偿任务 |
||||
|
* @author chengkun |
||||
|
* @date 2023/5/22 18:13 |
||||
|
*/ |
||||
|
@Component |
||||
|
@Slf4j |
||||
|
public class ImgMessageCompensationTask { |
||||
|
|
||||
|
@Autowired |
||||
|
private ImgMqMessageRecordService imgMqMessageRecordService; |
||||
|
|
||||
|
@XxlJob("imgMessageCompensationTask") |
||||
|
public ReturnT<String> imgMessageCompensation(String param) throws Exception { |
||||
|
imgMqMessageRecordService.imgMessageCompensation(); |
||||
|
XxlJobHelper.log("{} 我执行了img服务消息补偿任务", System.currentTimeMillis()); |
||||
|
return ReturnT.SUCCESS; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package com.bnyer.order.task; |
||||
|
|
||||
|
import com.bnyer.order.service.OrderMqMessageRecordService; |
||||
|
import com.xxl.job.core.biz.model.ReturnT; |
||||
|
import com.xxl.job.core.context.XxlJobHelper; |
||||
|
import com.xxl.job.core.handler.annotation.XxlJob; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* order服务消息补偿任务 |
||||
|
* @author chengkun |
||||
|
* @date 2023/5/22 18:13 |
||||
|
*/ |
||||
|
@Component |
||||
|
@Slf4j |
||||
|
public class OrderMessageCompensationTask { |
||||
|
|
||||
|
@Autowired |
||||
|
private OrderMqMessageRecordService orderMqMessageRecordService; |
||||
|
|
||||
|
@XxlJob("orderMessageCompensationTask") |
||||
|
public ReturnT<String> orderMessageCompensation(String param) throws Exception { |
||||
|
orderMqMessageRecordService.orderMessageCompensation(); |
||||
|
XxlJobHelper.log("{} 我执行了order服务消息补偿任务", System.currentTimeMillis()); |
||||
|
return ReturnT.SUCCESS; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package com.bnyer.pay.task; |
||||
|
|
||||
|
import com.bnyer.pay.service.PayMqMessageRecordService; |
||||
|
import com.xxl.job.core.biz.model.ReturnT; |
||||
|
import com.xxl.job.core.context.XxlJobHelper; |
||||
|
import com.xxl.job.core.handler.annotation.XxlJob; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* pay服务消息补偿任务 |
||||
|
* @author chengkun |
||||
|
* @date 2023/5/22 18:13 |
||||
|
*/ |
||||
|
@Component |
||||
|
@Slf4j |
||||
|
public class PayMessageCompensationTask { |
||||
|
|
||||
|
@Autowired |
||||
|
private PayMqMessageRecordService payMqMessageRecordService; |
||||
|
|
||||
|
@XxlJob("payMessageCompensationTask") |
||||
|
public ReturnT<String> payMessageCompensation(String param) throws Exception { |
||||
|
payMqMessageRecordService.payMessageCompensation(); |
||||
|
XxlJobHelper.log("{} 我执行了pay服务消息补偿任务", System.currentTimeMillis()); |
||||
|
return ReturnT.SUCCESS; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue