From 38034ab0aed163edb44a2523205be738e9ec5d7d Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期二, 26 三月 2019 00:02:07 +0800
Subject: [PATCH] 完成自封装vc-validate 功能

---
 WebService/src/main/java/com/java110/web/controller/HomeController.java |   65 --------------------------------
 1 files changed, 1 insertions(+), 64 deletions(-)

diff --git a/WebService/src/main/java/com/java110/web/controller/HomeController.java b/WebService/src/main/java/com/java110/web/controller/HomeController.java
index ac3c53b..c318037 100644
--- a/WebService/src/main/java/com/java110/web/controller/HomeController.java
+++ b/WebService/src/main/java/com/java110/web/controller/HomeController.java
@@ -7,7 +7,7 @@
 import com.java110.common.util.StringUtil;
 import com.java110.web.smo.IConsoleServiceSMO;
 import com.java110.core.base.controller.BaseController;
-import com.java110.entity.service.PageData;
+import com.java110.core.context.PageData;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,69 +35,6 @@
         String template = "index";
 
             return template;
-    }
-
-    /**
-     * 鏌ヨ鏁版嵁
-     * @param model
-     * @param request
-     * @return
-     */
-    @RequestMapping(path = "/console/list")
-    public String listData(Model model, HttpServletRequest request){
-        String template = "";
-        try {
-
-            //1.0 鑾峰彇瀵硅薄
-            PageData pd = this.getPageData(request);
-
-            Assert.hasLength(pd.getParam().getString("templateCode"),"璇锋眰鍙傛暟templateCode 涓嶈兘涓虹┖锛�");
-            // 鍒ゆ柇鐢ㄦ埛鏄惁鐧诲綍
-            checkLogin(pd);
-            //2.0 鏌ヨ妯℃澘淇℃伅
-            checkTemplate(pd,model);
-            //3.0 鏌ヨ鑿滃崟淇℃伅
-            getMenus(model,pd,consoleServiceSMOImpl.getMenuItemsByManageId(pd.getUserId()));
-            //3.0 鏌ヨ鍚勪釜绯荤粺璋冪敤閲�
-
-            template = pd.getData().getJSONObject("template").containsKey("htmlName")
-                    && !StringUtil.isNullOrNone( pd.getData().getJSONObject("template").getString("htmlName")) ?
-                    pd.getData().getJSONObject("template").getString("htmlName"):
-                    "list_template";
-
-        }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;
-        }
-
-    }
-
-
-    /**
-     * 妯℃澘鏍¢獙骞跺皢妯℃澘鍐欏叆鍒� model 瀵硅薄涓� 鍓嶅彴椤甸潰灞曠ず鐢�
-     * @param pd
-     * @param model
-     */
-    private void checkTemplate(PageData pd,Model model) throws IllegalArgumentException{
-        try {
-            consoleServiceSMOImpl.getTemplate(pd);
-            JSONObject template = pd.getData().getJSONObject("template");
-            model.addAttribute("templateCode",template.getString("templateCode"));
-            model.addAttribute("templateName",template.getString("templateName"));
-        }catch (Exception e){
-            logger.error("鏌ヨ寮傚父",e);
-            throw  new IllegalArgumentException("閰嶇疆閿欒锛屾病鏈夊綋鍓嶆ā鏉裤��"+pd.getParam().getString("templateCode")+"銆�");
-        }
-
     }
 
 

--
Gitblit v1.8.0