Commit 25a976f8 by 徐高华

企微托管

parent c58bfb72
...@@ -37,15 +37,22 @@ public class QywxOpenController { ...@@ -37,15 +37,22 @@ public class QywxOpenController {
public RestResponse<OpenStaffVO> getOpenStaff(String staffId , @RequestParam(defaultValue = "0") int authFlag) { public RestResponse<OpenStaffVO> getOpenStaff(String staffId , @RequestParam(defaultValue = "0") int authFlag) {
ServiceResponse<OpenStaffDTO> resp = this.openStaffApiService.getByStaffId(staffId) ; ServiceResponse<OpenStaffDTO> resp = this.openStaffApiService.getByStaffId(staffId) ;
if(!resp.isSuccess()) { if(!resp.isSuccess()) {
return RestResponse.successResult(null) ; return RestResponse.failure("9999","数据查询失败");
} }
OpenStaffVO vo = new OpenStaffVO() ; OpenStaffVO vo = new OpenStaffVO() ;
OpenStaffDTO dto = resp.getResult(); OpenStaffDTO dto = resp.getResult();
String wxEnterpriseId = dto.getWxEnterpriseId() ; String wxEnterpriseId = dto.getWxEnterpriseId() ;
String enterpriseId = dto.getEnterpriseId() ; String enterpriseId = dto.getEnterpriseId() ;
WxEnterpriseDTO en = this.wxEnterpriseApiService.getOne(wxEnterpriseId) ;
vo.setCorpName(en.getCorpName());
StaffDTO staffDTO = this.staffApiService.selectById(staffId) ;
vo.setStaffName(staffDTO.getStaffName());
vo.setStaffImage(staffDTO.getHeadImg());
if(dto.getStatusFlag()==1) { if(dto.getStatusFlag()==1) {
if(authFlag==1) { if(authFlag==1) {
return RestResponse.failure("9999","无需授权,账号托管中"); //return RestResponse.failure("9999","无需授权,账号托管中");
vo.setStatusFlag(1);
return RestResponse.successResult(vo);
} }
vo.setStatusFlag(1); vo.setStatusFlag(1);
}else { }else {
...@@ -64,11 +71,6 @@ public class QywxOpenController { ...@@ -64,11 +71,6 @@ public class QywxOpenController {
vo.setStatusFlag(codeResp.getResult().getStatusFlag()); vo.setStatusFlag(codeResp.getResult().getStatusFlag());
} }
} }
WxEnterpriseDTO en = this.wxEnterpriseApiService.getOne(wxEnterpriseId) ;
vo.setCorpName(en.getCorpName());
StaffDTO staffDTO = this.staffApiService.selectById(staffId) ;
vo.setStaffName(staffDTO.getStaffName());
vo.setStaffImage(staffDTO.getHeadImg());
return RestResponse.successResult(vo); return RestResponse.successResult(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