单店一定是主店

This commit is contained in:
2025-11-13 18:11:34 +08:00
parent dfcd79cdf1
commit 5e3440cddf

View File

@@ -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");
}