mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-23 12:32:41 +08:00
后台学员的学习api的权限
This commit is contained in:
parent
b9cb67d8cd
commit
faaabc5e95
@ -146,6 +146,13 @@ public class AdminPermissionCheck implements ApplicationRunner {
|
|||||||
setSlug(BPermissionConstant.USER_DESTROY);
|
setSlug(BPermissionConstant.USER_DESTROY);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
new AdminPermission() {
|
||||||
|
{
|
||||||
|
setSort(40);
|
||||||
|
setName("学习");
|
||||||
|
setSlug(BPermissionConstant.USER_LEARN);
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
// 线上课
|
// 线上课
|
||||||
put(
|
put(
|
||||||
|
@ -40,6 +40,7 @@ public class BPermissionConstant {
|
|||||||
public static final String USER_STORE = "user-store";
|
public static final String USER_STORE = "user-store";
|
||||||
public static final String USER_UPDATE = "user-update";
|
public static final String USER_UPDATE = "user-update";
|
||||||
public static final String USER_DESTROY = "user-destroy";
|
public static final String USER_DESTROY = "user-destroy";
|
||||||
|
public static final String USER_LEARN = "user-learn";
|
||||||
|
|
||||||
public static final String COURSE = "course";
|
public static final String COURSE = "course";
|
||||||
public static final String COURSE_USER = "course-user";
|
public static final String COURSE_USER = "course-user";
|
||||||
|
@ -367,7 +367,8 @@ public class UserController {
|
|||||||
return JsonResponse.success();
|
return JsonResponse.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/{id}/latest-learn-hours")
|
@BackendPermissionMiddleware(slug = BPermissionConstant.USER_LEARN)
|
||||||
|
@GetMapping("/{id}/learn-hours")
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public JsonResponse latestLearnHours(
|
public JsonResponse latestLearnHours(
|
||||||
@PathVariable(name = "id") Integer id, @RequestParam HashMap<String, Object> params) {
|
@PathVariable(name = "id") Integer id, @RequestParam HashMap<String, Object> params) {
|
||||||
@ -402,7 +403,8 @@ public class UserController {
|
|||||||
return JsonResponse.data(data);
|
return JsonResponse.data(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/{id}/latest-learn-courses")
|
@BackendPermissionMiddleware(slug = BPermissionConstant.USER_LEARN)
|
||||||
|
@GetMapping("/{id}/learn-courses")
|
||||||
public JsonResponse latestLearnCourses(
|
public JsonResponse latestLearnCourses(
|
||||||
@PathVariable(name = "id") Integer id, @RequestParam HashMap<String, Object> params) {
|
@PathVariable(name = "id") Integer id, @RequestParam HashMap<String, Object> params) {
|
||||||
Integer page = MapUtils.getInteger(params, "page", 1);
|
Integer page = MapUtils.getInteger(params, "page", 1);
|
||||||
@ -436,6 +438,7 @@ public class UserController {
|
|||||||
return JsonResponse.data(data);
|
return JsonResponse.data(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BackendPermissionMiddleware(slug = BPermissionConstant.USER_LEARN)
|
||||||
@GetMapping("/{id}/learn-stats")
|
@GetMapping("/{id}/learn-stats")
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public JsonResponse learn(@PathVariable(name = "id") Integer id) {
|
public JsonResponse learn(@PathVariable(name = "id") Integer id) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user