From 3a8e1524dcf0eeb610d38123d5f0a3ef838379cd Mon Sep 17 00:00:00 2001 From: linzhijie <19970921lzj> Date: 星期一, 12 四月 2021 15:44:53 +0800 Subject: [PATCH] Merge branch '20210406-maqv2' into 20210412-youhua --- src/main/java/com/ots/project/exam/controller/TExamLevelController.java | 48 ++++++++---------------------------------------- 1 files changed, 8 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/ots/project/exam/controller/TExamLevelController.java b/src/main/java/com/ots/project/exam/controller/TExamLevelController.java index 3e8e1f0..169950d 100644 --- a/src/main/java/com/ots/project/exam/controller/TExamLevelController.java +++ b/src/main/java/com/ots/project/exam/controller/TExamLevelController.java @@ -1,5 +1,4 @@ package com.ots.project.exam.controller; - import com.ots.common.utils.StringUtils; import com.ots.common.utils.poi.ExcelUtil; import com.ots.framework.aspectj.lang.annotation.Log; @@ -20,44 +19,31 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; - import java.util.List; import java.util.Map; import java.util.stream.Collectors; -/** - * 闂嵎绫诲瀷Controller - * - * @author ots - * @date 2019-12-15 - */ @Controller @RequestMapping("/exam/level") public class TExamLevelController extends BaseController { private String prefix = "exam/level"; - @Autowired private ITExamLevelService tExamLevelService; - @Autowired private DictService dictService; - @RequiresPermissions("exam:level:view") @GetMapping() public String level() { return prefix + "/level"; } - - /** - * 鏌ヨ闂嵎绫诲瀷鍒楄〃 - */ + @RequiresPermissions("exam:level:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(TExamLevel tExamLevel) { startPage(); List<TExamLevel> list = tExamLevelService.selectTExamLevelList(tExamLevel); - // 缈昏瘧涓�涓� Item Template + List<DictData> questionnaireTemplate = dictService.getType("questionnaire_template"); Map<String, String> dictMap = questionnaireTemplate.stream().collect(Collectors.toMap(DictData::getDictValue, DictData::getDictLabel)); list.stream().forEach(t -> { @@ -65,10 +51,7 @@ }); return getDataTable(list); } - - /** - * 瀵煎嚭闂嵎绫诲瀷鍒楄〃 - */ + @RequiresPermissions("exam:level:export") @PostMapping("/export") @ResponseBody @@ -77,10 +60,7 @@ ExcelUtil<TExamLevel> util = new ExcelUtil<TExamLevel>(TExamLevel.class); return util.exportExcel(list, "level"); } - - /** - * 鏂板闂嵎绫诲瀷 - */ + @GetMapping("/add") public String add(String uuid,ModelMap mmap) { if(StringUtils.isNotBlank(uuid)){ @@ -90,10 +70,7 @@ } return prefix + "/add"; } - - /** - * 鏂板淇濆瓨闂嵎绫诲瀷 - */ + @RequiresPermissions("exam:level:add") @Log(title = "闂嵎绫诲瀷", businessType = BusinessType.INSERT) @PostMapping("/add") @@ -105,20 +82,14 @@ } return toAjax(tExamLevelService.insertTExamLevel(tExamLevel)); } - - /** - * 淇敼闂嵎绫诲瀷 - */ + @GetMapping("/edit/{id}") public String edit(@PathVariable("id") Long id, ModelMap mmap) { TExamLevel tExamLevel = tExamLevelService.selectTExamLevelById(id); mmap.put("tExamLevel", tExamLevel); return prefix + "/edit"; } - - /** - * 淇敼淇濆瓨闂嵎绫诲瀷 - */ + @RequiresPermissions("exam:level:edit") @Log(title = "闂嵎绫诲瀷", businessType = BusinessType.UPDATE) @PostMapping("/edit") @@ -126,10 +97,7 @@ public AjaxResult editSave(TExamLevel tExamLevel) { return toAjax(tExamLevelService.updateTExamLevel(tExamLevel)); } - - /** - * 鍒犻櫎闂嵎绫诲瀷 - */ + @RequiresPermissions("exam:level:remove") @Log(title = "闂嵎绫诲瀷", businessType = BusinessType.DELETE) @PostMapping("/remove") -- Gitblit v1.9.1