提升系统稳定性

This commit is contained in:
none 2023-04-19 11:18:32 +08:00
parent ea80ddc61a
commit de47dd3af7
2 changed files with 23 additions and 28 deletions

View File

@ -52,6 +52,7 @@ import java.util.stream.Collectors;
/**
* @Author 杭州白书科技有限公司
*
* @create 2023/2/23 09:48
*/
@RestController
@ -59,32 +60,23 @@ import java.util.stream.Collectors;
@RequestMapping("/backend/v1/user")
public class UserController {
@Autowired
private UserService userService;
@Autowired private UserService userService;
@Autowired
private UserDepartmentService userDepartmentService;
@Autowired private UserDepartmentService userDepartmentService;
@Autowired
private DepartmentService departmentService;
@Autowired private DepartmentService departmentService;
@Autowired
private ApplicationContext context;
@Autowired private ApplicationContext context;
@Autowired
private UserCourseHourRecordService userCourseHourRecordService;
@Autowired private UserCourseHourRecordService userCourseHourRecordService;
@Autowired
private UserCourseRecordService userCourseRecordService;
@Autowired private UserCourseRecordService userCourseRecordService;
@Autowired
private CourseHourService courseHourService;
@Autowired private CourseHourService courseHourService;
@Autowired
private CourseService courseService;
@Autowired private CourseService courseService;
@Autowired
private UserLearnDurationStatsService userLearnDurationStatsService;
@Autowired private UserLearnDurationStatsService userLearnDurationStatsService;
@BackendPermissionMiddleware(slug = BPermissionConstant.USER_INDEX)
@GetMapping("/index")

View File

@ -136,6 +136,9 @@ public class CourseHourServiceImpl extends ServiceImpl<CourseHourMapper, CourseH
@Override
public List<CourseHour> chunk(List<Integer> hourIds) {
if (hourIds == null || hourIds.size() == 0) {
return new ArrayList<>();
}
return list(query().getWrapper().in("id", hourIds));
}
}