Althars123 3 éve
szülő
commit
fe21394569

+ 6 - 0
jkt-admin/src/main/java/com/miaxis/system/controller/system/SysLoginController.java

@@ -22,6 +22,8 @@ import com.miaxis.wx.dto.WxResult;
 import com.miaxis.wx.service.WxService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -56,6 +58,8 @@ public class SysLoginController
 
     @Autowired
     private WxService wxService;
+    private static Logger logger = LoggerFactory.getLogger(SysLoginController.class);
+
 
 
 
@@ -113,7 +117,9 @@ public class SysLoginController
     @ApiOperation("用户授权码模式登录")
     public Response<TokenDTO> loginByAuthorizationCode(String authorizationCode ){
         String wxResultStr = wxService.getWxToken(appid, appSecret, authorizationCode, "authorization_code");
+        logger.info("微信授权码登录返回值:"+wxResultStr);
         WxResult wxResult = JSONObject.parseObject(wxResultStr,WxResult.class);
+
         // 生成令牌
         if (wxResult.getErrcode() != null){
             throw new CustomException(wxResult.getErrmsg());

+ 2 - 2
jkt-admin/src/main/resources/application-dev.yml

@@ -79,8 +79,8 @@ spring:
 
 
 app:
-    appId: 123
-    appSecret: 345
+    appId: wxc439503456129660
+    appSecret: f9e43ce4a2709eb118e268827aa63cae
 
 
 

+ 5 - 0
jkt-admin/src/main/resources/application-prod.yml

@@ -77,3 +77,8 @@ spring:
                 # #连接池最大阻塞等待时间(使用负值表示没有限制)
                 max-wait: -1ms
 
+
+app:
+    appId: wxc439503456129660
+    appSecret: f9e43ce4a2709eb118e268827aa63cae
+

+ 1 - 1
jkt-admin/src/main/resources/logback.xml

@@ -17,7 +17,7 @@
 	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
 	    <file>${log.path}/sys-info.log</file>
         <!-- 循环政策:基于时间创建日志文件 -->
-		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
             <!-- 日志文件名格式 -->
 			<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
 			<!-- 日志最大的历史 60天 -->