Commit c4210097 by 徐高华

企微托管

parent bc1cb50d
...@@ -256,13 +256,7 @@ public class QywxOpenController { ...@@ -256,13 +256,7 @@ public class QywxOpenController {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser(); WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId(); String wxEnterpriseId = login.getWxEnterpriseId();
String enterpriseId = login.getEnterpriseId(); String enterpriseId = login.getEnterpriseId();
ServiceResponse<OpenStaffLicenseDTO> resp = this.openStaffApiService.getLicenseInfo(wxEnterpriseId, enterpriseId);
if (!resp.isSuccess()) {
return RestResponse.failure("9999", resp.getMessage());
}
OpenQwAccountInfoVO vo = this.getCheckInfo(wxEnterpriseId, enterpriseId); OpenQwAccountInfoVO vo = this.getCheckInfo(wxEnterpriseId, enterpriseId);
vo.setUseNum(resp.getResult().getUseNum());
vo.setValidNum(resp.getResult().getValidNum());
return RestResponse.successResult(vo); return RestResponse.successResult(vo);
} }
...@@ -302,9 +296,6 @@ public class QywxOpenController { ...@@ -302,9 +296,6 @@ public class QywxOpenController {
if (vo.getStatus() == 2) { if (vo.getStatus() == 2) {
return "当前企微服务已过期"; return "当前企微服务已过期";
} }
ServiceResponse<OpenStaffLicenseDTO> resp = this.openStaffApiService.getLicenseInfo(wxEnterpriseId, enterpriseId);
vo.setUseNum(resp.getResult().getUseNum());
vo.setValidNum(resp.getResult().getValidNum());
if (vo.getGicTotal() <= vo.getUseNum()) { if (vo.getGicTotal() <= vo.getUseNum()) {
return "托管账号数量已达上线"; return "托管账号数量已达上线";
} }
...@@ -331,6 +322,9 @@ public class QywxOpenController { ...@@ -331,6 +322,9 @@ public class QywxOpenController {
vo.setVersion(dto.getModuleVersion()); vo.setVersion(dto.getModuleVersion());
} }
} }
ServiceResponse<OpenStaffLicenseDTO> hbResp = this.openStaffApiService.getLicenseInfo(wxEnterpriseId, enterpriseId);
vo.setUseNum(hbResp.getResult().getUseNum());
vo.setValidNum(hbResp.getResult().getValidNum());
log.info("OpenQwAccountInfoVO={}", JSONObject.toJSONString(vo)); log.info("OpenQwAccountInfoVO={}", JSONObject.toJSONString(vo));
return vo; return vo;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment