|
|
@ -1,7 +1,9 @@
|
|
|
|
package com.ms.api.spi.move;
|
|
|
|
package com.ms.api.spi.move;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.doudian.open.gson.Gson;
|
|
|
|
import com.jinritemai.cloud.base.api.BaseRequest;
|
|
|
|
import com.jinritemai.cloud.base.api.BaseRequest;
|
|
|
|
import com.jinritemai.cloud.base.api.BaseResponse;
|
|
|
|
import com.jinritemai.cloud.base.api.BaseResponse;
|
|
|
|
import com.jinritemai.cloud.base.api.ExtensionService;
|
|
|
|
import com.jinritemai.cloud.base.api.ExtensionService;
|
|
|
@ -43,6 +45,8 @@ public class FailRetryMoveTasksService extends SPIBaseService implements Extensi
|
|
|
|
private MoveCollectTaskService moveCollectTaskService;
|
|
|
|
private MoveCollectTaskService moveCollectTaskService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private MoveProductPublishBufferService moveProductPublishBufferService;
|
|
|
|
private MoveProductPublishBufferService moveProductPublishBufferService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private MoveShopSettingService moveShopSettingService;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public BaseResponse<Ret> handle(BaseRequest<FailRetryMoveTasksRequestDTO> req) {
|
|
|
|
public BaseResponse<Ret> handle(BaseRequest<FailRetryMoveTasksRequestDTO> req) {
|
|
|
@ -97,10 +101,16 @@ public class FailRetryMoveTasksService extends SPIBaseService implements Extensi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
MoveCollectTask moveCollectTask = moveCollectTaskService.getMoveCollectTask(moveCollectTaskDetail.getMoveCollectTaskId(), shopId);
|
|
|
|
MoveCollectTask moveCollectTask = moveCollectTaskService.getMoveCollectTask(moveCollectTaskDetail.getMoveCollectTaskId(), shopId);
|
|
|
|
if (BeanUtil.isEmpty(moveCollectTask.getCondition())) {
|
|
|
|
String condition=moveCollectTask.getCondition();
|
|
|
|
|
|
|
|
if (BeanUtil.isEmpty(condition)) {
|
|
|
|
return R.fail("未找到配置信息!无法重试,请使用链接重新搬家!");
|
|
|
|
return R.fail("未找到配置信息!无法重试,请使用链接重新搬家!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MoveShopSetting shopMoveCondition = moveShopSettingService.getDetailByShopId(shopId);
|
|
|
|
|
|
|
|
shopMoveCondition.setSkipSeason(reason);
|
|
|
|
|
|
|
|
String shopMoveConditionStr = JSON.toJSONString(shopMoveCondition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.fail) || Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.cancel)
|
|
|
|
if (Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.fail) || Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.cancel)
|
|
|
|
|| Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.delete) || Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.skip)) {
|
|
|
|
|| Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.delete) || Objects.equals(moveCollectTaskDetail.getStatus(), StatusConst.skip)) {
|
|
|
|
MoveCollectTaskDetail moveCollectTaskDetail1 = new MoveCollectTaskDetail();
|
|
|
|
MoveCollectTaskDetail moveCollectTaskDetail1 = new MoveCollectTaskDetail();
|
|
|
@ -114,7 +124,7 @@ public class FailRetryMoveTasksService extends SPIBaseService implements Extensi
|
|
|
|
MoveCollectTask moveCollectTask1 = new MoveCollectTask();
|
|
|
|
MoveCollectTask moveCollectTask1 = new MoveCollectTask();
|
|
|
|
moveCollectTask1.setMoveCollectTaskId(moveCollectTask.getMoveCollectTaskId());
|
|
|
|
moveCollectTask1.setMoveCollectTaskId(moveCollectTask.getMoveCollectTaskId());
|
|
|
|
moveCollectTask1.setGmtModified(new Date());
|
|
|
|
moveCollectTask1.setGmtModified(new Date());
|
|
|
|
moveCollectTask1.setCondition(moveCollectTask.getCondition());
|
|
|
|
moveCollectTask1.setCondition(shopMoveConditionStr);
|
|
|
|
moveCollectTaskService.updateByPrimaryKey(moveCollectTask1);
|
|
|
|
moveCollectTaskService.updateByPrimaryKey(moveCollectTask1);
|
|
|
|
|
|
|
|
|
|
|
|
int priority = getTaskPriority(shopId);
|
|
|
|
int priority = getTaskPriority(shopId);
|
|
|
|