jiangping
2023-08-18 40609a1bd11ce79445562ac23f16af23a48c3933
server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java
@@ -11,6 +11,7 @@
import doumeemes.core.utils.Constants;
import doumeemes.core.utils.HttpsUtil;
import doumeemes.core.utils.Utils;
import doumeemes.dao.business.model.Company;
import doumeemes.dao.business.model.CompanyUser;
import doumeemes.dao.business.model.Department;
import doumeemes.dao.ext.CompanyExtMapper;
@@ -69,6 +70,8 @@
    @Autowired
    private SystemLoginLogService systemLoginLogService;
    @Autowired
    private CompanyExtMapper companyExtMapper;
    /**
@@ -107,6 +110,11 @@
        if(Objects.isNull(department)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到绑定部门信息");
        }
        Company company = companyExtMapper.selectById(department.getCompanyId());
        if(Objects.isNull(company)||company.getStatus().equals(Constants.ZERO)){
            wxLoginVO.setLoginStatus(Constants.ONE);
            return wxLoginVO;
        }
        SystemUser systemUser = systemUserMapper.selectById(companyUser.getUserId());
        //查询用户数据
        LoginDTO dto = new LoginDTO();
@@ -137,6 +145,9 @@
            wxLoginVO.setLoginStatus(Constants.ZERO);
            wxLoginVO.setSession(session);
            return wxLoginVO;
        }catch (BusinessException e) {
            wxLoginVO.setLoginStatus(Constants.ONE);
            return wxLoginVO;
        }catch (AuthenticationException e) {
            BusinessException ee = null;
            loginLog.setSuccess(Boolean.FALSE);