Authored by mali

批量操作性能优化

@@ -28,13 +28,14 @@ public class OrderOperateTask implements Callable<Integer> { @@ -28,13 +28,14 @@ public class OrderOperateTask implements Callable<Integer> {
28 28
29 private OrderOperateRecordMapper orderOperateRecordMapper; 29 private OrderOperateRecordMapper orderOperateRecordMapper;
30 30
31 - public OrderOperateTask(String orderCode, Integer type, Integer uid, String userName, String oldInfo, Integer updateTime) { 31 + public OrderOperateTask(String orderCode, Integer type, Integer uid, String userName, String oldInfo, Integer updateTime, OrderOperateRecordMapper orderOperateRecordMapper) {
32 this.uid = uid; 32 this.uid = uid;
33 this.orderCode = orderCode; 33 this.orderCode = orderCode;
34 this.type = type; 34 this.type = type;
35 this.userName = userName; 35 this.userName = userName;
36 this.oldInfo = oldInfo; 36 this.oldInfo = oldInfo;
37 this.updateTime = updateTime; 37 this.updateTime = updateTime;
  38 + this.orderOperateRecordMapper = orderOperateRecordMapper;
38 } 39 }
39 40
40 @Override 41 @Override
@@ -2527,7 +2527,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -2527,7 +2527,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
2527 } 2527 }
2528 2528
2529 private void saveOrderOperateRecord(String orderCode, UserHelper userInfo, int operateType, String oldInfo) { 2529 private void saveOrderOperateRecord(String orderCode, UserHelper userInfo, int operateType, String oldInfo) {
2530 - executorService.submit(new OrderOperateTask(orderCode, operateType, userInfo.getUserId(), userInfo.getUserName(), oldInfo, DateUtil.getCurrentTimeSeconds())); 2530 + executorService.submit(new OrderOperateTask(orderCode, operateType, userInfo.getUserId(), userInfo.getUserName(), oldInfo, DateUtil.getCurrentTimeSeconds(), orderOperateRecordMapper));
2531 /*OrderOperateRecord optRecord = new OrderOperateRecord(); 2531 /*OrderOperateRecord optRecord = new OrderOperateRecord();
2532 optRecord.setOrderCode(orderCode); 2532 optRecord.setOrderCode(orderCode);
2533 optRecord.setType(operateType); 2533 optRecord.setType(operateType);