|
|
|
@ -37,7 +37,14 @@ public class ProductGroupInformationServiceImpl extends ServiceImpl<ProductGroup |
|
|
|
|
|
|
|
@Override |
|
|
|
public void productGroupInformationSave(ProductGroupInformationEntity data) { |
|
|
|
|
|
|
|
// 校验 |
|
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
|
map.put("site", data.getSite()); |
|
|
|
map.put("product_group_id", data.getProductGroupId()); |
|
|
|
int count = productGroupInformationMapper.selectByMap(map).size(); |
|
|
|
if (count > 0) { |
|
|
|
throw new RuntimeException("商品组编码已存在!"); |
|
|
|
} |
|
|
|
productGroupInformationMapper.insert(data); |
|
|
|
|
|
|
|
} |
|
|
|
|