代码规范度问题处理,注释补充。
This commit is contained in:
parent
b30a55eafa
commit
f7201342d9
@ -293,7 +293,10 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||
|
||||
3.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
3.软件受国家计算机软件著作权保护(登记号:2021SR0805085)。
|
||||
|
||||
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
|
||||
|
||||
### 交流群
|
||||
|
||||
|
@ -8,7 +8,6 @@ import cn.lili.modules.payment.kit.dto.PayParam;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentClientEnum;
|
||||
import cn.lili.modules.payment.kit.enums.PaymentMethodEnum;
|
||||
import cn.lili.modules.payment.kit.params.dto.CashierParam;
|
||||
import cn.lili.modules.payment.service.PaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -33,8 +32,6 @@ public class CashierController {
|
||||
|
||||
@Autowired
|
||||
private CashierSupport cashierSupport;
|
||||
@Autowired
|
||||
private PaymentService paymentService;
|
||||
|
||||
|
||||
@ApiImplicitParams({
|
||||
|
@ -69,7 +69,7 @@ public class RocketmqTimerTrigger implements TimeTrigger {
|
||||
String generateKey = TimeTriggerUtil.generateKey(timeTriggerMsg.getTriggerExecutor(), timeTriggerMsg.getTriggerTime(), uniqueKey);
|
||||
this.cache.put(generateKey, 1);
|
||||
//设置延时任务
|
||||
if (Boolean.TRUE.equals(promotionDelayQueue.addJobId(JSONUtil.toJsonStr(timeTriggerMsg), delayTime))) {
|
||||
if (Boolean.TRUE.equals(promotionDelayQueue.addJob(JSONUtil.toJsonStr(timeTriggerMsg), delayTime))) {
|
||||
log.info("add Redis key {}", generateKey);
|
||||
log.info("定时执行在【" + DateUtil.toString(timeTriggerMsg.getTriggerTime(), "yyyy-MM-dd HH:mm:ss") + "】,消费【" + timeTriggerMsg.getParam().toString() + "】");
|
||||
} else {
|
||||
|
@ -32,10 +32,12 @@ public abstract class AbstractDelayQueueMachineFactory {
|
||||
* @param time 延时时间(单位 :秒)
|
||||
* @return 是否插入成功
|
||||
*/
|
||||
public boolean addJobId(String jobId, Integer time) {
|
||||
public boolean addJob(String jobId, Integer time) {
|
||||
//获取时间
|
||||
Calendar instance = Calendar.getInstance();
|
||||
instance.add(Calendar.SECOND, time);
|
||||
long delaySeconds = instance.getTimeInMillis() / 1000;
|
||||
//增加延时任务 参数依次为:队列名称、执行时间、任务id
|
||||
boolean result = cache.zAdd(setDelayQueueName(), delaySeconds, jobId);
|
||||
log.info("增加延时任务, 缓存key {}, 等待时间 {}", setDelayQueueName(), time);
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user