部门和分类的删除预检查api返回后台children

This commit is contained in:
none 2023-03-15 11:46:58 +08:00
parent 06bc8c639c
commit 4b653361fe
3 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,5 @@
package xyz.playedu.api.controller.backend; package xyz.playedu.api.controller.backend;
import cn.hutool.core.lang.hash.Hash;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -94,6 +94,7 @@ public class DepartmentController {
HashMap<String, Object> data = new HashMap<>(); HashMap<String, Object> data = new HashMap<>();
data.put("courses", new ArrayList<>()); data.put("courses", new ArrayList<>());
data.put("users", new ArrayList<>()); data.put("users", new ArrayList<>());
data.put("children", departmentService.listByParentId(id));
if (courseIds != null && courseIds.size() > 0) { if (courseIds != null && courseIds.size() > 0) {
data.put("courses", courseService.chunks(courseIds, new ArrayList<>() {{ data.put("courses", courseService.chunks(courseIds, new ArrayList<>() {{

View File

@ -92,6 +92,7 @@ public class ResourceCategoryController {
List<Integer> rids = categoryService.getRidsById(id); List<Integer> rids = categoryService.getRidsById(id);
HashMap<String, Object> data = new HashMap<>(); HashMap<String, Object> data = new HashMap<>();
data.put("children", categoryService.listByParentId(id));
data.put("courses", new ArrayList<>()); data.put("courses", new ArrayList<>());
data.put("videos", new ArrayList<>()); data.put("videos", new ArrayList<>());
data.put("images", new ArrayList<>()); data.put("images", new ArrayList<>());