jiaosong
2023-08-25 8f918cb6db02c39e67ce7b0d77cc1be5ed26edaf
server/src/main/java/doumeemes/service/system/impl/WxLoginServiceImpl.java
@@ -19,6 +19,7 @@
import doumeemes.dao.ext.DepartmentExtMapper;
import doumeemes.dao.ext.dto.QueryCompanyUserExtDTO;
import doumeemes.dao.ext.dto.WxLoginDTO;
import doumeemes.dao.ext.dto.WxLoginOutDTO;
import doumeemes.dao.ext.vo.CompanyUserExtListVO;
import doumeemes.dao.ext.vo.WxLoginVO;
import doumeemes.dao.system.SystemUserMapper;
@@ -111,7 +112,7 @@
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到绑定部门信息");
        }
        Company company = companyExtMapper.selectById(department.getCompanyId());
        if(Objects.isNull(company)||company.getStatus().equals(Constants.ONE)){
        if(Objects.isNull(company)||company.getStatus().equals(Constants.ZERO)){
            wxLoginVO.setLoginStatus(Constants.ONE);
            return wxLoginVO;
        }
@@ -223,4 +224,14 @@
        }
    }
    @Override
    public void wxLoginOut(WxLoginOutDTO wxLoginOutDTO) {
        if(!Objects.isNull(wxLoginOutDTO)&&!Objects.isNull(wxLoginOutDTO.getCompanyUserId())){
            companyUserExtMapper.update(null,new UpdateWrapper<CompanyUser>()
                    .set("UNIONID","").set("OPENID","")
                    .eq("id",wxLoginOutDTO.getCompanyUserId())
            );
        }
    }
}