mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-17 00:44:41 +08:00
课程分类删除
This commit is contained in:
@@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import xyz.playedu.api.PlayEduBackendThreadLocal;
|
||||
import xyz.playedu.api.constant.BPermissionConstant;
|
||||
import xyz.playedu.api.domain.CourseCategory;
|
||||
import xyz.playedu.api.event.CourseCategoryDestroyEvent;
|
||||
@@ -77,9 +78,7 @@ public class CourseCategoryController {
|
||||
public JsonResponse destroy(@PathVariable Integer id) throws NotFoundException {
|
||||
CourseCategory category = categoryService.findOrFail(id);
|
||||
categoryService.deleteById(category.getId());
|
||||
|
||||
ctx.publishEvent(new CourseCategoryDestroyEvent(this, id, new Date()));
|
||||
|
||||
ctx.publishEvent(new CourseCategoryDestroyEvent(this, PlayEduBackendThreadLocal.getAdminUserID(), category.getId(), new Date()));
|
||||
return JsonResponse.success();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user