20230922-ljl-fixBug
qiushengjie 1 year ago
parent 2d9ec0156a
commit 974ba43da1

@ -40,7 +40,7 @@ public abstract class TaskBaseService implements TaskHandler {
if(isPoolFull()){ return;}
execute();
}catch (Throwable e){
//e.printStackTrace();
e.printStackTrace();
log.info("任务执行失败 : ",e.getMessage());
}
}
@ -53,7 +53,7 @@ public abstract class TaskBaseService implements TaskHandler {
execute();
transactionManager.commit(status);
}catch (Throwable e){
//e.printStackTrace();
e.printStackTrace();
log.info("任务执行失败 : ",e.getMessage());
transactionManager.rollback(status);
}

@ -30,5 +30,5 @@ public interface MaterialAuditStatusBufferService {
List<MaterialAuditStatusBuffer> selectTimeoutBuffer(int limit);
int deleteBatchByMaterialId(List<Integer> failMaterialIds);
int deleteBatchByMaterialId(List<String> failMaterialIds);
}

@ -29,7 +29,7 @@ public interface MaterialBizAuditStatusLogService {
int updateMaterialBizAuditStatusLog(MaterialBizAuditStatusLog materialBizAuditStatusLog);
int updateBatchByMaterialIds(MaterialBizAuditStatusLog materialBizAuditStatusLog, List<Integer> failMaterialIds);
int updateBatchByMaterialIds(MaterialBizAuditStatusLog materialBizAuditStatusLog, List<String> failMaterialIds);
List<MaterialBizAuditStatusLog> getMaterialBizAuditStatusLogByMaterialIds(List<String> materialIds);

@ -70,7 +70,7 @@ public class MaterialAuditStatusBufferServiceImpl implements MaterialAuditStatus
}
@Override
public int deleteBatchByMaterialId(List<Integer> failMaterialIds) {
public int deleteBatchByMaterialId(List<String> failMaterialIds) {
return materialAuditStatusBufferMapper.deleteBatchByMaterialId(failMaterialIds);
}

@ -74,7 +74,7 @@ public class MaterialBizAuditStatusLogServiceImpl implements MaterialBizAuditSta
}
@Override
public int updateBatchByMaterialIds(MaterialBizAuditStatusLog materialBizAuditStatusLog, List<Integer> failMaterialIds) {
public int updateBatchByMaterialIds(MaterialBizAuditStatusLog materialBizAuditStatusLog, List<String> failMaterialIds) {
return materialBizAuditStatusLogMapper.updateBatchByMaterialIds(materialBizAuditStatusLog, failMaterialIds);
}

@ -19,6 +19,7 @@ import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.stream.Collectors;
/**
* buffer20
@ -82,7 +83,7 @@ public class CheckAuditStatusTimeoutTaskService extends TaskBaseService {
break;
}
List<Integer> failMaterialIds = Arrays.asList(timeOutBuffers.stream().map(MaterialAuditStatusBuffer::getMaterialId).toArray(Integer[]::new));
List<String> failMaterialIds = timeOutBuffers.stream().map(MaterialAuditStatusBuffer::getMaterialId).collect(Collectors.toList());
try {
MaterialBizAuditStatusLog materialBizAuditStatusLog = new MaterialBizAuditStatusLog();
materialBizAuditStatusLog.setStatus(StatusConst.fail);

@ -243,7 +243,7 @@ public class MoveMaterialAuditProcessTaskService extends TaskBaseService {
String materialId = queueMsg.getMaterialId();
long shopId = queueMsg.getShopId();
MaterialBizAuditStatusLog mLog = materialBizAuditStatusLogService.getShopMaterialBizAuditStatusLog(shopId, (new StrObjMap() {{
put("material_id", materialId);
put("materialId", materialId);
}}));
if (!mLog.getStatus().equals(StatusConst.wait)) {
return;

@ -32,5 +32,5 @@ public interface MaterialAuditStatusBufferMapper {
List<MaterialAuditStatusBuffer> selectTimeoutBuffer(int limit);
int deleteBatchByMaterialId(List<Integer> failMaterialIds);
int deleteBatchByMaterialId(List<String> failMaterialIds);
}

@ -30,7 +30,7 @@ public interface MaterialBizAuditStatusLogMapper {
int updateByPrimaryKeySelectiveByMaterialId(MaterialBizAuditStatusLog materialBizAuditStatusLog);
int updateBatchByMaterialIds(MaterialBizAuditStatusLog materialBizAuditStatusLog, List<Integer> failMaterialIds);
int updateBatchByMaterialIds(MaterialBizAuditStatusLog materialBizAuditStatusLog, List<String> failMaterialIds);
List<MaterialBizAuditStatusLog> getMaterialBizAuditStatusLogByMaterialIds(List<String> materialIds);

Loading…
Cancel
Save