fix
This commit is contained in:
@@ -51,6 +51,10 @@ public class PreFriedProductsServiceImpl implements PreFriedProductsService {
|
||||
if (dto==null||dto.getId() == null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
PreFriedProductsDO preFriedProductsDO = preFriedProductsDAO.queryByProductCode(dto.getProductCode());
|
||||
if (preFriedProductsDO!=null && !preFriedProductsDO.getId().equals(dto.getId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PRODUCTS_CODE_EXIST);
|
||||
}
|
||||
PreFriedProductsDO product = convertToDO(dto);
|
||||
product.setUpdatedTime(new Date());
|
||||
product.setUpdatedUserId(userId);
|
||||
|
||||
Reference in New Issue
Block a user