查询任务类型2.0

dev
chengyufei 1 year ago
parent d4078248cb
commit f08d0d6813
  1. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/taskType/controller/TaskTypeController.java

@ -60,13 +60,13 @@ public class TaskTypeController extends JeecgController<TaskType, ITaskTypeServi
//准备map的key //准备map的key
String typeName = taskType.getTypeName(); String typeName = taskType.getTypeName();
String id = taskType.getId(); String id = taskType.getId();
Pair<String, String> pair = new Pair<>(typeName, id); Pair<String, String> pair = new Pair<>(id, typeName);
//准备map的value //准备map的value
List<TaskType> list = taskTypeService.query().eq("id", id).list(); List<TaskType> list = taskTypeService.query().eq("pid", id).list();
List<Pair<String, String>> pairList = new ArrayList<>(); List<Pair<String, String>> pairList = new ArrayList<>();
for (TaskType type : list) for (TaskType type : list)
pairList.add(new Pair<>(type.getTypeName(), type.getId())); pairList.add(new Pair<>(type.getId(), type.getTypeName()));
//放入数据到map //放入数据到map
map.put(pair, pairList); map.put(pair, pairList);

Loading…
Cancel
Save