完成筛选页面--By Ternece
This commit is contained in:
parent
6ab33b7c64
commit
cf41c0e75f
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -9,4 +9,5 @@ public interface ExaminationPaperProductionService extends BaseService<Question>
|
||||
|
||||
|
||||
List<Question> generation(ExaminationProductionVM examinationProductionVM);
|
||||
List<Question> paper();
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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"/>
|
||||
|
Loading…
Reference in New Issue
Block a user