Commit f63ff47a by huangZW

111

parent 8fe816ee
......@@ -18,7 +18,7 @@ import com.gic.wechat.api.service.qywx.QywxCorpApiService;
@RestController
public class InfoController extends WebBaseController{
public static final String siteId = "ww2c34dc56739bb105";
// public static final String siteId = "ww2c34dc56739bb105";
@Autowired
private QywxCorpApiService qywxCorpApiService;
......@@ -31,7 +31,7 @@ public class InfoController extends WebBaseController{
private Config config;
@RequestMapping("get-info-by-code")
public HaobanResponse getInfoByCode(String code) {
String userDTOJson = qywxCorpApiService.getUserInfoSimple(siteId,code);
String userDTOJson = qywxCorpApiService.getUserInfoSimple(config.getSuiteId(),code);
UserDTO user = JSON.parseObject(userDTOJson, UserDTO.class);
String userId = user.getUserid();
StaffDTO loginStaff = staffApiService.selectByUserId(userId);
......@@ -46,7 +46,7 @@ public class InfoController extends WebBaseController{
String wxEnterpriseId = loginStaff.getWxEnterpriseId();
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseApiService.getOne(wxEnterpriseId);
String accesstoken = qywxCorpApiService.getCorpAccessToken(wxEnterpriseDTO.getCorpid(), siteId);
String accesstoken = qywxCorpApiService.getCorpAccessToken(wxEnterpriseDTO.getCorpid(), config.getSuiteId());
InfoVo infoVo = new InfoVo();
infoVo.setAccessToken(accesstoken);
infoVo.setStaffId(loginStaff.getStaffId());
......
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