|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.ms.api.spi.move;
|
|
|
|
package com.ms.api.spi.move;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
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;
|
|
|
@ -80,11 +81,11 @@ public class CancelCollectTaskService extends SPIBaseService implements Extensio
|
|
|
|
if (!Arrays.toString(statusArray).contains(moveCollectTaskDetail.getStatus())) {
|
|
|
|
if (!Arrays.toString(statusArray).contains(moveCollectTaskDetail.getStatus())) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// $moveDetailExt = $this->getMoveCollectTaskDetailExt($shopId, $detailId);
|
|
|
|
// $moveDetailExt = $this->getMoveCollectTaskDetailExt($shopId, $detailId); // 扩展表,目前没用到
|
|
|
|
// if ($this->checkMoveQueueIsProcessing($shopId, $detailId)) {
|
|
|
|
if (this.checkMoveQueueIsProcessing(shopId, detailId)) {
|
|
|
|
// $skipCancelDetailIds[] = $detailId;
|
|
|
|
skipCancelDetailIds.add(detailId);
|
|
|
|
// continue;
|
|
|
|
continue;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
int delRow = this.delQueueByDetailId(shopId, detailId);
|
|
|
|
int delRow = this.delQueueByDetailId(shopId, detailId);
|
|
|
|
// $delPicRow = $this->delToPicQueueByDetailId($shopId, $detailId); // 和上面重复了,可能不需要 ???
|
|
|
|
// $delPicRow = $this->delToPicQueueByDetailId($shopId, $detailId); // 和上面重复了,可能不需要 ???
|
|
|
@ -142,4 +143,14 @@ public class CancelCollectTaskService extends SPIBaseService implements Extensio
|
|
|
|
private int delBufferByDetailId(Long shopId, Long detailId) {
|
|
|
|
private int delBufferByDetailId(Long shopId, Long detailId) {
|
|
|
|
return moveProductPublishBufferService.deleteByShopId(shopId, detailId);
|
|
|
|
return moveProductPublishBufferService.deleteByShopId(shopId, detailId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Boolean checkMoveQueueIsProcessing(Long shopId, Long detailId) {
|
|
|
|
|
|
|
|
Long toPicQueueId = moveProductPublishToPicQueueService.getLockedQueueId(shopId, detailId);
|
|
|
|
|
|
|
|
Long picQueueId = moveProductPublishQueueService.getLockedQueueId(shopId, detailId);
|
|
|
|
|
|
|
|
if (!ObjectUtil.isEmpty(toPicQueueId) || !ObjectUtil.isEmpty(picQueueId)) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|