Commit 44adff37 by 徐高华

Merge branch 'feature/xgh/2406企微托管' into 'developer'

Feature/xgh/2406企微托管

See merge request !1930
parents 4f51472d c4210097
......@@ -256,13 +256,7 @@ public class QywxOpenController {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId();
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) ;
vo.setUseNum(resp.getResult().getUseNum());
vo.setValidNum(resp.getResult().getValidNum());
OpenQwAccountInfoVO vo = this.getCheckInfo(wxEnterpriseId, enterpriseId);
return RestResponse.successResult(vo);
}
......@@ -295,17 +289,17 @@ public class QywxOpenController {
}
private String check(String wxEnterpriseId, String enterpriseId) {
OpenQwAccountInfoVO vo = this.getCheckInfo(wxEnterpriseId,enterpriseId) ;
if(vo.getStatus()==0) {
return "请联系商务经理购买服务后再进行账号托管" ;
OpenQwAccountInfoVO vo = this.getCheckInfo(wxEnterpriseId, enterpriseId);
if (vo.getStatus() == 0) {
return "请联系商务经理购买服务后再进行账号托管";
}
if(vo.getStatus()==2) {
return "当前企微服务已过期" ;
if (vo.getStatus() == 2) {
return "当前企微服务已过期";
}
if(vo.getGicTotal() <= vo.getUseNum()) {
return "托管账号数量已达上线" ;
if (vo.getGicTotal() <= vo.getUseNum()) {
return "托管账号数量已达上线";
}
return null ;
return null;
}
private OpenQwAccountInfoVO getCheckInfo(String wxEnterpriseId, String enterpriseId) {
......@@ -325,9 +319,12 @@ public class QywxOpenController {
String json = dto.getModuleSetting();
WechatWorkServiceSetting bo = JSONObject.parseObject(json, WechatWorkServiceSetting.class);
vo.setGicTotal(bo.getAccountNumber());
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));
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