|
|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.cyksj.common.constant.Constant;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
+import com.cyksj.common.task.GlobalThreadPoolTaskExecutor;
|
|
|
import com.cyksj.common.util.J11HttpC;
|
|
|
import com.cyksj.common.util.Jsons;
|
|
|
import com.cyksj.enums.GatewayApiCode;
|
|
|
@@ -83,6 +84,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|
|
|
private final OrderDiscountPlusPurchaseSkuRelationMapper orderDiscountPlusPurchaseSkuRelationMapper;
|
|
|
|
|
|
+ private static final GlobalThreadPoolTaskExecutor TASK_EXECUTOR = GlobalThreadPoolTaskExecutor.getInstance();
|
|
|
+
|
|
|
private final static String VERIFY_CODE_SECRET = "q1w2e3";
|
|
|
|
|
|
@Override
|
|
|
@@ -366,6 +369,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//寻找快满编车队进行占座
|
|
|
relation = groupsRelationMapper.selectRandomOneRelationByGroupsId(groups.getId());
|
|
|
if (relation == null) {
|
|
|
+ Long groupsId = groups.getId();
|
|
|
+ TASK_EXECUTOR.execute(() -> groupsMapper.updateAvailableNum(groupsId));
|
|
|
throw BusinessRuntimeException.getInstance("系统繁忙,请重试...");
|
|
|
}
|
|
|
}
|