From 239ad8680bdd7d46e29a8ff88bc790c493305178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E9=A3=9E?= Date: Fri, 20 Mar 2020 13:37:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A2=86=E5=AF=BC=E7=AB=AF=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E9=9D=A2=E6=9D=BF=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/controller/AppMenuController.java | 12 ++++++ .../com/elink/esua/epdc/dao/AppMenuDao.java | 10 +++++ .../esua/epdc/service/AppMenuService.java | 9 +++++ .../epdc/service/impl/AppMenuServiceImpl.java | 9 +++++ .../src/main/resources/mapper/AppMenuDao.xml | 39 +++++++++++++++++++ 5 files changed, 79 insertions(+) diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/AppMenuController.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/AppMenuController.java index 12a19cacb..5bc38d2ad 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/AppMenuController.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/AppMenuController.java @@ -27,6 +27,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; import com.elink.esua.epdc.dto.AppMenuDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAppChildNavResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIndexPanelResultDTO; import com.elink.esua.epdc.excel.AppMenuExcel; import com.elink.esua.epdc.service.AppMenuService; @@ -126,4 +127,15 @@ public class AppMenuController { public Result> indexPanel(@PathVariable("mobile") String mobile) { return appMenuService.indexPanel(mobile); } + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author lpf + * @Description 首页面板 获取数据端APP菜单 + * @Date 2020/03/18 10:42 + **/ + @GetMapping("/analysisIndexPanel/{userId}") + public Result> analysisIndexPanel(@PathVariable("userId") String userId) { + return appMenuService.getAnalysisIndexPanel(userId); + } } diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/AppMenuDao.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/AppMenuDao.java index 8154f25e5..4a748f124 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/AppMenuDao.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/AppMenuDao.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.dto.AppMenuDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAppChildNavResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIndexPanelResultDTO; import com.elink.esua.epdc.entity.AppMenuEntity; import org.apache.ibatis.annotations.Mapper; @@ -78,4 +79,13 @@ public interface AppMenuDao extends BaseDao { * @Date 2019/11/20 11:10 **/ List indexPanelByMobile(String mobile); + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author lpf + * @Description 首页面板 获取数据端APP菜单 + * @Date 2020/03/18 10:42 + **/ + List getAnalysisIndexPanel(String userId); } diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/AppMenuService.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/AppMenuService.java index b16bd65b9..401d3fcdf 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/AppMenuService.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/AppMenuService.java @@ -22,6 +22,7 @@ import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.security.user.UserDetail; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.AppMenuDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAppChildNavResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIndexPanelResultDTO; import com.elink.esua.epdc.entity.AppMenuEntity; @@ -143,4 +144,12 @@ public interface AppMenuService extends BaseService { * @Date 2019/11/20 10:42 **/ Result> indexPanel(String mobile); + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author lpf + * @Description 首页面板 获取数据端APP菜单 + * @Date 2020/03/18 10:42 + **/ + Result> getAnalysisIndexPanel(String userId); } diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/AppMenuServiceImpl.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/AppMenuServiceImpl.java index 81e31035d..876d25091 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/AppMenuServiceImpl.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/AppMenuServiceImpl.java @@ -33,6 +33,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.utils.TreeUtils; import com.elink.esua.epdc.dao.AppMenuDao; import com.elink.esua.epdc.dto.AppMenuDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAppChildNavResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcAppIndexPanelResultDTO; import com.elink.esua.epdc.entity.AppMenuEntity; import com.elink.esua.epdc.enums.MenuTableEnum; @@ -171,6 +172,14 @@ public class AppMenuServiceImpl extends BaseServiceImpl indexPanelResultDTOList = this.baseDao.indexPanelByMobile(mobile); return new Result().ok(indexPanelResultDTOList); } + @Override + public Result> getAnalysisIndexPanel(String userId) { + if (StringUtils.isBlank(userId)) { + return new Result().error("用户Id不能为空"); + } + List list = this.baseDao.getAnalysisIndexPanel(userId); + return new Result().ok(list); + } } diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/AppMenuDao.xml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/AppMenuDao.xml index 8daf8818c..9ef1b2c8f 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/AppMenuDao.xml +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/AppMenuDao.xml @@ -124,4 +124,43 @@ AND m.pid != 0 )order by mp.sort asc,mc.sort asc + + + + + + + + + From b537c3b3c7a169c6bf5e75aec49ce987aac143f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E9=A3=9E?= Date: Fri, 20 Mar 2020 13:46:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?nacos=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc-admin-server/src/main/resources/application.yml | 1 + .../epdc-admin-server/src/main/resources/registry.conf | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/application.yml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/application.yml index 51e150c03..1fb454cc1 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/application.yml +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/application.yml @@ -23,6 +23,7 @@ spring: server-addr: @nacos.server-addr@ register-enabled: @nacos.register-enabled@ ip: @nacos.ip@ + namespace: 6a3577b4-7b79-43f6-aebb-9c3f31263f6a alibaba: seata: tx-service-group: epdc-admin-server-fescar-service-group diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/registry.conf b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/registry.conf index fb64abd71..8fd848d8e 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/registry.conf +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/registry.conf @@ -4,7 +4,7 @@ registry { nacos { serverAddr = "@nacos.server-addr@" - namespace = "public" + namespace = "6a3577b4-7b79-43f6-aebb-9c3f31263f6a" cluster = "default" } } @@ -15,7 +15,7 @@ config { nacos { serverAddr = "@nacos.server-addr@" - namespace = "public" + namespace = "6a3577b4-7b79-43f6-aebb-9c3f31263f6a" cluster = "default" } }