完成筛选页面--By Ternece

This commit is contained in:
wushaofeng 2020-12-30 17:17:52 +08:00
parent 6ab33b7c64
commit cf41c0e75f
5 changed files with 33 additions and 2 deletions

View File

@ -12,15 +12,24 @@ import javax.validation.Valid;
import java.util.List;
@RestController("ExaminationPaperProductionController")
@RequestMapping(value = "/api/student/examination/paper")
@RequestMapping(value = "/api/student/examination")
@AllArgsConstructor
public class ExaminationPaperProductionController extends BaseApiController {
private final ExaminationPaperProductionService examinationPaperProductionService;
@RequestMapping(value = "/production", method = RequestMethod.POST)
@RequestMapping(value = "/paper", method = RequestMethod.GET)
public RestResponse paper(){
List<Question> paper = examinationPaperProductionService.paper();
return RestResponse.ok(paper);
}
@RequestMapping(value = "/paper/production", method = RequestMethod.POST)
public RestResponse paperProduction(@RequestBody @Valid ExaminationProductionVM examinationProductionVM){
List<Question> questionList = examinationPaperProductionService.generation(examinationProductionVM);
return RestResponse.ok(questionList);
}
}

View File

@ -33,4 +33,8 @@ public interface QuestionMapper extends BaseMapper<Question> {
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
List<Question> selectQuestionsByQuestionsNumber(@Param("eachList") List<EachPaperProductionVM> eachList);
List<Question> selectAllSkills();
List<Question> selectAllIndustry();
}

View File

@ -9,4 +9,5 @@ public interface ExaminationPaperProductionService extends BaseService<Question>
List<Question> generation(ExaminationProductionVM examinationProductionVM);
List<Question> paper();
}

View File

@ -67,4 +67,12 @@ public class ExaminationPaperProductionServiceImpl extends BaseServiceImpl<Quest
examinationProductionVM.setEachList(eachList);
return questionMapper.selectQuestionsByQuestionsNumber(examinationProductionVM.getEachList());
}
public List<Question> paper(){
List<Question> questions1 = questionMapper.selectAllSkills();
List<Question> questions2 = questionMapper.selectAllIndustry();
questions1.addAll(questions2);
return questions1;
}
}

View File

@ -256,6 +256,15 @@
</select>
<select id="selectAllSkills"
resultMap="BaseResultMap">
select id as skill_id,name as skill_name from t_skill
</select>
<select id="selectAllIndustry"
resultMap="BaseResultMap">
select id as industry_id,name as industry_name from t_industry
</select>
<select id="selectByIds" resultMap="BaseResultMap" >
SELECT
<include refid="Base_Column_List"/>