|
@@ -80,6 +80,9 @@ public class UserController {
|
|
|
private QuestionNoService questionNoService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private ReadyRoomService readyRoomService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private UsersService usersService;
|
|
|
|
|
|
@Autowired
|
|
@@ -128,6 +131,9 @@ public class UserController {
|
|
|
private UserTextbookFeedbackService userTextbookFeedbackService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private UserReadyRoomFeedbackService userReadyRoomFeedbackService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private UserOrderRecordService userOrderRecordService;
|
|
|
|
|
|
@Autowired
|
|
@@ -555,7 +561,7 @@ public class UserController {
|
|
|
|
|
|
@RequestMapping(value = "/textbook_feedback/edit", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改机经勘误信息", httpMethod = "PUT")
|
|
|
- public Response<Boolean> editTextbookFeedback(@RequestBody @Validated UserFeedbackErrorDto dto, HttpServletRequest request) {
|
|
|
+ public Response<Boolean> editTextbookFeedback(@RequestBody @Validated UserTextbookFeedbackDto dto, HttpServletRequest request) {
|
|
|
UserTextbookFeedback entity = Transform.dtoToEntity(dto);
|
|
|
UserTextbookFeedback in = userTextbookFeedbackService.get(entity.getId());
|
|
|
|
|
@@ -634,6 +640,67 @@ public class UserController {
|
|
|
return ResponseHelp.success(pr, page, size, p.getTotal());
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "/ready_room_feedback/edit", method = RequestMethod.PUT)
|
|
|
+ @ApiOperation(value = "修改考场补充信息", httpMethod = "PUT")
|
|
|
+ public Response<Boolean> editReadyRoomFeedback(@RequestBody @Validated UserReadyRoomFeedbackDto dto, HttpServletRequest request) {
|
|
|
+ UserReadyRoomFeedback entity = Transform.dtoToEntity(dto);
|
|
|
+ UserReadyRoomFeedback in = userReadyRoomFeedbackService.get(entity.getId());
|
|
|
+
|
|
|
+
|
|
|
+ if(in.getHandleTime() == null){
|
|
|
+ entity.setHandleTime(new Date());
|
|
|
+ Manager manager = shiroHelp.getLoginManager();
|
|
|
+ entity.setManagerId(manager.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ entity = userReadyRoomFeedbackService.edit(entity);
|
|
|
+
|
|
|
+ managerLogService.log(request);
|
|
|
+ return ResponseHelp.success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/ready_room_feedback/detail", method = RequestMethod.GET)
|
|
|
+ @ApiOperation(value = "考场补充详情", httpMethod = "GET")
|
|
|
+ public Response<UserReadyRoomFeedbackInfoDto> detailReadyRoomFeedback(@RequestParam int id, HttpServletRequest request) {
|
|
|
+ UserReadyRoomFeedback entity = userReadyRoomFeedbackService.get(id);
|
|
|
+ UserReadyRoomFeedbackInfoDto dto = Transform.convert(entity, UserReadyRoomFeedbackInfoDto.class);
|
|
|
+
|
|
|
+ User user = usersService.get(entity.getUserId());
|
|
|
+ UserExtendDto userDto = Transform.convert(user, UserExtendDto.class);
|
|
|
+ dto.setUser(userDto);
|
|
|
+
|
|
|
+ ReadyRoom room = readyRoomService.get(entity.getRoomId());
|
|
|
+ ReadyRoomExtendDto roomDto = Transform.convert(room, ReadyRoomExtendDto.class);
|
|
|
+ dto.setRoom(roomDto);
|
|
|
+
|
|
|
+ return ResponseHelp.success(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/ready_room_feedback/list", method = RequestMethod.GET)
|
|
|
+ @ApiOperation(value = "考场补充列表", httpMethod = "GET")
|
|
|
+ public Response<PageMessage<UserReadyRoomFeedbackInfoDto>> listReadyRoomFeedback(
|
|
|
+ @RequestParam(required = false, defaultValue = "1") int page,
|
|
|
+ @RequestParam(required = false, defaultValue = "100") int size,
|
|
|
+ @RequestParam(required = false) Integer status,
|
|
|
+ @RequestParam(required = false, defaultValue = "id") String order,
|
|
|
+ @RequestParam(required = false, defaultValue = "desc") String direction,
|
|
|
+ HttpSession session) {
|
|
|
+ Page<UserReadyRoomFeedback> p = userReadyRoomFeedbackService.listAdmin(page, size, FeedbackStatus.ValueOf(status), order, DirectionStatus.ValueOf(direction));
|
|
|
+ List<UserReadyRoomFeedbackInfoDto> pr = Transform.convert(p, UserReadyRoomFeedbackInfoDto.class);
|
|
|
+
|
|
|
+
|
|
|
+ Collection userIds = Transform.getIds(p, UserReadyRoomFeedback.class, "userId");
|
|
|
+ List<User> userList = usersService.select(userIds);
|
|
|
+ Transform.combine(pr, userList, UserReadyRoomFeedbackInfoDto.class, "userId", "user", User.class, "id", UserExtendDto.class);
|
|
|
+
|
|
|
+
|
|
|
+ Collection roomIds = Transform.getIds(p, UserReadyRoomFeedback.class, "roomId");
|
|
|
+ List<ReadyRoom> roomList = readyRoomService.select(roomIds);
|
|
|
+ Transform.combine(pr, roomList, UserReadyRoomFeedbackInfoDto.class, "roomId", "room", ReadyRoom.class, "id", ReadyRoomExtendDto.class);
|
|
|
+
|
|
|
+ return ResponseHelp.success(pr, page, size, p.getTotal());
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping(value = "/course/appointment/add", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "添加课程预约", httpMethod = "POST")
|
|
|
public Response<UserCourseAppointment> addCourseAppointment(@RequestBody @Validated UserCourseAppointmentDto dto, HttpServletRequest request) {
|