Explorar o código

修改 Assert.isNull(JSONObject ...) 方法bug,增加控制服务配置模板功能

wuxw7 %!s(int64=8) %!d(string=hai) anos
pai
achega
1254c7d457
Modificáronse 31 ficheiros con 1348 adicións e 1516 borrados
  1. 43 0
      ConsoleService/doc/consoleService.docx
  2. 36 42
      ConsoleService/src/main/java/com/java110/console/controller/ConsoleController.java
  3. 43 0
      ConsoleService/src/main/java/com/java110/console/rest/ConsoleRest.java
  4. 8 0
      ConsoleService/src/main/java/com/java110/console/smo/IConsoleServiceSMO.java
  5. 34 0
      ConsoleService/src/main/java/com/java110/console/smo/impl/ConsoleServiceSMOImpl.java
  6. 8 8
      ConsoleService/src/main/resources/application.yml
  7. 32 0
      ConsoleService/src/main/resources/data/list.json
  8. 85 0
      ConsoleService/src/main/resources/data/list_template.json
  9. 17 0
      ConsoleService/src/main/resources/html/footer.html
  10. 3 34
      ConsoleService/src/main/resources/html/index.html
  11. 9 1411
      ConsoleService/src/main/resources/html/list_template.html
  12. 8 0
      ConsoleService/src/main/resources/html/notify.html
  13. 9 0
      ConsoleService/src/main/resources/html/page_header.html
  14. 378 0
      ConsoleService/src/main/resources/html/test.html
  15. 196 0
      ConsoleService/src/main/resources/static/assets/js/grid.locale-cn.js
  16. 341 0
      ConsoleService/src/main/resources/static/javascript/java110_list_template.js
  17. 1 1
      MerchantService/src/main/java/com/java110/merchant/rest/MerchantMemberServiceRest.java
  18. 1 1
      MerchantService/src/main/java/com/java110/merchant/rest/MerchantServiceRest.java
  19. 1 1
      MerchantService/src/main/java/com/java110/merchant/rest/ProductServiceRest.java
  20. 1 1
      MerchantService/src/main/java/com/java110/merchant/smo/impl/MerchantMemberServiceSMOImpl.java
  21. 2 2
      MerchantService/src/main/java/com/java110/merchant/smo/impl/MerchantServiceSMOImpl.java
  22. 2 2
      MerchantService/src/main/java/com/java110/merchant/smo/impl/ProductServiceSMOImpl.java
  23. 3 3
      OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
  24. 1 1
      UserService/src/main/java/com/java110/user/rest/UserServiceRest.java
  25. 3 5
      UserService/src/main/java/com/java110/user/smo/impl/UserServiceSMOImpl.java
  26. 11 0
      java110-bean/src/main/java/com/java110/entity/service/PageData.java
  27. 12 0
      java110-common/src/main/java/com/java110/common/constant/ServiceCodeConstant.java
  28. 2 2
      java110-common/src/main/java/com/java110/common/util/Assert.java
  29. 55 0
      java110-core/src/main/java/com/java110/core/base/controller/BaseController.java
  30. 2 2
      java110-event/src/main/java/com/java110/event/listener/cust/CustDispatchListener.java
  31. 1 0
      java110-service/src/main/java/com/java110/service/configuration/ServiceConfiguration.java

+ 43 - 0
ConsoleService/doc/consoleService.docx

@@ -275,4 +275,47 @@ varchar
 数据状态
 详细参考c_status表
 
+2.4、c_template模型表
+                                    字段
+                                   是否空
+                                    类型
+                                    长度
+                                    描述
+                                 取值说明
+                                      id
+否
+int
+
+
+数据库自增
+template_code
+否
+varchar
+20
+模板编码
+ 模板英文名
+name
+否
+varchar
+50
+模板名称
+
+html_name
+否
+Varchar
+20
+对应HTML文件名称
+
+create_time
+否
+date
+
+创建时间
+系统自动生成
+status_cd
+否
+varchar
+2
+数据状态
+详细参考c_status表
 

+ 36 - 42
ConsoleService/src/main/java/com/java110/console/controller/ConsoleController.java

@@ -2,6 +2,7 @@ package com.java110.console.controller;
 
 import com.java110.common.exception.NoAuthorityException;
 import com.java110.common.exception.SMOException;
+import com.java110.common.util.Assert;
 import com.java110.console.smo.IConsoleServiceSMO;
 import com.java110.core.base.controller.BaseController;
 import com.java110.entity.service.PageData;
@@ -35,29 +36,7 @@ public class ConsoleController extends BaseController {
             // 判断用户是否登录
             checkLogin(pd);
             //2.0 查询菜单信息
-            List<Map> menuItems = consoleServiceSMOImpl.getMenuItemsByManageId(pd.getUserId());
-            List<Map> removeMenuItems = new ArrayList<Map>();
-            for(Map menuItem : menuItems){
-                if(!"-1".equals(menuItem.get("parentId")) && !"1".equals(menuItem.get("level"))){
-                    Map parentMenuItem = this.getMenuItemFromList(menuItems,menuItem.get("parentId").toString());
-                    if(parentMenuItem == null){
-                        continue;
-                    }
-                    if(parentMenuItem.containsKey("subMenus")){
-                        List<Map> subMenus = (List<Map>) parentMenuItem.get("subMenus");
-                        subMenus.add(menuItem);
-                    }else{
-                        List<Map> subMenus = new ArrayList<Map>();
-                        subMenus.add(menuItem);
-                        parentMenuItem.put("subMenus",subMenus);
-                    }
-
-                    removeMenuItems.add(menuItem);
-                }
-            }
-
-            removeMap(menuItems,removeMenuItems);
-            model.addAttribute("menus",menuItems);
+            getMenus(model,pd,consoleServiceSMOImpl.getMenuItemsByManageId(pd.getUserId()));
             //3.0 查询各个系统调用量
         }catch (NoAuthorityException e){
             //跳转到登录页面
@@ -74,31 +53,46 @@ public class ConsoleController extends BaseController {
         }
     }
 
-
-    private Map getMenuItemFromList(List<Map> menuItems,String parentId){
-        for(Map menuItem : menuItems){
-            if(menuItem.get("mId").toString().equals(parentId)){
-                return menuItem;
-            }
-        }
-        return null;
-    }
-
     /**
-     * 删除map
-     * @param menuItems
-     * @param removeMenuItems
+     * 查询数据
+     * @param model
+     * @param request
+     * @return
      */
