瀏覽代碼

代码优化

黄远 5 年之前
父節點
當前提交
a5e20439cb

+ 1 - 1
lift-system-service/src/main/java/cn/com/ty/lift/system/user/controller/LoginController.java

@@ -159,7 +159,7 @@ public class LoginController {
         RestResponse restResponse = judgeAuthCode(userRequest, WxConstants.APPLET_LOGIN);
         if (restResponse == null) {
             Map<String, String> openIdMap = new HashMap<>();
-            openIdMap.put("appletOpenId", userRequest.getAccount());
+            openIdMap.put("appletOpenId", userRequest.getWeChatOpenId());
             return RestResponse.success(openIdMap, ApiConstants.RESULT_SUCCESS, "获取openId成功");
         }
         return restResponse;

+ 0 - 3
lift-system-service/src/main/java/cn/com/ty/lift/system/wechat/utils/WxUtil.java

@@ -4,14 +4,12 @@ import cn.com.ty.lift.system.wechat.constants.WxConstants;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
-import lombok.extern.slf4j.Slf4j;
 
 /**
  * @author huangyuan
  * @date 2019-12-30
  * @description
  */
-@Slf4j
 public class WxUtil {
 
     /**
@@ -50,7 +48,6 @@ public class WxUtil {
                 .replace("SECRET", appSecret)
                 .replace("CODE", authCode);
         JSONObject result = JSONUtil.parseObj(HttpUtil.get(url));
-        log.error(result.toString());
         if (result.containsKey("openid")) {
             return result.getStr("openid");
         }