| | |
| | | package com.ruoyi.auth.service; |
| | | |
| | | import com.ruoyi.admin.api.entity.FranchiseeVO; |
| | | import com.ruoyi.admin.api.feignClient.AdminClient; |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.constant.UserConstants; |
| | |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 登录校验方法 |
| | |
| | | |
| | | @Autowired |
| | | private SysRecordLogService recordLogService; |
| | | @Autowired |
| | | private AdminClient adminClient; |
| | | |
| | | /** |
| | | * 登录 |
| | |
| | | userInfo.setIsFranchisee(Boolean.FALSE); |
| | | }else { |
| | | userInfo.setIsFranchisee(Boolean.TRUE); |
| | | // 查询加盟商信息 |
| | | R<FranchiseeVO> franchiseeResult = adminClient.getFranchiseeInfo(user.getFranchiseeId()); |
| | | FranchiseeVO franchiseeVO = franchiseeResult.getData(); |
| | | if(Objects.nonNull(franchiseeVO)){ |
| | | userInfo.setIsDisplay(franchiseeVO.getIsDisplay()); |
| | | } |
| | | } |
| | | if (UserStatus.DELETED.getCode().equals(user.getIsDelete())) { |
| | | recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已被删除"); |