|
@@ -8,6 +8,7 @@ import com.txz.cif.configurer.Parameters;
|
|
|
import com.txz.cif.dubbo.client.OrderDubboServiceClient;
|
|
import com.txz.cif.dubbo.client.OrderDubboServiceClient;
|
|
|
import com.txz.cif.model.RedEnvelope;
|
|
import com.txz.cif.model.RedEnvelope;
|
|
|
import com.txz.cif.service.DayCutService;
|
|
import com.txz.cif.service.DayCutService;
|
|
|
|
|
+import com.txz.cif.service.FlowService;
|
|
|
import com.txz.cif.service.RechargeRecordService;
|
|
import com.txz.cif.service.RechargeRecordService;
|
|
|
import com.txz.cif.service.RedEnvelopeService;
|
|
import com.txz.cif.service.RedEnvelopeService;
|
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
|
@@ -48,12 +49,9 @@ public class GeneralJob {
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
private RechargeRecordService rechargeRecordService;
|
|
private RechargeRecordService rechargeRecordService;
|
|
|
-
|
|
|
|
|
- @Resource
|
|
|
|
|
- private RedEnvelopeService redEnvelopeService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
- private ShardingMapper shardingMapper;
|
|
|
|
|
|
|
+ private RedEnvelopeService redEnvelopeService;
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
private FlowService flowService;
|
|
private FlowService flowService;
|
|
@@ -73,11 +71,14 @@ public class GeneralJob {
|
|
|
}
|
|
}
|
|
|
return ReturnT.SUCCESS;
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 结算
|
|
* 结算
|
|
|
|
|
+ *
|
|
|
* @param param
|
|
* @param param
|
|
|
|
|
+ *
|
|
|
* @return
|
|
* @return
|
|
|
|
|
+ *
|
|
|
* @throws Exception
|
|
* @throws Exception
|
|
|
*/
|
|
*/
|
|
|
@XxlJob("settle")
|
|
@XxlJob("settle")
|
|
@@ -85,13 +86,13 @@ public class GeneralJob {
|
|
|
try {
|
|
try {
|
|
|
logger.info("【执行结算】开始");
|
|
logger.info("【执行结算】开始");
|
|
|
Condition c = new Condition(RedEnvelope.class);
|
|
Condition c = new Condition(RedEnvelope.class);
|
|
|
- c.createCriteria().andEqualTo("status",1).andLessThanOrEqualTo("settleTime", DateUtil.now());
|
|
|
|
|
|
|
+ c.createCriteria().andEqualTo("status", 1).andLessThanOrEqualTo("settleTime", DateUtil.now());
|
|
|
List<RedEnvelope> redEnvelopes = redEnvelopeService.findByCondition(c);
|
|
List<RedEnvelope> redEnvelopes = redEnvelopeService.findByCondition(c);
|
|
|
- if (CollUtil.isNotEmpty(redEnvelopes)){
|
|
|
|
|
- for (RedEnvelope r: redEnvelopes){
|
|
|
|
|
|
|
+ if (CollUtil.isNotEmpty(redEnvelopes)) {
|
|
|
|
|
+ for (RedEnvelope r : redEnvelopes) {
|
|
|
try {
|
|
try {
|
|
|
redEnvelopeService.settle(r);
|
|
redEnvelopeService.settle(r);
|
|
|
- }catch (Exception e) {
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
logger.error("【执行结算】异常:e{}", e);
|
|
logger.error("【执行结算】异常:e{}", e);
|
|
|
return ReturnT.FAIL;
|
|
return ReturnT.FAIL;
|
|
|
}
|
|
}
|
|
@@ -118,7 +119,6 @@ public class GeneralJob {
|
|
|
logger.error("[checkin]:" + ret);
|
|
logger.error("[checkin]:" + ret);
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
return ReturnT.SUCCESS;
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -162,7 +162,7 @@ public class GeneralJob {
|
|
|
}
|
|
}
|
|
|
return ReturnT.SUCCESS;
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@XxlJob("activityStatusJudgmentTimedTask")
|
|
@XxlJob("activityStatusJudgmentTimedTask")
|
|
|
public ReturnT<String> activityStatusJudgmentTimedTask(String param) throws Exception {
|
|
public ReturnT<String> activityStatusJudgmentTimedTask(String param) throws Exception {
|
|
|
try {
|
|
try {
|
|
@@ -175,8 +175,8 @@ public class GeneralJob {
|
|
|
}
|
|
}
|
|
|
return ReturnT.SUCCESS;
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@XxlJob("closeRecharge")
|
|
@XxlJob("closeRecharge")
|
|
|
public ReturnT<String> closeRecharge() throws Exception {
|
|
public ReturnT<String> closeRecharge() throws Exception {
|
|
|
try {
|
|
try {
|