商品分类未填写 校验返回

This commit is contained in:
2024-12-06 09:23:16 +08:00
parent 11fd24f813
commit 09eb3ccfad

View File

@@ -417,7 +417,7 @@ public class TbProductServiceImpl implements TbProductService {
}
if (!"coupon".equals(resources.getType())) {
if (resources.getCategoryId() == null) {
throw new BadRequestException("必填内容未填写");
throw new BadRequestException("商品分类未填写");
}
product.setCategoryId(String.valueOf(resources.getCategoryId()));
}