多店铺需求

This commit is contained in:
Tankaikai 2025-04-07 15:49:36 +08:00
parent e3af4c3587
commit 8b8cfa0b3a
1 changed files with 3 additions and 1 deletions

View File

@ -146,7 +146,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
// 如果店铺类型是单店是否主店要设为否
if (ShopTypeEnum.ONLY.getValue().equals(shopInfoAddDTO.getShopType())) {
shopInfoAddDTO.setIsHeadShop(YesNoEnum.NO.value());
shopInfoAddDTO.setMainId(null);
if(shopInfoAddDTO.getMainId() != null) {
throw new CzgException("单店不允许设置主店ID");
}
} else {
if (shopInfoAddDTO.getIsHeadShop() == null) {
throw new CzgException("加盟店/连锁店请选择是否主店");