Commit b6d19ece by zhiwj

修改bug

parent 97406fef
...@@ -123,6 +123,7 @@ public class IndexQO extends PageQO implements Serializable { ...@@ -123,6 +123,7 @@ public class IndexQO extends PageQO implements Serializable {
private String optUserName; private String optUserName;
private String indexGroupName; private String indexGroupName;
private List<Integer> indexGroupIdList;
public Integer getClassifyType() { public Integer getClassifyType() {
...@@ -364,4 +365,12 @@ public class IndexQO extends PageQO implements Serializable { ...@@ -364,4 +365,12 @@ public class IndexQO extends PageQO implements Serializable {
public void setIndexGroupName(String indexGroupName) { public void setIndexGroupName(String indexGroupName) {
this.indexGroupName = indexGroupName; this.indexGroupName = indexGroupName;
} }
public void setIndexGroupIdList(List<Integer> indexGroupIdList) {
this.indexGroupIdList = indexGroupIdList;
}
public List<Integer> getIndexGroupIdList() {
return indexGroupIdList;
}
} }
...@@ -57,4 +57,6 @@ public interface TabIndexGroupMapper { ...@@ -57,4 +57,6 @@ public interface TabIndexGroupMapper {
TabIndexGroup getBySelective(TabIndexGroup indexGroup); TabIndexGroup getBySelective(TabIndexGroup indexGroup);
List<TabIndexGroup> listIndexGroup(@Param("ids") List<Integer> indexGroupIdList); List<TabIndexGroup> listIndexGroup(@Param("ids") List<Integer> indexGroupIdList);
List<Integer> listChildIndexGroup(@Param("indexGroupId") Integer indexGroupId);
} }
\ No newline at end of file
...@@ -24,4 +24,6 @@ public interface IndexGroupService { ...@@ -24,4 +24,6 @@ public interface IndexGroupService {
List<TabIndexGroup> listIndexGroup(); List<TabIndexGroup> listIndexGroup();
String getNameByIds(List<Integer> indexGroupIdList); String getNameByIds(List<Integer> indexGroupIdList);
List<Integer> listChildIndexGroup(Integer indexGroupId);
} }
...@@ -71,4 +71,9 @@ public class IndexGroupServiceImpl implements IndexGroupService { ...@@ -71,4 +71,9 @@ public class IndexGroupServiceImpl implements IndexGroupService {
return Optional.ofNullable(indexGroupList).orElse(Collections.emptyList()) return Optional.ofNullable(indexGroupList).orElse(Collections.emptyList())
.stream().map(TabIndexGroup::getIndexGroupName).collect(Collectors.joining("\\")); .stream().map(TabIndexGroup::getIndexGroupName).collect(Collectors.joining("\\"));
} }
@Override
public List<Integer> listChildIndexGroup(Integer indexGroupId) {
return tabIndexGroupMapper.listChildIndexGroup(indexGroupId);
}
} }
...@@ -4,6 +4,7 @@ import com.gic.cloud.dao.mapper.TabIndexMapper; ...@@ -4,6 +4,7 @@ import com.gic.cloud.dao.mapper.TabIndexMapper;
import com.gic.cloud.dto.IndexDTO; import com.gic.cloud.dto.IndexDTO;
import com.gic.cloud.entity.TabIndex; import com.gic.cloud.entity.TabIndex;
import com.gic.cloud.qo.IndexQO; import com.gic.cloud.qo.IndexQO;
import com.gic.cloud.service.IndexGroupService;
import com.gic.cloud.service.IndexModuleRelService; import com.gic.cloud.service.IndexModuleRelService;
import com.gic.cloud.service.IndexService; import com.gic.cloud.service.IndexService;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
...@@ -29,6 +30,8 @@ public class IndexServiceImpl implements IndexService { ...@@ -29,6 +30,8 @@ public class IndexServiceImpl implements IndexService {
private TabIndexMapper tabIndexMapper; private TabIndexMapper tabIndexMapper;
@Autowired @Autowired
private IndexModuleRelService indexModuleRelService; private IndexModuleRelService indexModuleRelService;
@Autowired
private IndexGroupService indexGroupService;
@Override @Override
public boolean isNameRepeat(String name, Integer indexId) { public boolean isNameRepeat(String name, Integer indexId) {
...@@ -74,6 +77,10 @@ public class IndexServiceImpl implements IndexService { ...@@ -74,6 +77,10 @@ public class IndexServiceImpl implements IndexService {
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Arrays.asList(indexQO.getModuleId().split(","))); List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Arrays.asList(indexQO.getModuleId().split(",")));
indexQO.setIndexIdList(indexIdList); indexQO.setIndexIdList(indexIdList);
} }
if (indexQO.getIndexGroupId() != null) {
List<Integer> indexGroupIdList = indexGroupService.listChildIndexGroup(indexQO.getIndexGroupId());
indexQO.setIndexGroupIdList(indexGroupIdList);
}
return tabIndexMapper.listIndex(indexQO); return tabIndexMapper.listIndex(indexQO);
} }
......
...@@ -142,4 +142,12 @@ ...@@ -142,4 +142,12 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<!-- List<Integer> listChildIndexGroup(@Param("indexGroupId") Integer indexGroupId);-->
<select id="listChildIndexGroup" resultType="int">
select
index_group_id
from tab_index_group
where status = 1
and group_chain like concat('%_', #{indexGroupId}, '_%')
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment