mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-02-27 17:03:42 +08:00
feat:修改科目查题目
This commit is contained in:
parent
6e13ff0c44
commit
b1fd4f7cbd
2 changed files with 9 additions and 7 deletions
|
@ -92,9 +92,7 @@ public class QuestionController {
|
|||
* @param outputObject 出参以及提示信息的返回值对象
|
||||
*/
|
||||
@ApiOperation(id = "selectQuestionBySubjecId", value = "根据科目ID查询题目信息", method = "POST", allUse = "2")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(id = "subjectId", name = "subjectId", value = "科目ID", required = "required")
|
||||
})
|
||||
@ApiImplicitParams(classBean = CommonPageInfo.class)
|
||||
@RequestMapping("/post/QuestionController/selectQuestionBySubjecId")
|
||||
public void selectQuestionBySubjecId(InputObject inputObject, OutputObject outputObject) {
|
||||
questionService.selectQuestionBySubjecId(inputObject, outputObject);
|
||||
|
|
|
@ -374,12 +374,16 @@ public class QuestionServiceImpl extends SkyeyeBusinessServiceImpl<QuestionDao,
|
|||
|
||||
@Override
|
||||
public void selectQuestionBySubjecId(InputObject inputObject, OutputObject outputObject) {
|
||||
String subjectId = inputObject.getParams().get("subjectId").toString();
|
||||
CommonPageInfo commonPageInfo = inputObject.getParams(CommonPageInfo.class);
|
||||
Page pages = null;
|
||||
setCommonPageInfoOtherInfo(commonPageInfo);
|
||||
if (commonPageInfo.getIsPaging() == null || commonPageInfo.getIsPaging()) {
|
||||
pages = PageHelper.startPage(commonPageInfo.getPage(), commonPageInfo.getLimit());
|
||||
}
|
||||
QueryWrapper<Question> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(Question::getSubjectId), subjectId);
|
||||
queryWrapper.eq(MybatisPlusUtil.toColumns(Question::getSubjectId), commonPageInfo.getHolderId());
|
||||
List<Question> questionList = list(queryWrapper);
|
||||
iAuthUserService.setDataMation(questionList,Question::getCreateId);
|
||||
outputObject.setBeans(questionList);
|
||||
outputObject.settotal(questionList.size());
|
||||
outputObject.settotal(pages.getTotal());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue