|
@@ -433,9 +433,9 @@ public class MyController {
|
|
return ResponseHelp.success(dto);
|
|
return ResponseHelp.success(dto);
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/collect/add", method = RequestMethod.PUT)
|
|
+ @RequestMapping(value = "/collect/question/add", method = RequestMethod.PUT)
|
|
@ApiOperation(value = "添加收藏", notes = "添加收藏", httpMethod = "PUT")
|
|
@ApiOperation(value = "添加收藏", notes = "添加收藏", httpMethod = "PUT")
|
|
- public Response<Boolean> addCollect(@RequestBody @Validated UserCollectDto dto) {
|
|
+ public Response<Boolean> addQuestionCollect(@RequestBody @Validated UserCollectDto dto) {
|
|
UserCollectQuestion entity = Transform.dtoToEntity(dto);
|
|
UserCollectQuestion entity = Transform.dtoToEntity(dto);
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
switch (QuestionModule.ValueOf(dto.getQuestionModule())){
|
|
switch (QuestionModule.ValueOf(dto.getQuestionModule())){
|
|
@@ -464,18 +464,18 @@ public class MyController {
|
|
return ResponseHelp.success(true);
|
|
return ResponseHelp.success(true);
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/collect/delete", method = RequestMethod.DELETE)
|
|
+ @RequestMapping(value = "/collect/question/delete", method = RequestMethod.DELETE)
|
|
@ApiOperation(value = "移除收藏", notes = "移除收藏", httpMethod = "DELETE")
|
|
@ApiOperation(value = "移除收藏", notes = "移除收藏", httpMethod = "DELETE")
|
|
- public Response<Boolean> deleteCollect(String questionModule, Integer questionNoId) {
|
|
+ public Response<Boolean> deleteQuestionCollect(String questionModule, Integer questionNoId) {
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
Boolean result = userCollectQuestionService.deleteQuestion(user.getId(), QuestionModule.ValueOf(questionModule), questionNoId);
|
|
Boolean result = userCollectQuestionService.deleteQuestion(user.getId(), QuestionModule.ValueOf(questionModule), questionNoId);
|
|
|
|
|
|
return ResponseHelp.success(result);
|
|
return ResponseHelp.success(result);
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/collect/bind", method = RequestMethod.POST)
|
|
+ @RequestMapping(value = "/collect/question/bind", method = RequestMethod.POST)
|
|
@ApiOperation(value = "收藏组卷", notes = "收藏组卷", httpMethod = "POST")
|
|
@ApiOperation(value = "收藏组卷", notes = "收藏组卷", httpMethod = "POST")
|
|
- public Response<Boolean> bindCollect(@RequestBody @Validated UserCustomBindDto dto) {
|
|
+ public Response<Boolean> bindQuestionCollect(@RequestBody @Validated UserCustomBindDto dto) {
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
|
|
|
|
questionFlowService.makePaper(
|
|
questionFlowService.makePaper(
|
|
@@ -489,21 +489,21 @@ public class MyController {
|
|
return ResponseHelp.success(true);
|
|
return ResponseHelp.success(true);
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/collect/question", method = RequestMethod.GET)
|
|
+ @RequestMapping(value = "/collect/question/list", method = RequestMethod.GET)
|
|
@ApiOperation(value = "获取收藏题目列表", notes = "获取收藏题目列表", httpMethod = "GET")
|
|
@ApiOperation(value = "获取收藏题目列表", notes = "获取收藏题目列表", httpMethod = "GET")
|
|
- public Response<PageMessage<UserCollectQuestionDto>> listCollect(
|
|
+ public Response<PageMessage<UserCollectQuestionDto>> listQuestionCollect(
|
|
@RequestParam(required = false, defaultValue = "1") int page,
|
|
@RequestParam(required = false, defaultValue = "1") int page,
|
|
@RequestParam(required = false, defaultValue = "100") int size,
|
|
@RequestParam(required = false, defaultValue = "100") int size,
|
|
- @RequestParam(required = true) String module,
|
|
+ @RequestParam(required = true) String questionModule,
|
|
- @RequestParam(required = false) String type,
|
|
+ @RequestParam(required = false) String questionType,
|
|
@RequestParam(required = false) String startTime,
|
|
@RequestParam(required = false) String startTime,
|
|
@RequestParam(required = false) String endTime,
|
|
@RequestParam(required = false) String endTime,
|
|
@RequestParam(required = false, defaultValue = "id") String order,
|
|
@RequestParam(required = false, defaultValue = "id") String order,
|
|
@RequestParam(required = false, defaultValue = "desc") String direction,
|
|
@RequestParam(required = false, defaultValue = "desc") String direction,
|
|
HttpSession session) {
|
|
HttpSession session) {
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
- QuestionModule questionModule = QuestionModule.ValueOf(module);
|
|
+ QuestionModule qm = QuestionModule.ValueOf(questionModule);
|
|
- PageResult<UserCollectQuestionRelation> p = userCollectQuestionService.listQuestion(page, size, user.getId(), questionModule, QuestionType.ValueOf(type), startTime, endTime, order, DirectionStatus.ValueOf(direction));
|
|
+ PageResult<UserCollectQuestionRelation> p = userCollectQuestionService.listQuestion(page, size, user.getId(), qm, QuestionType.ValueOf(questionType), startTime, endTime, order, DirectionStatus.ValueOf(direction));
|
|
|
|
|
|
List<UserCollectQuestionDto> pr = Transform.convert(p, UserCollectQuestionDto.class);
|
|
List<UserCollectQuestionDto> pr = Transform.convert(p, UserCollectQuestionDto.class);
|
|
|
|
|
|
@@ -513,7 +513,7 @@ public class MyController {
|
|
Transform.combine(pr, questionList, UserCollectQuestionDto.class, "questionId", "question", Question.class, "id", QuestionExtendDto.class);
|
|
Transform.combine(pr, questionList, UserCollectQuestionDto.class, "questionId", "question", Question.class, "id", QuestionExtendDto.class);
|
|
|
|
|
|
Collection questionNoIds = Transform.getIds(pr, UserCollectQuestionDto.class, "questionNoId");
|
|
Collection questionNoIds = Transform.getIds(pr, UserCollectQuestionDto.class, "questionNoId");
|
|
- switch(questionModule){
|
|
+ switch(qm){
|
|
case BASE:
|
|
case BASE:
|
|
List<QuestionNo> questionNoList = questionNoService.select(questionNoIds);
|
|
List<QuestionNo> questionNoList = questionNoService.select(questionNoIds);
|
|
Transform.combine(pr, questionNoList, UserCollectQuestionDto.class, "questionNoId", "questionNo", QuestionNo.class, "id", QuestionNoExtendDto.class);
|
|
Transform.combine(pr, questionNoList, UserCollectQuestionDto.class, "questionNoId", "questionNo", QuestionNo.class, "id", QuestionNoExtendDto.class);
|
|
@@ -540,11 +540,10 @@ public class MyController {
|
|
public Response<PageMessage<UserQuestionErrorListDto>> listError(
|
|
public Response<PageMessage<UserQuestionErrorListDto>> listError(
|
|
@RequestParam(required = false, defaultValue = "1") int page,
|
|
@RequestParam(required = false, defaultValue = "1") int page,
|
|
@RequestParam(required = false, defaultValue = "100") int size,
|
|
@RequestParam(required = false, defaultValue = "100") int size,
|
|
- @RequestParam(required = true) String module,
|
|
+ @RequestParam(required = true) String questionModule
|
|
- @RequestParam(required = false) Number category
|
|
|
|
) {
|
|
) {
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
- QuestionModule questionModule = QuestionModule.ValueOf(module);
|
|
+ QuestionModule qm = QuestionModule.ValueOf(questionModule);
|
|
PageResult<UserQuestion> p = userQuestionService.listError(page, size, user.getId());
|
|
PageResult<UserQuestion> p = userQuestionService.listError(page, size, user.getId());
|
|
List<UserQuestionErrorListDto> pr = Transform.convert(p, UserQuestionErrorListDto.class);
|
|
List<UserQuestionErrorListDto> pr = Transform.convert(p, UserQuestionErrorListDto.class);
|
|
|
|
|
|
@@ -554,7 +553,7 @@ public class MyController {
|
|
Transform.combine(pr, questionList, UserQuestionErrorListDto.class, "questionId", "question", Question.class, "id", QuestionExtendDto.class);
|
|
Transform.combine(pr, questionList, UserQuestionErrorListDto.class, "questionId", "question", Question.class, "id", QuestionExtendDto.class);
|
|
|
|
|
|
Collection questionNoIds = Transform.getIds(pr, UserQuestionErrorListDto.class, "questionNoId");
|
|
Collection questionNoIds = Transform.getIds(pr, UserQuestionErrorListDto.class, "questionNoId");
|
|
- switch(questionModule){
|
|
+ switch(qm){
|
|
case BASE:
|
|
case BASE:
|
|
List<QuestionNo> questionNoList = questionNoService.select(questionNoIds);
|
|
List<QuestionNo> questionNoList = questionNoService.select(questionNoIds);
|
|
Transform.combine(pr, questionNoList, UserQuestionErrorListDto.class, "questionNoId", "questionNo", QuestionNo.class, "id", QuestionNoExtendDto.class);
|
|
Transform.combine(pr, questionNoList, UserQuestionErrorListDto.class, "questionNoId", "questionNo", QuestionNo.class, "id", QuestionNoExtendDto.class);
|
|
@@ -651,16 +650,16 @@ public class MyController {
|
|
public Response<PageMessage<UserNoteQuestionDto>> listNoteQuestion(
|
|
public Response<PageMessage<UserNoteQuestionDto>> listNoteQuestion(
|
|
@RequestParam(required = false, defaultValue = "1") int page,
|
|
@RequestParam(required = false, defaultValue = "1") int page,
|
|
@RequestParam(required = false, defaultValue = "100") int size,
|
|
@RequestParam(required = false, defaultValue = "100") int size,
|
|
- @RequestParam(required = true) String module,
|
|
+ @RequestParam(required = true) String questionModule,
|
|
- @RequestParam(required = false) String type,
|
|
+ @RequestParam(required = false) String questionType,
|
|
@RequestParam(required = false) String startTime,
|
|
@RequestParam(required = false) String startTime,
|
|
@RequestParam(required = false) String endTime,
|
|
@RequestParam(required = false) String endTime,
|
|
@RequestParam(required = false, defaultValue = "id") String order,
|
|
@RequestParam(required = false, defaultValue = "id") String order,
|
|
@RequestParam(required = false, defaultValue = "desc") String direction,
|
|
@RequestParam(required = false, defaultValue = "desc") String direction,
|
|
HttpSession session) {
|
|
HttpSession session) {
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
User user = (User) shiroHelp.getLoginUser();
|
|
- QuestionModule questionModule = QuestionModule.ValueOf(module);
|
|
+ QuestionModule qm = QuestionModule.ValueOf(questionModule);
|
|
- PageResult<UserNoteQuestionRelation> p = userNoteQuestionService.list(page, size, user.getId(), questionModule, QuestionType.ValueOf(type), startTime, endTime, order, DirectionStatus.ValueOf(direction));
|
|
+ PageResult<UserNoteQuestionRelation> p = userNoteQuestionService.list(page, size, user.getId(), qm, QuestionType.ValueOf(questionType), startTime, endTime, order, DirectionStatus.ValueOf(direction));
|
|
List<UserNoteQuestionDto> pr = Transform.convert(p, UserNoteQuestionDto.class);
|
|
List<UserNoteQuestionDto> pr = Transform.convert(p, UserNoteQuestionDto.class);
|
|
|
|
|
|
|
|
|
|
@@ -669,7 +668,7 @@ public class MyController {
|
|
Transform.combine(pr, questionList, UserNoteQuestionDto.class, "questionId", "question", Question.class, "id", QuestionExtendDto.class);
|
|
Transform.combine(pr, questionList, UserNoteQuestionDto.class, "questionId", "question", Question.class, "id", QuestionExtendDto.class);
|
|
|
|
|
|
Collection questionNoIds = Transform.getIds(pr, UserQuestionErrorListDto.class, "questionNoId");
|
|
Collection questionNoIds = Transform.getIds(pr, UserQuestionErrorListDto.class, "questionNoId");
|
|
- switch(questionModule){
|
|
+ switch(qm){
|
|
case BASE:
|
|
case BASE:
|
|
List<QuestionNo> questionNoList = questionNoService.select(questionNoIds);
|
|
List<QuestionNo> questionNoList = questionNoService.select(questionNoIds);
|
|
Transform.combine(pr, questionNoList, UserQuestionErrorListDto.class, "questionNoId", "questionNo", QuestionNo.class, "id", QuestionNoExtendDto.class);
|
|
Transform.combine(pr, questionNoList, UserQuestionErrorListDto.class, "questionNoId", "questionNo", QuestionNo.class, "id", QuestionNoExtendDto.class);
|