-    private void removeMap(List<Map> menuItems,List<Map> removeMenuItems){
-        if(removeMenuItems == null  || removeMenuItems.size() == 0){
-            return;
-        }
+    @RequestMapping(path = "/console/list")
+    public String listData(Model model, HttpServletRequest request){
+        String template = "list_template";
+        try {
+            String templateCode = request.getParameter("templateCode");
 
-        for(Map removeMenuItem : removeMenuItems){
-            menuItems.remove(removeMenuItem);
+            Assert.hasLength(templateCode,"请求参数templateCode 不能为空!");
+
+            model.addAttribute("templateCode",templateCode);
+            //1.0 获取对象
+            PageData pd = this.getPageData(request);
+            // 判断用户是否登录
+            checkLogin(pd);
+            //2.0 查询菜单信息
+            getMenus(model,pd,consoleServiceSMOImpl.getMenuItemsByManageId(pd.getUserId()));
+            //3.0 查询各个系统调用量
+        }catch (NoAuthorityException e){
+            //跳转到登录页面
+            template = "redirect:/login";
+        }catch (IllegalArgumentException e){
+            template = "redirect:/system/error";
+        }catch (SMOException e){
+            template = "redirect:/system/error";
+        }catch (Exception e){
+            logger.error("系统异常:",e);
+            template = "redirect:/system/error";
+        }finally {
+            return template;
         }
+
     }
 
+
+
     public IConsoleServiceSMO getConsoleServiceSMOImpl() {
         return consoleServiceSMOImpl;
     }

+ 43 - 0
ConsoleService/src/main/java/com/java110/console/rest/ConsoleRest.java

@@ -0,0 +1,43 @@
+package com.java110.console.rest;
+
+import com.java110.common.constant.ResponseConstant;
+import com.java110.common.exception.SMOException;
+import com.java110.common.factory.DataTransactionFactory;
+import com.java110.console.smo.IConsoleServiceSMO;
+import com.java110.core.base.controller.BaseController;
+import com.java110.entity.service.PageData;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Created by wuxw on 2018/5/8.
+ */
+
+public class ConsoleRest extends BaseController {
+
+    @Autowired
+    private IConsoleServiceSMO consoleServiceSMOImpl;
+
+    @RequestMapping(path = "/consoleRest/queryTemplateCol",method = RequestMethod.POST)
+    public String queryTemplateCol(HttpServletRequest request){
+        PageData pd = null;
+        try {
+            pd = this.getPageData(request);
+            // 判断用户是否登录
+            checkLogin(pd);
+            consoleServiceSMOImpl.getTemplateCol(pd);
+        }catch (IllegalArgumentException e){
+            return DataTransactionFactory.pageResponseJson(pd, ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
+        }catch (SMOException e){
+            return DataTransactionFactory.pageResponseJson(pd,e.getResult().getCode(),e.getMessage(),null);
+        }catch (Exception e){
+            logger.error("异常信息:",e);
+            return DataTransactionFactory.pageResponseJson(pd,ResponseConstant.RESULT_CODE_ERROR,"请求参数出错 ",null);
+        }
+
+        return pd.getResJson().toJSONString();
+    }
+}

+ 8 - 0
ConsoleService/src/main/java/com/java110/console/smo/IConsoleServiceSMO.java

@@ -27,4 +27,12 @@ public interface IConsoleServiceSMO {
      * @throws SMOException
      */
     public void login(PageData pd) throws SMOException;
+
+
+    /**
+     * 查询模板信息
+     * @param pd
+     * @throws SMOException
+     */
+    public void getTemplateCol(PageData pd) throws SMOException;
 }

+ 34 - 0
ConsoleService/src/main/java/com/java110/console/smo/impl/ConsoleServiceSMOImpl.java

@@ -51,6 +51,7 @@ public class ConsoleServiceSMOImpl extends LoggerEngine implements IConsoleServi
         paramIn.put(ServiceCodeConstant.SERVICE_CODE,ServiceCodeConstant.SERVICE_CODE_QUERY_MENU_ITEM);
         paramIn.put(ServiceCodeConstant.SERVICE_CODE_NAME,ServiceCodeConstant.SERVICE_CODE_QUERY_MENU_ITEM_NAME);
         JSONObject businessObj = doExecute(paramIn);
+        Assert.isNotNull(businessObj,"menus","接口返回错误,未包含menus节点");
         JSONArray menus = businessObj.getJSONArray("menus");
         return menus.toJavaList(Map.class);
     }
@@ -78,6 +79,8 @@ public class ConsoleServiceSMOImpl extends LoggerEngine implements IConsoleServi
         //paramIn.put("userPwd", userPwd);
         JSONObject businessObj = doExecute(paramIn);
 
+        Assert.isNotNull(businessObj,"user","查询模板 服务配置错误,返回报文中未包含user节点");
+
         JSONObject user = businessObj.getJSONObject("user");
         //String newPwd = AuthenticationFactory.md5UserPassword(userPwd);
         if(!AuthenticationFactory.md5UserPassword(userPwd).equals(user.getString("userPwd"))){
@@ -100,6 +103,37 @@ public class ConsoleServiceSMOImpl extends LoggerEngine implements IConsoleServi
 
     }
 
+
+    /**
+     * 查询模板信息
+     * @param pd
+     * @throws SMOException
+     */
+    @Override
+    public void getTemplateCol(PageData pd) throws SMOException{
+        String templateCode = pd.getParam().getString("templateCode");
+
+        Assert.hasText(templateCode,"模板编码不能为空");
+
+        Map paramIn = new HashMap();
+        paramIn.put("templateCode", templateCode);
+        paramIn.put(CommonConstant.ORDER_USER_ID,pd.getUserId());
+        paramIn.put(ServiceCodeConstant.SERVICE_CODE,ServiceCodeConstant.SERVICE_CODE_QUERY_CONSOLE_TEMPLATE);
+        paramIn.put(ServiceCodeConstant.SERVICE_CODE_NAME,ServiceCodeConstant.SERVICE_CODE_QUERY_CONSOLE_TEMPLATE_NAME);
+        //paramIn.put("userPwd", userPwd);
+        JSONObject businessObj = doExecute(paramIn);
+
+        Assert.isNotNull(businessObj,"template","查询模板 服务配置错误,返回报文中未包含template节点");
+
+
+        JSONObject templateObj = new JSONObject();
+        templateObj.put("template",businessObj.getJSONArray("template"));
+
+        pd.setResJson(DataTransactionFactory.pageResponseJson(pd.getTransactionId(),ResponseConstant.RESULT_CODE_SUCCESS,"查询成功 ",templateObj));
+
+
+    }
+
     private JSONObject doExecute(Map paramIn) {
         //获取组件
         String appId = MappingCache.getValue(MappingConstant.KEY_CONSOLE_SERVICE_APP_ID);

+ 8 - 8
ConsoleService/src/main/resources/application.yml

@@ -4,7 +4,7 @@ jedis:
       maxTotal: 100
       maxIdle: 20
       maxWaitMillis: 20000
-    host: 135.192.86.200
+    host: 192.168.31.199
     port: 6379
 
 eureka:
@@ -13,7 +13,7 @@ eureka:
     leaseExpirationDurationInSeconds: 30
   client:
     serviceUrl:
-      defaultZone: http://135.192.86.200:8761/eureka/
+      defaultZone: http://192.168.31.199:8761/eureka/
       #defaultZone: http://localhost:8761/eureka/
 server:
   port: 8443
@@ -30,7 +30,7 @@ spring:
     name: console-service
   redis:
     database: 0
-    host: 135.192.86.200
+    host: 192.168.31.199
     port: 6379
     pool:
       max-active: 300
@@ -47,7 +47,7 @@ spring:
     filters: stat,wall,log4j
     poolPreparedStatements: true
     type: com.alibaba.druid.pool.DruidDataSource
-    url: jdbc:mysql://135.192.86.200:3306/TT
+    url: jdbc:mysql://192.168.31.199:3306/TT
     maxPoolPreparedStatementPerConnectionSize: 20
     password: TT@12345678
     testOnBorrow: false
@@ -74,8 +74,8 @@ spring:
 kafka:
   consumer:
     zookeeper:
-      connect: 135.192.86.200:2181
-    servers: 135.192.86.200:9092
+      connect: 192.168.31.199:2181
+    servers: 192.168.31.199:9092
     enable:
       auto:
         commit: true
@@ -93,8 +93,8 @@ kafka:
 
   producer:
     zookeeper:
-      connect: 135.192.86.200:2181
-    servers: 135.192.86.200:9092
+      connect: 192.168.31.199:2181
+    servers: 192.168.31.199:9092
     retries: 0
     batch:
       size: 4096

+ 32 - 0
ConsoleService/src/main/resources/data/list.json

@@ -0,0 +1,32 @@
+{
+
+  "total": "100",
+
+  "page": "2",
+
+  "records": "10",
+
+  "rows" : [
+
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"},
+    {"id":"1","name":"Desktop Computer","note":"note","stock":"Yes","ship":"FedEx", "sdate":"2007-12-03"}
+
+  ]
+
+}

+ 85 - 0
ConsoleService/src/main/resources/data/list_template.json

@@ -0,0 +1,85 @@
+{
+  "meta": {
+    "code": "0000",
+    "message": "成功",
+    "responseTime": "20180508192009",
+    "transactionId": "112093847"
+  },
+  "data": {
+    "template": [{
+      "colName": "AppId",
+      "colModel": {
+        "name": "id",
+        "index": "id",
+        "width": 60,
+        "sorttype": "int",
+        "editable": "true"
+      }
+    }, {
+      "colName": "日期",
+      "colModel": {
+        "name": "sdate",
+        "index": "sdate",
+        "width": "90",
+        "editable": "true",
+        "sorttype": "date",
+        "unformat": "pickDate"
+      }
+    },
+      {
+        "colName": "名称",
+        "colModel": {
+          "name": "name",
+          "index": "name",
+          "width": "150",
+          "editable": "true",
+          "editoptions": {
+            "size": "20",
+            "maxlength": "30"
+          }
+        }
+      },
+      {
+        "colName": "状态",
+        "colModel": {
+          "name": "stock",
+          "index": "stock",
+          "width": "70",
+          "editable": "true",
+          "edittype": "checkbox",
+          "editoptions": {
+            "value": "Yes:No"
+          },
+          "unformat": "aceSwitch"
+        }
+      },
+      {
+        "colName": "备注1",
+        "colModel": {
+          "name": "note",
+          "index": "note",
+          "width": "150",
+          "sortable": "false",
+          "editable": "true",
+          "edittype": "textarea",
+          "editoptions": {
+            "rows": "2",
+            "cols": "10"
+          }
+        }
+      },
+      {
+        "colName": "",
+        "colModel": {
+          "name": "do",
+          "index": "",
+          "width": "40",
+          "fixed": "true",
+          "sortable": "false",
+          "resize": "false",
+          "formatter": "function(cellvalue, options, rowObject){\n var temp =\"<div style='margin-left:8px;'><div title='详情记录' style='float:left;cursor:pointer;' class='ui-pg-div' id='jEditButton_3' onclick='detail(\"+rowObject+\")' onmouseover='jQuery(this).addClass('ui-state-hover');' onmouseout='jQuery(this).removeClass('ui-state-hover');'><span class='ui-icon fa-search-plus'/></div></div>\";\n return temp; \n}"
+        }
+      }
+    ]
+  }
+}

+ 17 - 0
ConsoleService/src/main/resources/html/footer.html

@@ -0,0 +1,17 @@
+<div class="footer">
+    <div class="footer-inner">
+        <div class="footer-content">
+						<span class="bigger-120">
+							<span class="blue bolder">控制中心系统</span>
+							java110团队开发&copy; 2013-2018
+						</span>
+
+            &nbsp; &nbsp;
+            <span class="action-buttons">
+							<a href="#">
+								<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
+							</a>
+						</span>
+        </div>
+    </div>
+</div>

+ 3 - 34
ConsoleService/src/main/resources/html/index.html

@@ -25,27 +25,12 @@
         <div class="main-content-inner">
 
             <div class="page-content">
-                <div class="page-header">
-                    <h1>
-                        控制中心首页
-                        <small>
-                            <i class="ace-icon fa fa-angle-double-right"></i>
-                            简介 &amp; 说明
-                        </small>
-                    </h1>
-                </div><!-- /.page-header -->
+                <#include "page_header.html">
 
                 <div class="row">
                     <div class="col-xs-12">
                         <!-- PAGE CONTENT BEGINS -->
-                        <div class="alert alert-block alert-success">
-                            <button type="button" class="close" data-dismiss="alert">
-                                <i class="ace-icon fa fa-times"></i>
-                            </button>
-
-                            <i class="ace-icon fa fa-check green"></i>
-                            这里是一条通知信息
-                        </div>
+                        <#include "notify.html">
 
                         <div class="row">
                             <div class="space-6"></div>
@@ -149,23 +134,7 @@
         </div>
     </div><!-- /.main-content -->
 
-    <div class="footer">
-        <div class="footer-inner">
-            <div class="footer-content">
-						<span class="bigger-120">
-							<span class="blue bolder">控制中心系统</span>
-							java110开发团队开发&copy; 2013-2018
-						</span>
-
-                &nbsp; &nbsp;
-                <span class="action-buttons">
-							<a href="#">
-								<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
-							</a>
-						</span>
-            </div>
-        </div>
-    </div>
+    <#include "footer.html">
 
 </div><!-- /.main-container -->
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 9 - 1411
ConsoleService/src/main/resources/html/list_template.html


+ 8 - 0
ConsoleService/src/main/resources/html/notify.html

@@ -0,0 +1,8 @@
+<div class="alert alert-block alert-success">
+    <button type="button" class="close" data-dismiss="alert">
+        <i class="ace-icon fa fa-times"></i>
+    </button>
+
+    <i class="ace-icon fa fa-check green"></i>
+    这里是一条通知信息
+</div>

+ 9 - 0
ConsoleService/src/main/resources/html/page_header.html

@@ -0,0 +1,9 @@
+<div class="page-header">
+    <h1>
+        控制中心首页
+        <small>
+            <i class="ace-icon fa fa-angle-double-right"></i>
+            简介 &amp; 说明
+        </small>
+    </h1>
+</div><!-- /.page-header -->

+ 378 - 0
ConsoleService/src/main/resources/html/test.html

@@ -0,0 +1,378 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+    <link rel="stylesheet" href="../static/assets/css/bootstrap.min.css" />
+    <!-- page specific plugin styles -->
+    <link rel="stylesheet" href="../static/assets/css/jquery-ui.min.css" />
+    <link rel="stylesheet" href="../static/assets/css/bootstrap-datepicker3.min.css" />
+    <link rel="stylesheet" href="../static/assets/css/ui.jqgrid.min.css" />
+
+
+    <link rel="stylesheet" href="../static/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
+
+    <link rel="stylesheet" href="../static/assets/css/ace-skins.min.css" />
+    <link rel="stylesheet" href="../static/assets/css/ace-rtl.min.css" />
+    <link rel="stylesheet" href="../static/assets/css/fonts.googleapis.com.css" />
+    <link rel="stylesheet" href="../static/assets/font-awesome/4.5.0/css/font-awesome.min.css" />
+</head>
+<body>
+
+<table id="grid-table"></table>
+
+<div id="grid-pager"></div>
+
+
+<script src="../static/assets/js/jquery-2.1.4.min.js"></script>
+<script src="../static/assets/js/jquery.jqGrid.min.js"></script>
+<script src="../static/assets/js/grid.locale-cn.js"></script>
+<script src="../static/javascript/java110_req_data.js"></script>
+
+
+<!-- inline scripts related to this page -->
+<script type="text/javascript">
+
+        var reqJson = createRequestData('queryTemplate','');
+
+        var colNames = [];
+
+        var colModels = [];
+
+
+        $.ajax({
+               type: "POST",
+               url: "../data/list_template.json",
+               data: reqJson,
+               contentType: "application/text",
+               dataType:"text",
+               success: function(data){
+                       processResponse(data);
+                  },
+               error: function(data){
+                   //alertText("网络超时,请稍后再试");
+               }
+            });
+
+
+            function processResponse(data){
+                var data = getResponseInfo(data)
+                if(data.code != "0000"){
+                    alertText(data.msg+",错误ID:"+data.id);
+                    return ;
+                }
+                var templates = data.data.template;
+                if(templates == null || templates == undefined){
+                    return ;
+                }
+
+
+
+                for(var colIndex = 0; colIndex < templates.length; colIndex++){
+                    colNames.push(templates[colIndex].colName);
+                    if(templates[colIndex].colModel.formatter == undefined){
+                        colModels.push(templates[colIndex].colModel);
+                    }else{
+                    colModels.push(JSON.parse(JSON.stringify(templates[colIndex].colModel),function(k,v){
+                      if(v.indexOf && v.indexOf('function') > -1){
+                         return eval("(function(){return "+v+" })()")
+                      }
+                      return v;
+                    }));
+                    }
+                }
+            showGradData(colNames,colModels)
+            }
+
+
+        function showGradData(colNames,colModels){
+
+			jQuery(function($) {
+				var grid_selector = "#grid-table";
+				var pager_selector = "#grid-pager";
+
+
+				var parent_column = $(grid_selector).closest('[class*="col-"]');
+				//resize to fit page size
+				$(window).on('resize.jqGrid', function () {
+					$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
+			    })
+
+				//resize on sidebar collapse/expand
+				$(document).on('settings.ace.jqGrid' , function(ev, event_name, collapsed) {
+					if( event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed' ) {
+						//setTimeout is for webkit only to give time for DOM changes and then redraw!!!
+						setTimeout(function() {
+							$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
+						}, 20);
+					}
+			    })
+
+				jQuery(grid_selector).jqGrid({
+					subGrid : false,
+					//data: grid_data,
+					url: "../data/list.json",
+					datatype: "json",
+					height: 250,
+					colNames:colNames,
+					colModel:colModels,
+					viewrecords : true,
+					rowNum:10,
+					rowList:[10,20,30],
+					pager : pager_selector,
+					altRows: true,
+					multiselect: true,
+			        multiboxonly: true,
+					loadComplete : function() {
+						var table = this;
+						setTimeout(function(){
+							styleCheckbox(table);
+
+							updateActionIcons(table);
+							updatePagerIcons(table);
+							enableTooltips(table);
+						}, 0);
+					},
+
+				});
+				$(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size
+
+
+				//switch element when editing inline
+				function aceSwitch( cellvalue, options, cell ) {
+					setTimeout(function(){
+						$(cell) .find('input[type=checkbox]')
+							.addClass('ace ace-switch ace-switch-5')
+							.after('<span class="lbl"></span>');
+					}, 0);
+				}
+
+				function doItemData(cellvalue, options, rowObject){
+                    var temp ='<div style="margin-left:8px;"><div title="详情记录" style="float:left;cursor:pointer;" class="ui-pg-div" id="jEditButton_3" onclick="detail('+rowObject+')" onmouseover="jQuery(this).addClass("ui-state-hover");" onmouseout="jQuery(this).removeClass(\"ui-state-hover\");"><span class="ui-icon fa-search-plus"/></div></div>';
+                   return '['+cellvalue+']';
+                }
+
+				//enable datepicker
+				function pickDate( cellvalue, options, cell ) {
+					setTimeout(function(){
+						$(cell) .find('input[type=text]')
+							.datepicker({format:'yyyy-mm-dd' , autoclose:true});
+					}, 0);
+				}
+
+
+				//navButtons
+				jQuery(grid_selector).jqGrid('navGrid',pager_selector,
+					{ 	//navbar options
+						edit: true,
+						editicon : 'ace-icon fa fa-pencil blue',
+						add: true,
+						addicon : 'ace-icon fa fa-plus-circle purple',
+						del: true,
+						delicon : 'ace-icon fa fa-trash-o red',
+						search: true,
+						searchicon : 'ace-icon fa fa-search orange',
+						refresh: true,
+						refreshicon : 'ace-icon fa fa-refresh green',
+						view: true,
+						viewicon : 'ace-icon fa fa-search-plus grey',
+					},
+					{
+						//edit record form
+						//closeAfterEdit: true,
+						//width: 700,
+						recreateForm: true,
+						beforeShowForm : function(e) {
+							var form = $(e[0]);
+							form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+							style_edit_form(form);
+						}
+					},
+					{
+						//new record form
+						//width: 700,
+						closeAfterAdd: true,
+						recreateForm: true,
+						viewPagerButtons: false,
+						beforeShowForm : function(e) {
+							var form = $(e[0]);
+							form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar')
+							.wrapInner('<div class="widget-header" />')
+							style_edit_form(form);
+						}
+					},
+					{
+						//delete record form
+						recreateForm: true,
+						beforeShowForm : function(e) {
+							var form = $(e[0]);
+							if(form.data('styled')) return false;
+
+							form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+							style_delete_form(form);
+
+							form.data('styled', true);
+						},
+						onClick : function(e) {
+							//alert(1);
+						}
+					},
+					{
+						//search form
+						recreateForm: true,
+						afterShowSearch: function(e){
+							var form = $(e[0]);
+							form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
+							style_search_form(form);
+						},
+						afterRedraw: function(){
+							style_search_filters($(this));
+						}
+						,
+						multipleSearch: true,
+						/**
+						multipleGroup:true,
+						showQuery: true
+						*/
+					},
+					{
+						//view record form
+						recreateForm: true,
+						beforeShowForm: function(e){
+							var form = $(e[0]);
+							form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
+						}
+					}
+				)
+
+
+
+				function style_edit_form(form) {
+					//enable datepicker on "sdate" field and switches for "stock" field
+					form.find('input[name=sdate]').datepicker({format:'yyyy-mm-dd' , autoclose:true})
+
+					form.find('input[name=stock]').addClass('ace ace-switch ace-switch-5').after('<span class="lbl"></span>');
+							   //don't wrap inside a label element, the checkbox value won't be submitted (POST'ed)
+							  //.addClass('ace ace-switch ace-switch-5').wrap('<label class="inline" />').after('<span class="lbl"></span>');
+
+
+					//update buttons classes
+					var buttons = form.next().find('.EditButton .fm-button');
+					buttons.addClass('btn btn-sm').find('[class*="-icon"]').hide();//ui-icon, s-icon
+					buttons.eq(0).addClass('btn-primary').prepend('<i class="ace-icon fa fa-check"></i>');
+					buttons.eq(1).prepend('<i class="ace-icon fa fa-times"></i>')
+
+					buttons = form.next().find('.navButton a');
+					buttons.find('.ui-icon').hide();
+					buttons.eq(0).append('<i class="ace-icon fa fa-chevron-left"></i>');
+					buttons.eq(1).append('<i class="ace-icon fa fa-chevron-right"></i>');
+				}
+
+				function style_delete_form(form) {
+					var buttons = form.next().find('.EditButton .fm-button');
+					buttons.addClass('btn btn-sm btn-white btn-round').find('[class*="-icon"]').hide();//ui-icon, s-icon
+					buttons.eq(0).addClass('btn-danger').prepend('<i class="ace-icon fa fa-trash-o"></i>');
+					buttons.eq(1).addClass('btn-default').prepend('<i class="ace-icon fa fa-times"></i>')
+				}
+
+				function style_search_filters(form) {
+					form.find('.delete-rule').val('X');
+					form.find('.add-rule').addClass('btn btn-xs btn-primary');
+					form.find('.add-group').addClass('btn btn-xs btn-success');
+					form.find('.delete-group').addClass('btn btn-xs btn-danger');
+				}
+				function style_search_form(form) {
+					var dialog = form.closest('.ui-jqdialog');
+					var buttons = dialog.find('.EditTable')
+					buttons.find('.EditButton a[id*="_reset"]').addClass('btn btn-sm btn-info').find('.ui-icon').attr('class', 'ace-icon fa fa-retweet');
+					buttons.find('.EditButton a[id*="_query"]').addClass('btn btn-sm btn-inverse').find('.ui-icon').attr('class', 'ace-icon fa fa-comment-o');
+					buttons.find('.EditButton a[id*="_search"]').addClass('btn btn-sm btn-purple').find('.ui-icon').attr('class', 'ace-icon fa fa-search');
+				}
+
+				function beforeDeleteCallback(e) {
+					var form = $(e[0]);
+					if(form.data('styled')) return false;
+
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+					style_delete_form(form);
+
+					form.data('styled', true);
+				}
+
+				function beforeEditCallback(e) {
+					var form = $(e[0]);
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+					style_edit_form(form);
+				}
+
+
+
+				//it causes some flicker when reloading or navigating grid
+				//it may be possible to have some custom formatter to do this as the grid is being created to prevent this
+				//or go back to default browser checkbox styles for the grid
+				function styleCheckbox(table) {
+				/**
+					$(table).find('input:checkbox').addClass('ace')
+					.wrap('<label />')
+					.after('<span class="lbl align-top" />')
+
+
+					$('.ui-jqgrid-labels th[id*="_cb"]:first-child')
+					.find('input.cbox[type=checkbox]').addClass('ace')
+					.wrap('<label />').after('<span class="lbl align-top" />');
+				*/
+				}
+
+
+				//unlike navButtons icons, action icons in rows seem to be hard-coded
+				//you can change them like this in here if you want
+				function updateActionIcons(table) {
+					/**
+					var replacement =
+					{
+						'ui-ace-icon fa fa-pencil' : 'ace-icon fa fa-pencil blue',
+						'ui-ace-icon fa fa-trash-o' : 'ace-icon fa fa-trash-o red',
+						'ui-icon-disk' : 'ace-icon fa fa-check green',
+						'ui-icon-cancel' : 'ace-icon fa fa-times red'
+					};
+					$(table).find('.ui-pg-div span.ui-icon').each(function(){
+						var icon = $(this);
+						var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
+						if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
+					})
+					*/
+				}
+
+				//replace icons with FontAwesome icons like above
+				function updatePagerIcons(table) {
+					var replacement =
+					{
+						'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140',
+						'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140',
+						'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140',
+						'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140'
+					};
+					$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function(){
+						var icon = $(this);
+						var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
+
+						if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
+					})
+				}
+
+				function enableTooltips(table) {
+					$('.navtable .ui-pg-button').tooltip({container:'body'});
+					$(table).find('.ui-pg-div').tooltip({container:'body'});
+				}
+
+				//var selr = jQuery(grid_selector).jqGrid('getGridParam','selrow');
+
+				$(document).one('ajaxloadstart.page', function(e) {
+					$.jgrid.gridDestroy(grid_selector);
+					$('.ui-jqdialog').remove();
+				});
+			});
+			}
+		</script>
+</body>
+</html>

+ 196 - 0
ConsoleService/src/main/resources/static/assets/js/grid.locale-cn.js

@@ -0,0 +1,196 @@
+;(function ($) {
+    /**
+     * jqGrid English Translation
+     * Tony Tomov tony@trirand.com
+     * http://trirand.com/blog/
+     * Dual licensed under the MIT and GPL licenses:
+     * http://www.opensource.org/licenses/mit-license.php
+     * http://www.gnu.org/licenses/gpl.html
+     **/
+    $.jgrid = $.jgrid || {};
+    $.extend($.jgrid, {
+        defaults: {
+            recordtext: "{0} - {1}\u3000共 {2} 条",
+            emptyrecords: "无数据显示",
+            loadtext: "读取中...",
+            pgtext: "{0} 共 {1} 页"
+        },
+        search: {
+            caption: "搜索...",
+            Find: "查找",
+            Reset: "重置",
+            odata: [{oper: 'eq', text: '等于\u3000\u3000'}, {oper: 'ne', text: '不等\u3000\u3000'}, {
+                oper: 'lt',
+                text: '小于\u3000\u3000'
+            }, {oper: 'le', text: '小于等于'}, {oper: 'gt', text: '大于\u3000\u3000'}, {
+                oper: 'ge',
+                text: '大于等于'
+            }, {oper: 'bw', text: '开始于'}, {oper: 'bn', text: '不开始于'}, {
+                oper: 'in',
+                text: '属于\u3000\u3000'
+            }, {oper: 'ni', text: '不属于'}, {oper: 'ew', text: '结束于'}, {
+                oper: 'en',
+                text: '不结束于'
+            }, {
+                oper: 'cn', text: '包含\u3000\u3000'
+            }, {
+                oper: 'nc', text: '不包含'
+            }, {
+                oper: 'nu', text: '不存在'
+            }, {
+                oper: 'nn', text: '存在'
+            }],
+            groupOps: [{op: "AND", text: "所有"}, {op: "OR", text: "任一"}]
+        },
+        edit: {
+            addCaption: "添加记录",
+            editCaption: "编辑记录",
+            bSubmit: "提交",
+            bCancel: "取消",
+            bClose: "关闭",
+            saveData: "数据己改变,是否保存?",
+            bYes: "是",
+            bNo: "否",
+            bExit: "取消",
+            msg: {
+                required:"此字段必需",
+                number:"请输入有效数字",
+                minValue:"输值必须大于等于 ",
+                maxValue:"输值必须小于等于 ",
+                email: "这不是有效的e-mail地址",
+                integer: "请输入有效整数",
+                date: "请输入有效时间",
+                url: "无效网址。前缀必须为 ('http://' 或 'https://')",
+                nodefined : " 未定义!",
+                novalue : " 需要返回值!",
+                customarray : "自定义函数需要返回数组!",
+                customfcheck : "必须有自定义函数!"
+            }
+        },
+        view: {
+            caption: "查看记录",
+            bClose: "关闭"
+        },
+        del: {
+            caption: "删除",
+            msg: "删除所选记录?",
+            bSubmit: "删除",
+            bCancel: "取消"
+        },
+        nav: {
+            edittext: "",
+            edittitle: "编辑所选记录",
+            addtext:"",
+            addtitle: "添加新记录",
+            deltext: "",
+            deltitle: "删除所选记录",
+            searchtext: "",
+            searchtitle: "查找",
+            refreshtext: "",
+            refreshtitle: "刷新表格",
+            alertcap: "注意",
+            alerttext: "请选择记录",
+            viewtext: "",
+            viewtitle: "查看所选记录"
+        },
+        col: {
+            caption: "选择列",
+            bSubmit: "确定",
+            bCancel: "取消"
+        },
+        errors: {
+            errcap : "错误",
+            nourl : "没有设置url",
+            norecords: "没有要处理的记录",
+            model : "colNames 和 colModel 长度不等!"
+        },
+        formatter: {
+            integer: {thousandsSeparator: ",", defaultValue: '0'},
+            number: {decimalSeparator: ".", thousandsSeparator: ",", decimalPlaces: 2, defaultValue: '0.00'},
+            currency: {
+                decimalSeparator: ".",
+                thousandsSeparator: ",",
+                decimalPlaces: 2,
+                prefix: "",
+                suffix: "",
+                defaultValue: '0.00'
+            },
+            date: {
+                dayNames:   [
+                    "日", "一", "二", "三", "四", "五", "六",
+                    "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"
+                ],
+                monthNames: [
+                    "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",
+                    "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+                ],
+                AmPm: ["am", "pm", "上午", "下午"],
+                S: function (j) {
+                    return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';
+                },
+                srcformat: 'Y-m-d',
+                newformat: 'n/j/Y',
+                parseRe: /[Tt\\\/:_;.,\t\s-]/,
+                masks: {
+                    // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+                    // and see http://docs.jquery.com/UI/Datepicker/formatDate
+                    // and https://github.com/jquery/globalize#dates for alternative formats used frequently
+                    // one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
+                    // information about date, time, numbers and currency formats used in different countries
+                    // one should just convert the information in PHP format
+                    ISO8601Long: "Y-m-d H:i:s",
+                    ISO8601Short: "Y-m-d",
+                    // short date:
+                    //    n - Numeric representation of a month, without leading zeros
+                    //    j - Day of the month without leading zeros
+                    //    Y - A full numeric representation of a year, 4 digits
+                    // example: 3/1/2012 which means 1 March 2012
+                    ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
+                    // long date:
+                    //    l - A full textual representation of the day of the week
+                    //    F - A full textual representation of a month
+                    //    d - Day of the month, 2 digits with leading zeros
+                    //    Y - A full numeric representation of a year, 4 digits
+                    LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
+                    // long date with long time:
+                    //    l - A full textual representation of the day of the week
+                    //    F - A full textual representation of a month
+                    //    d - Day of the month, 2 digits with leading zeros
+                    //    Y - A full numeric representation of a year, 4 digits
+                    //    g - 12-hour format of an hour without leading zeros
+                    //    i - Minutes with leading zeros
+                    //    s - Seconds, with leading zeros
+                    //    A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+                    FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
+                    // month day:
+                    //    F - A full textual representation of a month
+                    //    d - Day of the month, 2 digits with leading zeros
+                    MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
+                    // short time (without seconds)
+                    //    g - 12-hour format of an hour without leading zeros
+                    //    i - Minutes with leading zeros
+                    //    A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+                    ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
+                    // long time (with seconds)
+                    //    g - 12-hour format of an hour without leading zeros
+                    //    i - Minutes with leading zeros
+                    //    s - Seconds, with leading zeros
+                    //    A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+                    LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
+                    SortableDateTime: "Y-m-d\\TH:i:s",
+                    UniversalSortableDateTime: "Y-m-d H:i:sO",
+                    // month with year
+                    //    Y - A full numeric representation of a year, 4 digits
+                    //    F - A full textual representation of a month
+                    YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
+                },
+                reformatAfterEdit: false
+            },
+            baseLinkUrl: '',
+            showAction: '',
+            target: '',
+            checkbox: {disabled: true},
+            idName: 'id'
+        }
+    });
+})(jQuery);

+ 341 - 0
ConsoleService/src/main/resources/static/javascript/java110_list_template.js

@@ -0,0 +1,341 @@
+var templateCode = $('#templateCode').val();
+var reqJson = JSON.stringify(createRequestData("queryTemplateCol",{"templateCode":templateCode,"pageSign":""}));
+
+var colNames = [];
+
+var colModels = [];
+
+
+$.ajax({
+       type: "POST",
+       url: "/consoleRest/queryTemplateCol",
+       data: reqJson,
+       contentType: "application/text",
+       dataType:"text",
+       success: function(data){
+               processResponse(data);
+          },
+       error: function(data){
+           //alertText("网络超时,请稍后再试");
+       }
+    });
+
+
+   function processResponse(data){
+       var data = getResponseInfo(data)
+       if(data.code != "0000"){
+           alertText(data.msg+",错误ID:"+data.id);
+           return ;
+       }
+       var templates = data.data.template;
+       if(templates == null || templates == undefined){
+           return ;
+       }
+
+
+
+       for(var colIndex = 0; colIndex < templates.length; colIndex++){
+           colNames.push(templates[colIndex].colName);
+           if(templates[colIndex].colModel.formatter == undefined){
+               colModels.push(templates[colIndex].colModel);
+           }else{
+           colModels.push(JSON.parse(JSON.stringify(templates[colIndex].colModel),function(k,v){
+             if(v.indexOf && v.indexOf('function') > -1){
+                return eval("(function(){return "+v+" })()")
+             }
+             return v;
+           }));
+           }
+       }
+   showGradData(colNames,colModels)
+   }
+
+
+function showGradData(colNames,colModels){
+
+	jQuery(function($) {
+		var grid_selector = "#grid-table";
+		var pager_selector = "#grid-pager";
+
+
+		var parent_column = $(grid_selector).closest('[class*="col-"]');
+		//resize to fit page size
+		$(window).on('resize.jqGrid', function () {
+			$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
+	    })
+
+		//resize on sidebar collapse/expand
+		$(document).on('settings.ace.jqGrid' , function(ev, event_name, collapsed) {
+			if( event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed' ) {
+				//setTimeout is for webkit only to give time for DOM changes and then redraw!!!
+				setTimeout(function() {
+					$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
+				}, 20);
+			}
+	    })
+
+		jQuery(grid_selector).jqGrid({
+			subGrid : false,
+			//data: grid_data,
+			url: "../data/list.json",
+			datatype: "json",
+			height: 250,
+			colNames:colNames,
+			colModel:colModels,
+			viewrecords : true,
+			rowNum:10,
+			rowList:[10,20,30],
+			pager : pager_selector,
+			altRows: true,
+			multiselect: true,
+	        multiboxonly: true,
+			loadComplete : function() {
+				var table = this;
+				setTimeout(function(){
+					styleCheckbox(table);
+
+					updateActionIcons(table);
+					updatePagerIcons(table);
+					enableTooltips(table);
+				}, 0);
+			},
+
+		});
+		$(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size
+
+
+		//switch element when editing inline
+		function aceSwitch( cellvalue, options, cell ) {
+			setTimeout(function(){
+				$(cell) .find('input[type=checkbox]')
+					.addClass('ace ace-switch ace-switch-5')
+					.after('<span class="lbl"></span>');
+			}, 0);
+		}
+
+		function doItemData(cellvalue, options, rowObject){
+            var temp ='<div style="margin-left:8px;"><div title="详情记录" style="float:left;cursor:pointer;" class="ui-pg-div" id="jEditButton_3" onclick="detail('+rowObject+')" onmouseover="jQuery(this).addClass("ui-state-hover");" onmouseout="jQuery(this).removeClass(\"ui-state-hover\");"><span class="ui-icon fa-search-plus"/></div></div>';
+           return '['+cellvalue+']';
+        }
+
+		//enable datepicker
+		function pickDate( cellvalue, options, cell ) {
+			setTimeout(function(){
+				$(cell) .find('input[type=text]')
+					.datepicker({format:'yyyy-mm-dd' , autoclose:true});
+			}, 0);
+		}
+
+
+		//navButtons
+		jQuery(grid_selector).jqGrid('navGrid',pager_selector,
+			{ 	//navbar options
+				edit: true,
+				editicon : 'ace-icon fa fa-pencil blue',
+				add: true,
+				addicon : 'ace-icon fa fa-plus-circle purple',
+				del: true,
+				delicon : 'ace-icon fa fa-trash-o red',
+				search: true,
+				searchicon : 'ace-icon fa fa-search orange',
+				refresh: true,
+				refreshicon : 'ace-icon fa fa-refresh green',
+				view: true,
+				viewicon : 'ace-icon fa fa-search-plus grey',
+			},
+			{
+				//edit record form
+				//closeAfterEdit: true,
+				//width: 700,
+				recreateForm: true,
+				beforeShowForm : function(e) {
+					var form = $(e[0]);
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+					style_edit_form(form);
+				}
+			},
+			{
+				//new record form
+				//width: 700,
+				closeAfterAdd: true,
+				recreateForm: true,
+				viewPagerButtons: false,
+				beforeShowForm : function(e) {
+					var form = $(e[0]);
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar')
+					.wrapInner('<div class="widget-header" />')
+					style_edit_form(form);
+				}
+			},
+			{
+				//delete record form
+				recreateForm: true,
+				beforeShowForm : function(e) {
+					var form = $(e[0]);
+					if(form.data('styled')) return false;
+
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+					style_delete_form(form);
+
+					form.data('styled', true);
+				},
+				onClick : function(e) {
+					//alert(1);
+				}
+			},
+			{
+				//search form
+				recreateForm: true,
+				afterShowSearch: function(e){
+					var form = $(e[0]);
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
+					style_search_form(form);
+				},
+				afterRedraw: function(){
+					style_search_filters($(this));
+				}
+				,
+				multipleSearch: true,
+				/**
+				multipleGroup:true,
+				showQuery: true
+				*/
+			},
+			{
+				//view record form
+				recreateForm: true,
+				beforeShowForm: function(e){
+					var form = $(e[0]);
+					form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class="widget-header" />')
+				}
+			}
+		)
+
+
+
+		function style_edit_form(form) {
+			//enable datepicker on "sdate" field and switches for "stock" field
+			form.find('input[name=sdate]').datepicker({format:'yyyy-mm-dd' , autoclose:true})
+
+			form.find('input[name=stock]').addClass('ace ace-switch ace-switch-5').after('<span class="lbl"></span>');
+					   //don't wrap inside a label element, the checkbox value won't be submitted (POST'ed)
+					  //.addClass('ace ace-switch ace-switch-5').wrap('<label class="inline" />').after('<span class="lbl"></span>');
+
+
+			//update buttons classes
+			var buttons = form.next().find('.EditButton .fm-button');
+			buttons.addClass('btn btn-sm').find('[class*="-icon"]').hide();//ui-icon, s-icon
+			buttons.eq(0).addClass('btn-primary').prepend('<i class="ace-icon fa fa-check"></i>');
+			buttons.eq(1).prepend('<i class="ace-icon fa fa-times"></i>')
+
+			buttons = form.next().find('.navButton a');
+			buttons.find('.ui-icon').hide();
+			buttons.eq(0).append('<i class="ace-icon fa fa-chevron-left"></i>');
+			buttons.eq(1).append('<i class="ace-icon fa fa-chevron-right"></i>');
+		}
+
+		function style_delete_form(form) {
+			var buttons = form.next().find('.EditButton .fm-button');
+			buttons.addClass('btn btn-sm btn-white btn-round').find('[class*="-icon"]').hide();//ui-icon, s-icon
+			buttons.eq(0).addClass('btn-danger').prepend('<i class="ace-icon fa fa-trash-o"></i>');
+			buttons.eq(1).addClass('btn-default').prepend('<i class="ace-icon fa fa-times"></i>')
+		}
+
+		function style_search_filters(form) {
+			form.find('.delete-rule').val('X');
+			form.find('.add-rule').addClass('btn btn-xs btn-primary');
+			form.find('.add-group').addClass('btn btn-xs btn-success');
+			form.find('.delete-group').addClass('btn btn-xs btn-danger');
+		}
+		function style_search_form(form) {
+			var dialog = form.closest('.ui-jqdialog');
+			var buttons = dialog.find('.EditTable')
+			buttons.find('.EditButton a[id*="_reset"]').addClass('btn btn-sm btn-info').find('.ui-icon').attr('class', 'ace-icon fa fa-retweet');
+			buttons.find('.EditButton a[id*="_query"]').addClass('btn btn-sm btn-inverse').find('.ui-icon').attr('class', 'ace-icon fa fa-comment-o');
+			buttons.find('.EditButton a[id*="_search"]').addClass('btn btn-sm btn-purple').find('.ui-icon').attr('class', 'ace-icon fa fa-search');
+		}
+
+		function beforeDeleteCallback(e) {
+			var form = $(e[0]);
+			if(form.data('styled')) return false;
+
+			form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+			style_delete_form(form);
+
+			form.data('styled', true);
+		}
+
+		function beforeEditCallback(e) {
+			var form = $(e[0]);
+			form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class="widget-header" />')
+			style_edit_form(form);
+		}
+
+
+
+		//it causes some flicker when reloading or navigating grid
+		//it may be possible to have some custom formatter to do this as the grid is being created to prevent this
+		//or go back to default browser checkbox styles for the grid
+		function styleCheckbox(table) {
+		/**
+			$(table).find('input:checkbox').addClass('ace')
+			.wrap('<label />')
+			.after('<span class="lbl align-top" />')
+
+
+			$('.ui-jqgrid-labels th[id*="_cb"]:first-child')
+			.find('input.cbox[type=checkbox]').addClass('ace')
+			.wrap('<label />').after('<span class="lbl align-top" />');
+		*/
+		}
+
+
+		//unlike navButtons icons, action icons in rows seem to be hard-coded
+		//you can change them like this in here if you want
+		function updateActionIcons(table) {
+			/**
+			var replacement =
+			{
+				'ui-ace-icon fa fa-pencil' : 'ace-icon fa fa-pencil blue',
+				'ui-ace-icon fa fa-trash-o' : 'ace-icon fa fa-trash-o red',
+				'ui-icon-disk' : 'ace-icon fa fa-check green',
+				'ui-icon-cancel' : 'ace-icon fa fa-times red'
+			};
+			$(table).find('.ui-pg-div span.ui-icon').each(function(){
+				var icon = $(this);
+				var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
+				if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
+			})
+			*/
+		}
+
+		//replace icons with FontAwesome icons like above
+		function updatePagerIcons(table) {
+			var replacement =
+			{
+				'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140',
+				'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140',
+				'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140',
+				'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140'
+			};
+			$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function(){
+				var icon = $(this);
+				var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
+
+				if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
+			})
+		}
+
+		function enableTooltips(table) {
+			$('.navtable .ui-pg-button').tooltip({container:'body'});
+			$(table).find('.ui-pg-div').tooltip({container:'body'});
+		}
+
+		//var selr = jQuery(grid_selector).jqGrid('getGridParam','selrow');
+
+		$(document).one('ajaxloadstart.page', function(e) {
+			$.jgrid.gridDestroy(grid_selector);
+			$('.ui-jqdialog').remove();
+		});
+	});
+	}

+ 1 - 1
MerchantService/src/main/java/com/java110/merchant/rest/MerchantMemberServiceRest.java

@@ -256,7 +256,7 @@ public class MerchantMemberServiceRest extends BaseController implements IMercha
         try{
             reqParam = this.simpleValidateJSON(data);
 
-            Assert.isNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
+            Assert.isNotNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
 
             //resultMerchantInfo = iMerchantMemberServiceSMO.soDeleteMerchantMember(reqParam.getJSONArray("data"));
 

+ 1 - 1
MerchantService/src/main/java/com/java110/merchant/rest/MerchantServiceRest.java

@@ -285,7 +285,7 @@ public class MerchantServiceRest extends BaseController implements IMerchantServ
         try{
             reqParam = this.simpleValidateJSON(data);
 
-            Assert.isNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
+            Assert.isNotNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
 
             resultMerchantInfo = iMerchantServiceSMO.soDeleteMerchantInfo(reqParam.getJSONArray("data"));
 

+ 1 - 1
MerchantService/src/main/java/com/java110/merchant/rest/ProductServiceRest.java

@@ -285,7 +285,7 @@ public class ProductServiceRest extends BaseController implements IProductServic
         try{
             reqParam = this.simpleValidateJSON(data);
 
-            Assert.isNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
+            Assert.isNotNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
 
             resultProductInfo = iProductServiceSMO.soDeleteProductInfo(reqParam.getJSONArray("data"));
 

+ 1 - 1
MerchantService/src/main/java/com/java110/merchant/smo/impl/MerchantMemberServiceSMOImpl.java

@@ -137,7 +137,7 @@ public class MerchantMemberServiceSMOImpl extends BaseServiceSMO implements IMer
     @Override
     public String soMerchantMemberServiceForOrderService(JSONObject mInfoJson) throws Exception {
 
-        Assert.isNull(mInfoJson,"data","请求报文缺少 data 节点,请检查");
+        Assert.isNotNull(mInfoJson,"data","请求报文缺少 data 节点,请检查");
 
         JSONObject merchantInfos = mInfoJson.getJSONObject("data");
 

+ 2 - 2
MerchantService/src/main/java/com/java110/merchant/smo/impl/MerchantServiceSMOImpl.java

@@ -145,7 +145,7 @@ public class MerchantServiceSMOImpl extends BaseServiceSMO implements IMerchantS
     @Override
     public String soMerchantServiceForOrderService(JSONObject mInfoJson) throws Exception {
 
-        Assert.isNull(mInfoJson,"data","请求报文缺少 data 节点,请检查");
+        Assert.isNotNull(mInfoJson,"data","请求报文缺少 data 节点,请检查");
 
         JSONArray merchantInfos = mInfoJson.getJSONArray("data");
 
@@ -399,7 +399,7 @@ public class MerchantServiceSMOImpl extends BaseServiceSMO implements IMerchantS
         for(int boIdIndex = 0 ; boIdIndex < datas.size(); boIdIndex++){
             JSONObject data = datas.getJSONObject(boIdIndex);
 
-            Assert.isNull(data,"boId","当前节点中没有包含boId节点格式错误"+data);
+            Assert.isNotNull(data,"boId","当前节点中没有包含boId节点格式错误"+data);
 
             // 复原Merchant
             doDeleteBoMerchant(data);

+ 2 - 2
MerchantService/src/main/java/com/java110/merchant/smo/impl/ProductServiceSMOImpl.java

@@ -145,7 +145,7 @@ public class ProductServiceSMOImpl extends BaseServiceSMO implements IProductSer
     @Override
     public String soProductServiceForOrderService(JSONObject mInfoJson) throws Exception {
 
-        Assert.isNull(mInfoJson,"data","请求报文缺少 data 节点,请检查");
+        Assert.isNotNull(mInfoJson,"data","请求报文缺少 data 节点,请检查");
 
         JSONArray productInfos = mInfoJson.getJSONArray("data");
 
@@ -399,7 +399,7 @@ public class ProductServiceSMOImpl extends BaseServiceSMO implements IProductSer
         for(int boIdIndex = 0 ; boIdIndex < datas.size(); boIdIndex++){
             JSONObject data = datas.getJSONObject(boIdIndex);
 
-            Assert.isNull(data,"boId","当前节点中没有包含boId节点格式错误"+data);
+            Assert.isNotNull(data,"boId","当前节点中没有包含boId节点格式错误"+data);
 
             // 复原Product
             doDeleteBoProduct(data);

+ 3 - 3
OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java

@@ -318,7 +318,7 @@ public class OrderServiceSMOImpl extends BaseServiceSMO implements IOrderService
                 throw new IllegalArgumentException("请求报文中busiOrder 节点中没有对应的 busiObj 节点,请检查"+busiOrderJson);
             }*/
 
-            Assert.isNull(busiOrderJson,"busiObj","请求报文中busiOrder 节点中没有对应的 busiObj 节点,请检查"+busiOrderJson);
+            Assert.isNotNull(busiOrderJson,"busiObj","请求报文中busiOrder 节点中没有对应的 busiObj 节点,请检查"+busiOrderJson);
 
             BusiOrder busiOrderObj = JSONObject.parseObject(busiOrderJson.getJSONObject("busiObj").toJSONString(),BusiOrder.class);
 
@@ -356,7 +356,7 @@ public class OrderServiceSMOImpl extends BaseServiceSMO implements IOrderService
                 throw new IllegalArgumentException("请求报文中busiOrder 节点中没有对应的 data 节点,请检查"+busiOrderJson);
             }*/
 
-            Assert.isNull(busiOrderJson,"data","请求报文中busiOrder 节点中没有对应的 data 节点,请检查"+busiOrderJson);
+            Assert.isNotNull(busiOrderJson,"data","请求报文中busiOrder 节点中没有对应的 data 节点,请检查"+busiOrderJson);
 
             //处理data 节点
             JSONObject data = busiOrderJson.getJSONObject("data");
@@ -552,7 +552,7 @@ public class OrderServiceSMOImpl extends BaseServiceSMO implements IOrderService
         //由于撤单,作废订单我们只支持一个购物车操作
         Set keys = datasTmp.keySet();
         Object key =  keys.toArray()[0];
-        Assert.isNull(datasTmp.get(key).getJSONObject(0),"olId","数据错误,需要作废的订单的第一个节点为空,或不包含olId节点,请核查"+datasTmp);
+        Assert.isNotNull(datasTmp.get(key).getJSONObject(0),"olId","数据错误,需要作废的订单的第一个节点为空,或不包含olId节点,请核查"+datasTmp);
         String oldOlId = datasTmp.get(key).getJSONObject(0).getString("olId");
 
 

+ 1 - 1
UserService/src/main/java/com/java110/user/rest/UserServiceRest.java

@@ -345,7 +345,7 @@ public class UserServiceRest extends BaseController implements IUserService {
         try{
             reqParam = this.simpleValidateJSON(data);
 
-            Assert.isNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
+            Assert.isNotNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam);
 
             resultUserInfo = iUserServiceSMO.soDeleteCustInfo(reqParam.getJSONArray("data"));
 

+ 3 - 5
UserService/src/main/java/com/java110/user/smo/impl/UserServiceSMOImpl.java

@@ -7,7 +7,7 @@ import com.java110.common.constant.StateConstant;
 import com.java110.common.log.LoggerEngine;
 import com.java110.common.util.Assert;
 import com.java110.common.util.ProtocolUtil;
-import com.java110.entity.merchant.BoMerchantMember;
+import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.entity.order.BusiOrder;
 import com.java110.entity.user.BoCust;
 import com.java110.entity.user.BoCustAttr;
@@ -16,8 +16,6 @@ import com.java110.entity.user.CustAttr;
 import com.java110.feign.base.IPrimaryKeyService;
 import com.java110.user.dao.IUserServiceDao;
 import com.java110.user.smo.IUserServiceSMO;
-import com.java110.core.base.smo.BaseServiceSMO;
-import org.apache.commons.lang.math.NumberUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -148,7 +146,7 @@ public class UserServiceSMOImpl extends BaseServiceSMO implements IUserServiceSM
     @Override
     public String soUserServiceForOrderService(JSONObject userInfoJson) throws Exception {
 
-        Assert.isNull(userInfoJson,"data","请求报文缺少 data 节点,请检查");
+        Assert.isNotNull(userInfoJson,"data","请求报文缺少 data 节点,请检查");
 
         JSONArray custInfos = userInfoJson.getJSONArray("data");
 
@@ -402,7 +400,7 @@ public class UserServiceSMOImpl extends BaseServiceSMO implements IUserServiceSM
         for(int boIdIndex = 0 ; boIdIndex < datas.size(); boIdIndex++){
             JSONObject data = datas.getJSONObject(boIdIndex);
 
-            Assert.isNull(data,"boId","当前节点中没有包含boId节点格式错误"+data);
+            Assert.isNotNull(data,"boId","当前节点中没有包含boId节点格式错误"+data);
 
             // 复原Cust
             doDeleteBoCust(data);

+ 11 - 0
java110-bean/src/main/java/com/java110/entity/service/PageData.java

@@ -21,6 +21,8 @@ public class PageData implements Serializable {
 
     private String token;
 
+    private Object serviceSMOImpl;
+
     private JSONObject param;
 
     private JSONObject meta;
@@ -158,6 +160,15 @@ public class PageData implements Serializable {
         this.userInfo = userInfo;
     }
 
+
+    public Object getServiceSMOImpl() {
+        return serviceSMOImpl;
+    }
+
+    public void setServiceSMOImpl(Object serviceSMOImpl) {
+        this.serviceSMOImpl = serviceSMOImpl;
+    }
+
     public PageData builder(String requestJson) throws IllegalArgumentException{
         JSONObject reqJson = null;
         try {

+ 12 - 0
java110-common/src/main/java/com/java110/common/constant/ServiceCodeConstant.java

@@ -26,6 +26,18 @@ public class ServiceCodeConstant {
      */
     public static final String SERVICE_CODE_QUERY_USER_LOGIN_NAME = "查询用户登录信息";
 
+
+    /**
+     * 查询菜单编码
+     */
+    public static final String SERVICE_CODE_QUERY_CONSOLE_TEMPLATE = "query.console.template";
+
+    /**
+     * 查询菜单编码名称
+     */
+    public static final String SERVICE_CODE_QUERY_CONSOLE_TEMPLATE_NAME = "查询模板信息";
+
+
     public static final String SERVICE_CODE = "SERVICE_CODE";
     public static final String SERVICE_CODE_NAME = "SERVICE_CODE_NAME";
 

+ 2 - 2
java110-common/src/main/java/com/java110/common/util/Assert.java

@@ -18,8 +18,8 @@ public class Assert extends org.springframework.util.Assert{
      * @param key
      * @param message
      */
-    public static void isNull(JSONObject jsonObject,String key,String message){
-        Assert.isNull(jsonObject,message);
+    public static void isNotNull(JSONObject jsonObject,String key,String message){
+        Assert.notEmpty(jsonObject,message);
 
         if(!jsonObject.containsKey(key)){
             throw new IllegalArgumentException(message) ;

+ 55 - 0
java110-core/src/main/java/com/java110/core/base/controller/BaseController.java

@@ -12,6 +12,7 @@ import com.java110.common.util.SequenceUtil;
 import com.java110.common.util.StringUtil;
 import com.java110.core.base.AppBase;
 import com.java110.entity.service.PageData;
+import org.springframework.ui.Model;
 import org.springframework.util.StringUtils;
 
 import javax.servlet.http.HttpServletRequest;
@@ -135,4 +136,58 @@ public class BaseController extends AppBase {
         return (PageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);
     }
 
+    /**
+     * 查询菜单
+     * @param model
+     * @param pd
+     */
+    protected void getMenus(Model model,PageData pd,List<Map> menuItems){
+        List<Map> removeMenuItems = new ArrayList<Map>();
+        for(Map menuItem : menuItems){
+            if(!"-1".equals(menuItem.get("parentId")) && !"1".equals(menuItem.get("level"))){
+                Map parentMenuItem = this.getMenuItemFromList(menuItems,menuItem.get("parentId").toString());
+                if(parentMenuItem == null){
+                    continue;
+                }
+                if(parentMenuItem.containsKey("subMenus")){
+                    List<Map> subMenus = (List<Map>) parentMenuItem.get("subMenus");
+                    subMenus.add(menuItem);
+                }else{
+                    List<Map> subMenus = new ArrayList<Map>();
+                    subMenus.add(menuItem);
+                    parentMenuItem.put("subMenus",subMenus);
+                }
+
+                removeMenuItems.add(menuItem);
+            }
+        }
+
+        removeMap(menuItems,removeMenuItems);
+        model.addAttribute("menus",menuItems);
+    }
+
+
+    private Map getMenuItemFromList(List<Map> menuItems,String parentId){
+        for(Map menuItem : menuItems){
+            if(menuItem.get("mId").toString().equals(parentId)){
+                return menuItem;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 删除map
+     * @param menuItems
+     * @param removeMenuItems
+     */
+    private void removeMap(List<Map> menuItems,List<Map> removeMenuItems){
+        if(removeMenuItems == null  || removeMenuItems.size() == 0){
+            return;
+        }
+
+        for(Map removeMenuItem : removeMenuItems){
+            menuItems.remove(removeMenuItem);
+        }
+    }
 }

+ 2 - 2
java110-event/src/main/java/com/java110/event/listener/cust/CustDispatchListener.java

@@ -64,13 +64,13 @@ public class CustDispatchListener implements AppListener<AppCustEvent> ,Ordered{
             //{'cust':[{'oldCustId':'-1','custId':'12345678'},{'oldCustId':'-2','custId':'12345678'}]} }
             JSONObject resultInfoJ = returnUserTmp.getJSONObject(ProtocolUtil.RESULT_INFO);
 
-            Assert.isNull(resultInfoJ, "cust", "用户服务,成功时返回信息错误,没有返回新建成功的cust节点 ,returnUser = " + returnUser);
+            Assert.isNotNull(resultInfoJ, "cust", "用户服务,成功时返回信息错误,没有返回新建成功的cust节点 ,returnUser = " + returnUser);
 
             JSONArray newCusts = resultInfoJ.getJSONArray("cust");
 
             for(int newCustIndex = 0 ; newCustIndex < newCusts.size(); newCustIndex++){
                 JSONObject newCust =  newCusts.getJSONObject(newCustIndex);
-                Assert.isNull(newCust,"custId","用户服务,成功时返回信息错误,没有返回新建成功的cust节点下的custId ,returnUser = " + newCust);
+                Assert.isNotNull(newCust,"custId","用户服务,成功时返回信息错误,没有返回新建成功的cust节点下的custId ,returnUser = " + newCust);
 
                 context.setKeyId(AppContext.PREFIX_CUSTID,newCust.getString("oldCustId"),newCust.getString("custId"));
             }

+ 1 - 0
java110-service/src/main/java/com/java110/service/configuration/ServiceConfiguration.java

@@ -15,6 +15,7 @@ public class ServiceConfiguration {
         final FilterRegistrationBean registrationBean = new FilterRegistrationBean();
         registrationBean.setFilter(new JwtFilter());
         registrationBean.addUrlPatterns("/");
+        registrationBean.addUrlPatterns("/console/*");
 
         return registrationBean;
     }