考试模块优化
正在显示
2 个修改的文件
包含
16 行增加
和
0 行删除
... | @@ -7,6 +7,7 @@ import java.util.Map; | ... | @@ -7,6 +7,7 @@ import java.util.Map; |
7 | import java.io.IOException; | 7 | import java.io.IOException; |
8 | import java.io.UnsupportedEncodingException; | 8 | import java.io.UnsupportedEncodingException; |
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import java.util.stream.Collectors; | ||
10 | import javax.servlet.http.HttpServletRequest; | 11 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 12 | import javax.servlet.http.HttpServletResponse; |
12 | import com.skua.core.api.vo.Result; | 13 | import com.skua.core.api.vo.Result; |
... | @@ -154,6 +155,18 @@ public class QuestionController { | ... | @@ -154,6 +155,18 @@ public class QuestionController { |
154 | return result; | 155 | return result; |
155 | } | 156 | } |
156 | 157 | ||
158 | @AutoLog(value = "在线考试-试题-编辑") | ||
159 | @ApiOperation(value="在线考试-试题-编辑", notes="在线考试-试题-编辑") | ||
160 | @PutMapping(value = "/editBatch") | ||
161 | public Result<Question> editBatchCtrl(@RequestBody List<Question> questionList) throws Exception { | ||
162 | Result<Question> result = new Result<Question>(); | ||
163 | for (Question question: questionList) { | ||
164 | question.setUpdateBy(BaseContextHandler.getUserId()); | ||
165 | questionService.updateQuestion(question); | ||
166 | } | ||
167 | return result; | ||
168 | } | ||
169 | |||
157 | @AutoLog(value = "在线考试-试题-通过id删除") | 170 | @AutoLog(value = "在线考试-试题-通过id删除") |
158 | @ApiOperation(value="在线考试-试题-通过id删除", notes="在线考试-试题-通过id删除") | 171 | @ApiOperation(value="在线考试-试题-通过id删除", notes="在线考试-试题-通过id删除") |
159 | @DeleteMapping(value = "/delete") | 172 | @DeleteMapping(value = "/delete") | ... | ... |
... | @@ -204,6 +204,9 @@ public class UserPaperController { | ... | @@ -204,6 +204,9 @@ public class UserPaperController { |
204 | List<Paper> paperList = JoinSqlUtils.multiMaps2Beans(pageList.getRecords(), Paper.class); | 204 | List<Paper> paperList = JoinSqlUtils.multiMaps2Beans(pageList.getRecords(), Paper.class); |
205 | */ | 205 | */ |
206 | String departIds = BaseContextHandler.getDeparts(); | 206 | String departIds = BaseContextHandler.getDeparts(); |
207 | if (StringUtils.isNotEmpty(req.getParameter("departId"))) { | ||
208 | departIds = req.getParameter("departId"); | ||
209 | } | ||
207 | QueryWrapper<?> queryWrapper0 = new QueryWrapper<>(); | 210 | QueryWrapper<?> queryWrapper0 = new QueryWrapper<>(); |
208 | queryWrapper0.eq(StringUtils.isNotEmpty(paper.getUserId()),"edu_user_paper.user_id", paper.getUserId()) | 211 | queryWrapper0.eq(StringUtils.isNotEmpty(paper.getUserId()),"edu_user_paper.user_id", paper.getUserId()) |
209 | .like(StringUtils.isNotEmpty(paper.getPaperTitle()), "edu_paper.paper_title", paper.getPaperTitle()) | 212 | .like(StringUtils.isNotEmpty(paper.getPaperTitle()), "edu_paper.paper_title", paper.getPaperTitle()) | ... | ... |
-
请 注册 或 登录 后发表评论