exam模块添加

This commit is contained in:
zhujunjieit 2018-12-06 21:42:51 +08:00
parent aada6af8e7
commit bd84890abe
5 changed files with 27 additions and 32 deletions

View File

@ -21,7 +21,7 @@ import com.ruoyi.common.utils.ExcelUtil;
/** /**
* 试题分类 信息操作处理 * 试题分类 信息操作处理
* *
* @author zhujj * @author zhujj
* @date 2018-12-06 * @date 2018-12-06
*/ */
@ -29,18 +29,18 @@ import com.ruoyi.common.utils.ExcelUtil;
@RequestMapping("/exam/examQuestionCategory") @RequestMapping("/exam/examQuestionCategory")
public class ExamQuestionCategoryController extends BaseController public class ExamQuestionCategoryController extends BaseController
{ {
private String prefix = "exam/examQuestionCategory"; private String prefix = "exam/examQuestionCategory";
@Autowired @Autowired
private IExamQuestionCategoryService examQuestionCategoryService; private IExamQuestionCategoryService examQuestionCategoryService;
@RequiresPermissions("exam:examQuestionCategory:view") @RequiresPermissions("exam:examQuestionCategory:view")
@GetMapping() @GetMapping()
public String examQuestionCategory() public String examQuestionCategory()
{ {
return prefix + "/examQuestionCategory"; return prefix + "/examQuestionCategory";
} }
/** /**
* 查询试题分类列表 * 查询试题分类列表
*/ */
@ -49,34 +49,33 @@ public class ExamQuestionCategoryController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(ExamQuestionCategory examQuestionCategory) public TableDataInfo list(ExamQuestionCategory examQuestionCategory)
{ {
startPage(); List<ExamQuestionCategory> list = examQuestionCategoryService.selectExamQuestionCategoryList(examQuestionCategory);
List<ExamQuestionCategory> list = examQuestionCategoryService.selectExamQuestionCategoryList(examQuestionCategory);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 导出试题分类列表 * 导出试题分类列表
*/ */
@RequiresPermissions("exam:examQuestionCategory:export") @RequiresPermissions("exam:examQuestionCategory:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(ExamQuestionCategory examQuestionCategory) public AjaxResult export(ExamQuestionCategory examQuestionCategory)
{ {
List<ExamQuestionCategory> list = examQuestionCategoryService.selectExamQuestionCategoryList(examQuestionCategory); List<ExamQuestionCategory> list = examQuestionCategoryService.selectExamQuestionCategoryList(examQuestionCategory);
ExcelUtil<ExamQuestionCategory> util = new ExcelUtil<ExamQuestionCategory>(ExamQuestionCategory.class); ExcelUtil<ExamQuestionCategory> util = new ExcelUtil<ExamQuestionCategory>(ExamQuestionCategory.class);
return util.exportExcel(list, "examQuestionCategory"); return util.exportExcel(list, "examQuestionCategory");
} }
/** /**
* 新增试题分类 * 新增试题分类
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add() public String add()
{ {
return prefix + "/add"; return prefix + "/add";
} }
/** /**
* 新增保存试题分类 * 新增保存试题分类
*/ */
@ -85,7 +84,7 @@ public class ExamQuestionCategoryController extends BaseController
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(ExamQuestionCategory examQuestionCategory) public AjaxResult addSave(ExamQuestionCategory examQuestionCategory)
{ {
return toAjax(examQuestionCategoryService.insertExamQuestionCategory(examQuestionCategory)); return toAjax(examQuestionCategoryService.insertExamQuestionCategory(examQuestionCategory));
} }
@ -97,9 +96,9 @@ public class ExamQuestionCategoryController extends BaseController
{ {
ExamQuestionCategory examQuestionCategory = examQuestionCategoryService.selectExamQuestionCategoryById(id); ExamQuestionCategory examQuestionCategory = examQuestionCategoryService.selectExamQuestionCategoryById(id);
mmap.put("examQuestionCategory", examQuestionCategory); mmap.put("examQuestionCategory", examQuestionCategory);
return prefix + "/edit"; return prefix + "/edit";
} }
/** /**
* 修改保存试题分类 * 修改保存试题分类
*/ */
@ -108,10 +107,10 @@ public class ExamQuestionCategoryController extends BaseController
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(ExamQuestionCategory examQuestionCategory) public AjaxResult editSave(ExamQuestionCategory examQuestionCategory)
{ {
return toAjax(examQuestionCategoryService.updateExamQuestionCategory(examQuestionCategory)); return toAjax(examQuestionCategoryService.updateExamQuestionCategory(examQuestionCategory));
} }
/** /**
* 删除试题分类 * 删除试题分类
*/ */
@ -120,8 +119,8 @@ public class ExamQuestionCategoryController extends BaseController
@PostMapping( "/remove") @PostMapping( "/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids)
{ {
return toAjax(examQuestionCategoryService.deleteExamQuestionCategoryByIds(ids)); return toAjax(examQuestionCategoryService.deleteExamQuestionCategoryByIds(ids));
} }
} }

View File

@ -49,7 +49,6 @@ public class ExamQuestionCommentController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(ExamQuestionComment examQuestionComment) public TableDataInfo list(ExamQuestionComment examQuestionComment)
{ {
startPage();
List<ExamQuestionComment> list = examQuestionCommentService.selectExamQuestionCommentList(examQuestionComment); List<ExamQuestionComment> list = examQuestionCommentService.selectExamQuestionCommentList(examQuestionComment);
return getDataTable(list); return getDataTable(list);
} }

View File

@ -49,7 +49,6 @@ public class ExamQuestionController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(ExamQuestion examQuestion) public TableDataInfo list(ExamQuestion examQuestion)
{ {
startPage();
List<ExamQuestion> list = examQuestionService.selectExamQuestionList(examQuestion); List<ExamQuestion> list = examQuestionService.selectExamQuestionList(examQuestion);
return getDataTable(list); return getDataTable(list);
} }

View File

@ -49,7 +49,6 @@ public class ExamQuestionItemController extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(ExamQuestionItem examQuestionItem) public TableDataInfo list(ExamQuestionItem examQuestionItem)
{ {
startPage();
List<ExamQuestionItem> list = examQuestionItemService.selectExamQuestionItemList(examQuestionItem); List<ExamQuestionItem> list = examQuestionItemService.selectExamQuestionItemList(examQuestionItem);
return getDataTable(list); return getDataTable(list);
} }

View File

@ -49,7 +49,6 @@ public class ${className}Controller extends BaseController
@ResponseBody @ResponseBody
public TableDataInfo list(${className} ${classname}) public TableDataInfo list(${className} ${classname})
{ {
startPage();
List<${className}> list = ${classname}Service.select${className}List(${classname}); List<${className}> list = ${classname}Service.select${className}List(${classname});
return getDataTable(list); return getDataTable(list);
} }