添加前端传递数据校验

This commit is contained in:
韩鹏辉 2024-07-10 17:40:52 +08:00
parent 90501ccfb1
commit 7214d9d4fc
1 changed files with 0 additions and 5 deletions

View File

@ -120,16 +120,11 @@ public class TbProskuConServiceImpl implements TbProskuConService {
throw new BadRequestException("对应的耗材信息不存在");
}
TbProductSku tbProductSku= tbProductSkuRepository.findById(skuInfo.getSkuId()).orElseGet(TbProductSku::new);
if(ObjectUtil.isNull(tbProductSku)||ObjectUtil.isNull(tbProductSku.getId())){
throw new BadRequestException("规格信息不存在");
}
int count=tbProskuConRepository.countByConInfoIdAndProductSkuIdAndShopId(resource.getConsInfoId(), skuInfo.getSkuId(), skuInfo.getShopId(), resource.getProductId());
if(count<=0){
TbProskuCon tbProskuCon=new TbProskuCon();