bug--修复新增产品不选分类报错以及去掉ip2region
This commit is contained in:
Binary file not shown.
@ -135,6 +135,9 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public YxStoreProduct saveProduct(YxStoreProduct storeProduct) {
|
public YxStoreProduct saveProduct(YxStoreProduct storeProduct) {
|
||||||
|
if (storeProduct.getStoreCategory().getId() == null) {
|
||||||
|
throw new BadRequestException("分类名称不能为空");
|
||||||
|
}
|
||||||
storeProduct.setCateId(storeProduct.getStoreCategory().getId().toString());
|
storeProduct.setCateId(storeProduct.getStoreCategory().getId().toString());
|
||||||
this.save(storeProduct);
|
this.save(storeProduct);
|
||||||
return storeProduct;
|
return storeProduct;
|
||||||
|
Reference in New Issue
Block a user