Commit a918056d authored by 年畅's avatar 年畅 🛀

fix

parent f5258b74
......@@ -374,7 +374,7 @@ public class OrderConvertController {
public Result orderRepair(@RequestBody Order order) {
logger.info("orderRepair start!");
try {
// routeService.orderRepair();
routeService.orderRepair();
} catch (Exception e) {
logger.error("TemporaryController[orderRepair]failed,request:{},cause by: {}", e);
return Result.failureData(e.getMessage());
......
......@@ -1928,34 +1928,38 @@ public class OrderRoutingServiceImpl implements OrderRoutingService, Initializin
public void orderRepair() {
int count = 0;
OrderQuery orderQuery = new OrderQuery();
orderQuery.setOrderAtEnd(new Date(1681999200000L));
orderQuery.setOrderAtStart(new Date(1646064000000L));
orderQuery.setOrderAtEnd(new Date());
orderQuery.setOrderAtStart(new Date(1751558400000L));
orderQuery.setSize(1000);
try {
for (int i = 0; i < dbSize; i++) {
for (int j = 0; j < tbSize; j++) {
Long lastId = null;
for (; ; ) {
orderQuery.setLastId(lastId);
for (Long sellerId : ListSellerConst.list) {
orderQuery.setSellerId(sellerId);
for (int i = 0; i < dbSize; i++) {
for (int j = 0; j < tbSize; j++) {
Long lastId = null;
for (; ; ) {
orderQuery.setLastId(lastId);
List<Long> idList = commonManager.scanOrderId(orderQuery, i, j);
if (CollectionUtils.isEmpty(idList)) {
break;
}
List<Long> idList = commonManager.scanOrderId(orderQuery, i, j);
if (CollectionUtils.isEmpty(idList)) {
break;
}
List<Order> orderList = commonManager.listOrderById(idList, i, j);
execute1123(idList, i, j);
execute0(orderList, i, j);
count += idList.size();
lastId = idList.get(idList.size() - 1);
logger.info("repair_order_last_id:{}, count:{}, i:{}, j:{}", lastId, count, i, j);
count += idList.size();
lastId = idList.get(idList.size() - 1);
logger.info("repair_order_last_id_1:{}, count:{}, i:{}, j:{}", lastId, count, i, j);
Result<String> redisData = redisManager.get("repair_order_shut_down_key");
if (redisData.isStatus() && Objects.nonNull(redisData.getData())) {
logger.info("[orderRepair]shut down!");
return;
}
if (idList.size() < 1000) {
break;
Result<String> redisData = redisManager.get("repair_order_shut_down_key_1");
if (redisData.isStatus() && Objects.nonNull(redisData.getData())) {
logger.info("[orderRepair]shut down!");
return;
}
if (idList.size() < 1000) {
break;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment