This commit is contained in:
2026-01-20 17:43:36 +08:00
parent 64830203f3
commit 4cd71ad35a
2 changed files with 4 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
/**
* 分销员中心-获取邀请码
*/
String getInviteCode(Long shopId, Long shopUserId);
String getInviteCode(Long shopId, Long shopUserId) throws CzgException;
/**
* 分销员中心-实名认证

View File

@@ -205,11 +205,11 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
if (mkDistributionConfigVO == null || mkDistributionConfigVO.getIsEnable() == 0) {
throw new CzgException("店铺分销功能未开启");
}
if (!"auto".equals(mkDistributionConfigVO.getOpenType())) {
throw new CzgException("该店铺不可自行成为分销员");
}
MkDistributionUser mkDistributionUser = getMkDistributionUserByIdAndShopId(shopUser.getId(), shopId);
if (mkDistributionUser == null) {
if (!"auto".equals(mkDistributionConfigVO.getOpenType())) {
throw new CzgException("该店铺不可自行成为分销员");
}
mkDistributionUser = new MkDistributionUser();
mkDistributionUser.setId(shopUser.getId());
mkDistributionUser.setShopId(shopId);