Authored by mali

批量操作性能优化

... ... @@ -28,13 +28,14 @@ public class OrderOperateTask implements Callable<Integer> {
private OrderOperateRecordMapper orderOperateRecordMapper;
public OrderOperateTask(String orderCode, Integer type, Integer uid, String userName, String oldInfo, Integer updateTime) {
public OrderOperateTask(String orderCode, Integer type, Integer uid, String userName, String oldInfo, Integer updateTime, OrderOperateRecordMapper orderOperateRecordMapper) {
this.uid = uid;
this.orderCode = orderCode;
this.type = type;
this.userName = userName;
this.oldInfo = oldInfo;
this.updateTime = updateTime;
this.orderOperateRecordMapper = orderOperateRecordMapper;
}
@Override
... ...
... ... @@ -2527,7 +2527,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
}
private void saveOrderOperateRecord(String orderCode, UserHelper userInfo, int operateType, String oldInfo) {
executorService.submit(new OrderOperateTask(orderCode, operateType, userInfo.getUserId(), userInfo.getUserName(), oldInfo, DateUtil.getCurrentTimeSeconds()));
executorService.submit(new OrderOperateTask(orderCode, operateType, userInfo.getUserId(), userInfo.getUserName(), oldInfo, DateUtil.getCurrentTimeSeconds(), orderOperateRecordMapper));
/*OrderOperateRecord optRecord = new OrderOperateRecord();
optRecord.setOrderCode(orderCode);
optRecord.setType(operateType);
... ...