bug
jiangqs
2023-07-29 95be57d7842d54c7043a5cdc448b1938e5ece058
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java
@@ -18,6 +18,7 @@
import com.ruoyi.system.api.domain.vo.AppMiniRegisterVo;
import com.ruoyi.system.api.domain.vo.ShopRelUserVo;
import com.ruoyi.system.api.model.*;
import com.ruoyi.system.api.service.RemoteConfigService;
import com.ruoyi.system.api.service.RemoteMemberService;
import com.ruoyi.system.api.service.RemoteShopService;
import com.ruoyi.system.api.service.RemoteUserService;
@@ -50,6 +51,8 @@
    @Autowired
    private RedisService redisService;
    @Autowired
    private RemoteConfigService remoteConfigService;
    /**
     * 登录
     */
@@ -135,15 +138,16 @@
                recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "很遗憾,访问IP已被列入系统黑名单",Constants.FROM_MINI_APP);
                throw new ServiceException("很遗憾,访问IP已被列入系统黑名单");
            }
            String servicePhone = remoteConfigService.getServicePhone().getData();
            if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
            {
                recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除",Constants.FROM_MINI_APP);
                throw new ServiceException("028-88888888",501);
                throw new ServiceException(servicePhone,501);
            }
            if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
            {
                recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户已停用,请联系管理员",Constants.FROM_MINI_APP);
                throw new ServiceException("028-88888888",501);
                throw new ServiceException(servicePhone,501);
            }
            recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功",Constants.FROM_MINI_APP);
        }