Browse Source

增加日志

zhouy 1 year ago
parent
commit
2c9b943212

+ 1 - 0
uas-office-core/src/main/java/com/usoftchina/uas/office/service/AbstractService.java

@@ -52,6 +52,7 @@ public abstract class AbstractService {
         try {
             return jdbcTemplate.queryForObject(statement, new BeanPropertyRowMapper<>(targetCls), arguments);
         } catch (EmptyResultDataAccessException e) {
+            e.printStackTrace();
             return null;
         }
     }

+ 6 - 0
uas-office-qywx/src/main/java/com/usoftchina/uas/office/qywx/controller/QywxAuthController.java

@@ -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());