|
|
@@ -1,6 +1,7 @@
|
|
|
package com.usoftchina.uas.office.qywx.controller;
|
|
|
|
|
|
import com.usoftchina.qywx.sdk.AddrBookSdk;
|
|
|
+import com.usoftchina.qywx.sdk.MessageSdk;
|
|
|
import com.usoftchina.qywx.sdk.dto.GetUserInfoResp;
|
|
|
import com.usoftchina.qywx.sdk.dto.GetUserResp;
|
|
|
import com.usoftchina.uas.office.entity.DataCenter;
|
|
|
@@ -11,6 +12,8 @@ import com.usoftchina.uas.office.qywx.manage.service.QywxAgentService;
|
|
|
import com.usoftchina.uas.office.qywx.service.UasEmployeeService;
|
|
|
import com.usoftchina.uas.office.service.DataCenterService;
|
|
|
import com.usoftchina.uas.office.util.StringUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@@ -41,6 +44,8 @@ public class QywxAuthController {
|
|
|
@Autowired
|
|
|
private QywxAgentService agentService;
|
|
|
|
|
|
+ private final Logger logger = LoggerFactory.getLogger(QywxAuthController.class);
|
|
|
+
|
|
|
/**
|
|
|
* 获取身份登录
|
|
|
*
|
|
|
@@ -61,6 +66,7 @@ public class QywxAuthController {
|
|
|
return new ModelAndView("/error");
|
|
|
}
|
|
|
GetUserInfoResp infoResp = addrBookSdk.getUserInfo(agent, code);
|
|
|
+ logger.info("auth人员信息: {}", infoResp.getUserid());
|
|
|
try {
|
|
|
DataSourceHolder.set(dataCenter);
|
|
|
Employee employee = employeeService.getByQywx(infoResp.getUserid());
|