Commit dbdc01ed by huangZW

111

parent 4f664542
package com.gic.haoban.manage.web.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -12,6 +14,7 @@ import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import com.gic.haoban.manage.web.config.Config;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.interceptor.WebInterceptor;
import com.gic.haoban.manage.web.vo.InfoVo;
import com.gic.wechat.api.dto.qywx.UserDTO;
import com.gic.wechat.api.service.qywx.QywxCorpApiService;
......@@ -26,13 +29,14 @@ public class InfoController extends WebBaseController{
private StaffApiService staffApiService;
@Autowired
private WxEnterpriseApiService wxEnterpriseApiService;
private static Logger logger= LoggerFactory.getLogger(InfoController.class);
@Autowired
private Config config;
@RequestMapping("get-info-by-code")
public HaobanResponse getInfoByCode(String code) {
String userDTOJson = qywxCorpApiService.getCodeSession(config.getWxSuiteid(),code);
// String userDTOJson = qywxCorpApiService.getUserInfoSimple(config.getWxSuiteid(),code);
logger.info("userDTOJson=============>{}",userDTOJson);
UserDTO user = JSON.parseObject(userDTOJson, UserDTO.class);
String userId = user.getUserid();
StaffDTO loginStaff = staffApiService.selectByUserId(userId);
......
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