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} + +