Explorar o código

Merge remote-tracking branch 'origin/master'

user5 %!s(int64=5) %!d(string=hai) anos
pai
achega
4e9574ced1

+ 2 - 0
src/main/java/com/jeeplus/modules/wexinpackage/access/util/access/AddressBookUtil.java

@@ -82,6 +82,8 @@ public class AddressBookUtil {
         //3.错误消息处理
         if (null != jsonObject) {
             if (0 != jsonObject.getInt("errcode")) {
+                string = "flagOrder";
+                System.out.println("查找用户失败--------------------------------------------");
                 log.error("查找用户失败");
             }
         }

+ 4 - 4
src/main/java/com/jeeplus/modules/wexinpackage/access/util/access/WeChatParamsUtil.java

@@ -7,13 +7,13 @@ public class WeChatParamsUtil {
     //token
     public final static String token ="9ZmhR1CRrGIOSMxCcznVccQN8f3XX2w4GMoacioSkovFuJdCwMBvTHsJpGf67bUVtkHEqLzYIyaamn9dEyPJKcVxgIeERJpAwa9uNtW68EXYwOBvR2blpiQ3aM9l7ndqMJThfEWlcUz8oBzOh6XZPQqTcLwb95yHhwQO14KdIXj6Q1nko9rjp-9c-LsrzoS_SNu4TxTqTqoYj5ztp3J9Wg";
     //企业id
-    public final static String corpId ="ww24ca7e7771df9148";
+    public final static String corpId ="wwb8c36b4b35675fe9";
     //应用的凭证密钥
-    public final static String agentSecret = "alO4uidZ2hKK3p5HdrWxIKz5YgvT0vvNiMb9r_1vS7s";
+    public final static String agentSecret = "kekm2UtL_82xFr6tMi4N2cWQFMHNKhLD-0bwIIaUQP0";
     //通讯录秘钥 (获取tokenid)
-    public final static String contactsSecret ="rXEUF9kGCLZKyWs4WQie_F1Ix3g5dP_e3X2Yls5tiuA";
+    public final static String contactsSecret ="X67oIAoM8_SR9VhW7exd4_JKaeW5st8DKxvNluTZfi4";
     //企业应用的id,整型。可在应用的设置页面查看
-    public final static int agentId =1000005;
+    public final static int agentId = 1000002;
     //通讯录token
     public final static String contacts_token = "AT84tGkhkt09pSYTxi3NoCQcn7F6o";
     // encodingAESKey

+ 4 - 2
src/main/java/com/jeeplus/modules/wexintheorder/web/TheOrderController.java

@@ -2,7 +2,6 @@ package com.jeeplus.modules.wexintheorder.web;
 
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.web.BaseController;
-import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.wexinpackage.access.entity.WeChatUser;
 import com.jeeplus.modules.wexinpackage.access.util.access.AccessTokenUtil;
 import com.jeeplus.modules.wexinpackage.access.util.access.AddressBookUtil;
@@ -74,6 +73,9 @@ public class TheOrderController extends BaseController {
                 //获取acton
                 String accessToken = AccessTokenUtil.getAccessToken(WeChatParamsUtil.corpId, WeChatParamsUtil.contactsSecret);
                 String user = AddressBookUtil.getUser(accessToken, userId);
+                if (user.equals("flagOrder")){
+                    return "modules/weixin/theorder/requestError";
+                }
                 String name = getMaps(user);
                 TheOrder userOrderEcho = getUserOrderEcho(userId,name);
                 //验证今天是否预定过餐
@@ -255,7 +257,7 @@ public class TheOrderController extends BaseController {
             theOrder.setSpecific("");
         }
     }
-
+    //获取用户名
     public String getMaps(String sMsg){
         String name = "";
         JSONObject jsonObject = JSONObject.fromObject(sMsg);

+ 1 - 1
src/main/resources/jeeplus.properties

@@ -250,5 +250,5 @@ bos_buck_name=newxgccpm
 serverDomain=http://192.168.2.4:18080/total_process
 
 #订餐回调
-backUrl = http://yf.xgccpm.cns/weXin/theOrder/orderFrom
+backUrl = http://total2.viphk.ngrok.org/weXin/theOrder/orderFrom
 

+ 1 - 1
src/main/webapp/webpage/modules/weixin/theorder/error.jsp

@@ -17,6 +17,6 @@
     <link rel="stylesheet" href="${ctx}/static/weixin/example/example.css"/>
 </head>
 <body>
-请在企业微信中打开。
+<p class="weui-footer__text">请在企业微信中打开。</p>
 </body>
 </html>

+ 1 - 1
src/main/webapp/webpage/modules/weixin/theorder/orderMeal.jsp

@@ -207,7 +207,7 @@
     });
     $("#department").select({
         title: "选择部门",
-        items: ["财务", "工程","管理咨询","资产评估","其他"]
+        items: ["财务", "工程","管理咨询","资产评估"]
     });
     $("#specific2").select({
         title: "选择级联部门(财务)",

+ 26 - 0
src/main/webapp/webpage/modules/weixin/theorder/requestError.jsp

@@ -0,0 +1,26 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>失败</title>
+    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
+    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
+    <meta content="yes" name="apple-mobile-web-app-capable">
+    <meta content="black" name="apple-mobile-web-app-status-bar-style">
+    <meta content="telephone=no" name="format-detection">
+    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui-for-work.min.css"/>
+    <script src="/static/jquery/jquery-2.1.1.min.js"></script>
+    <script src="/static/weixin/js/jquery-weui.min.js"></script>
+    <link rel="stylesheet" href="/static/weixin/css/jquery-weui.min.css"/>
+    <link rel="stylesheet" href="/static/wechat/wechat-btn.css"/>
+    <link rel="stylesheet" href="${ctx}/static/weixin/example/example.css"/>
+</head>
+<body>
+<div class="weui-footer">
+    <p class="weui-footer__links">
+    </p>
+    <p class="weui-footer__text">获取用户失败,请联系管理员。</p>
+</div>
+</body>
+</html>