商品模块代码提交
This commit is contained in:
@@ -48,7 +48,7 @@ public class ShopProdUnitDTO implements Serializable {
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private String shopId;
|
||||
private Long shopId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@@ -78,6 +78,7 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
@Override
|
||||
public boolean updateShopProdCategory(ShopProdCategoryDTO dto) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
dto.setShopId(shopId);
|
||||
boolean exists = super.exists(query().eq(ShopProdCategory::getName, dto.getName()).eq(ShopProdCategory::getShopId, shopId).ne(ShopProdCategory::getId, dto.getId()));
|
||||
if (exists) {
|
||||
throw new CzgException("商品分类已存在");
|
||||
|
||||
@@ -80,6 +80,7 @@ public class ShopProdUnitServiceImpl extends ServiceImpl<ShopProdUnitMapper, Sho
|
||||
@Override
|
||||
public boolean updateShopProdUnit(ShopProdUnitDTO dto) {
|
||||
Long shopId = StpKit.USER.getLoginIdAsLong();
|
||||
dto.setShopId(shopId);
|
||||
boolean exists = super.exists(query().eq(ShopProdUnit::getName, dto.getName()).eq(ShopProdUnit::getShopId, shopId).ne(ShopProdUnit::getId, dto.getId()));
|
||||
if (exists) {
|
||||
throw new CzgException("单位名称已存在");
|
||||
|
||||
Reference in New Issue
Block a user