单店一定是主店
This commit is contained in:
@@ -159,7 +159,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
public Boolean add(ShopInfoAddDTO shopInfoAddDTO) {
|
||||
// 如果店铺类型是单店,是否主店要设为否
|
||||
if (ShopTypeEnum.ONLY.getValue().equals(shopInfoAddDTO.getShopType())) {
|
||||
shopInfoAddDTO.setIsHeadShop(YesNoEnum.NO.value());
|
||||
shopInfoAddDTO.setIsHeadShop(YesNoEnum.YES.value());
|
||||
if (shopInfoAddDTO.getMainId() != null) {
|
||||
throw new CzgException("单店不允许设置主店ID");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user