店铺切换

This commit is contained in:
2025-12-15 15:32:20 +08:00
parent 1d5ccbe74b
commit 2da283d4f3
2 changed files with 24 additions and 27 deletions

View File

@@ -76,10 +76,6 @@ public class AuthorizationServiceImpl implements AuthorizationService {
return Map.of("code", captcha.toBase64(), "uuid", captchaKey);
}
public static void main(String[] args) {
System.out.println(DateUtil.format(DateUtil.date(), "HHmm"));
}
@Override
public LoginVO login(SysLoginDTO loginDTO, String platType) {
Object code = redisService.get(RedisCst.LOGIN_CODE + loginDTO.uuid());
@@ -208,8 +204,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
Long headId = StpKit.USER.getHeadId();
long shopId = StpKit.USER.getLoginIdAsLong();
ShopInfo currentInfo = shopInfoService.getById(shopId);
// if (headId != null && currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
if (currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
if (headId != null && currentInfo.getIsHeadShop() != YesNoEnum.YES.value()) {
throw new CzgException("登录账号无权限切换");
}
@@ -224,7 +219,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
}
// 主店铺切换子店铺
if (headId != null && !shopInfo.getMainId().equals(shopId)) {
if (!shopInfo.getMainId().equals(shopId)) {
throw new CzgException("目标店铺非登录账号所有");
}