From 1cf4eba73bc9b47da43277403b1ecd2669cf5076 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.com> Date: Fri, 17 Sep 2021 10:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E8=A6=81=E6=8F=90=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=EF=BC=8C=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SuggestionMakeServiceImpl.java | 9 +++++---- .../service/impl/SuggestionTypeServiceImpl.java | 4 ++-- .../mapper/suggestion/SuggestionMakeDao.xml | 12 +++++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionMakeServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionMakeServiceImpl.java index 5569445..0d61fe4 100644 --- a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionMakeServiceImpl.java +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionMakeServiceImpl.java @@ -24,6 +24,8 @@ import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.commons.tools.constant.NumConstant; import com.elink.esua.epdc.commons.tools.constant.StrConstant; import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.security.user.UserDetail; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.constant.ImageConstant; @@ -69,6 +71,7 @@ public class SuggestionMakeServiceImpl extends BaseServiceImpl page(Map params) { + params.put("deptIdList", SecurityUser.getUser().getDeptIdList()); IPage page = getPage(params); List list = baseDao.selectListPage(params); return new PageData<>(list, page.getTotal()); @@ -95,12 +98,10 @@ public class SuggestionMakeServiceImpl extends BaseServiceImpl> suggestionPicList = new ArrayList<>(); + List suggestionPicList = new ArrayList<>(); for (int i = 0; i < urls.length; i++) { Map map = new HashMap<>(); - map.put("name", i + ""); - map.put("url", urls[i]); - suggestionPicList.add(map); + suggestionPicList.add(urls[i]); } result.setSuggestionPicList(suggestionPicList); return result; diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionTypeServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionTypeServiceImpl.java index c6f034a..c15c744 100644 --- a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionTypeServiceImpl.java +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/suggestion/service/impl/SuggestionTypeServiceImpl.java @@ -113,10 +113,10 @@ public class SuggestionTypeServiceImpl extends BaseServiceImpl> getSuggestionTypeTree() { List nodes = baseDao.selectListSuggestionTypeTree(); - Map> children = nodes.stream().filter(node -> !(node.getPid().equals(NumConstant.ZERO))) + Map> children = nodes.stream().filter(node -> !(node.getPid().equals(NumConstant.ZERO_L))) .collect(Collectors.groupingBy(node -> node.getPid())); nodes.forEach(node -> node.setChildren(children.get(node.getValue()))); - List result = nodes.stream().filter(node -> node.getPid().equals(NumConstant.ZERO_STR)).collect(Collectors.toList()); + List result = nodes.stream().filter(node -> node.getPid().equals(NumConstant.ZERO_L)).collect(Collectors.toList()); return new Result>().ok(result); } diff --git a/epdc-cloud-custom/src/main/resources/mapper/suggestion/SuggestionMakeDao.xml b/epdc-cloud-custom/src/main/resources/mapper/suggestion/SuggestionMakeDao.xml index 7e0205d..da4a191 100644 --- a/epdc-cloud-custom/src/main/resources/mapper/suggestion/SuggestionMakeDao.xml +++ b/epdc-cloud-custom/src/main/resources/mapper/suggestion/SuggestionMakeDao.xml @@ -43,7 +43,7 @@ m.PARTY_FLAG, m.IS_FEEDBACK, t.SUGGESTION_NAME suggestionTypeName, - DATE_FORMAT(m.CREATED_TIME, '%Y.%m.%d') createdTime + DATE_FORMAT(m.CREATED_TIME, '%Y-%m-%d %H:%i:%s') createdTime FROM epdc_suggestion_make m LEFT JOIN epdc_suggestion_type t ON m.SUGGESTION_TYPE_ID = t.ID AND t.DEL_FLAG = '0' WHERE m.DEL_FLAG = '0' @@ -72,7 +72,7 @@ auth.ALL_DEPT_IDS, auth.ALL_DEPT_NAMES, auth.IS_FEEDBACK, - DATE_FORMAT(auth.CREATED_TIME, '%Y.%m.%d') createdTimeStr + DATE_FORMAT(auth.CREATED_TIME, '%Y-%m-%d %H:%i:%s') createdTimeStr FROM ( SELECT m.ID, @@ -108,6 +108,12 @@ AND m.ALL_DEPT_IDS LIKE CONCAT('%', #{allDeptIds}, '%') ) auth + + where auth.DEPT_ID in + + #{deptId} + +