feat:产品ID不能为空

This commit is contained in:
苏竹红
2025-06-25 20:26:14 +08:00
parent 395fe38362
commit 55ac947ed9
3 changed files with 11 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ public class PreFryRecordsServiceImpl implements PreFryRecordsService {
List<PreFryStageChangesDO> list = new ArrayList<>();
if (addPreFryRecordsFlag(minApplyTypeByStoreCode.getApplyType(), addPreFryRecordsDTO.getCurrentStage())){
addPreFryRecordsDTO.getRecords().forEach(x->{
if (x.getProductId()==null){
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
PreFryRecordsDO preFryRecordsDO = new PreFryRecordsDO();
preFryRecordsDO.setStoreCode(addPreFryRecordsDTO.getStoreCode());
preFryRecordsDO.setProductId(x.getProductId());