|
@@ -1,6 +1,7 @@
|
|
package com.usky.dxtop.service.job;
|
|
package com.usky.dxtop.service.job;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.usky.dxtop.model.Charge;
|
|
import com.usky.dxtop.model.Charge;
|
|
import com.usky.dxtop.model.MsgLog;
|
|
import com.usky.dxtop.model.MsgLog;
|
|
@@ -46,12 +47,14 @@ public class CardJob {
|
|
LambdaQueryWrapper<MsgLog> msgLogLambdaQueryWrapper = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<MsgLog> msgLogLambdaQueryWrapper = Wrappers.lambdaQuery();
|
|
msgLogLambdaQueryWrapper.eq(MsgLog::getBusinessId,order.getId());
|
|
msgLogLambdaQueryWrapper.eq(MsgLog::getBusinessId,order.getId());
|
|
List<MsgLog> msgLogs = msgLogService.list(msgLogLambdaQueryWrapper);
|
|
List<MsgLog> msgLogs = msgLogService.list(msgLogLambdaQueryWrapper);
|
|
- Charge one = chargeService.one(msgLogs.get(0).getId());
|
|
|
|
- if (null == one){
|
|
|
|
- cartError(order);
|
|
|
|
- }else {
|
|
|
|
- order.setOrderFlag(OrderStatus.COMPLETE.getCode());
|
|
|
|
- orderService.updateById(order);
|
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(msgLogs)){
|
|
|
|
+ Charge one = chargeService.one(msgLogs.get(0).getId());
|
|
|
|
+ if (null == one){
|
|
|
|
+ cartError(order);
|
|
|
|
+ }else {
|
|
|
|
+ order.setOrderFlag(OrderStatus.COMPLETE.getCode());
|
|
|
|
+ orderService.updateById(order);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
log.error("---orderJob---异常"+e.getMessage());
|
|
log.error("---orderJob---异常"+e.getMessage());
|