From 5f8121997d21858ac2cd69af01f6ee4d41290bdc Mon Sep 17 00:00:00 2001 From: EricsHu <hrr145632> Date: 星期三, 29 三月 2023 13:30:13 +0800 Subject: [PATCH] 121 --- src/main/java/com/qxueyou/scc/controller/NoticeController.java | 72 ++++++++++++++++++------------------ 1 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/controller/NoticeController.java b/src/main/java/com/qxueyou/scc/controller/NoticeController.java index 676be85..e95f1a1 100644 --- a/src/main/java/com/qxueyou/scc/controller/NoticeController.java +++ b/src/main/java/com/qxueyou/scc/controller/NoticeController.java @@ -31,7 +31,7 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -@Api(tags = "公告接口-教师端") +@Api(tags = "鍏憡鎺ュ彛-鏁欏笀绔�") @RestController @RequestMapping(value = "/admin/notice") public class NoticeController { @@ -49,18 +49,18 @@ ClassDAO classDao; /** - * 显示 公告列表 + * 鏄剧ず 鍏憡鍒楄〃 * * @param keyword * @param pageNum * @param pageSize * @return */ - @ApiOperation(value = "公告列表", notes = "获取班级列表及班级所在公告列表") + @ApiOperation(value = "鍏憡鍒楄〃", notes = "鑾峰彇鐝骇鍒楄〃鍙婄彮绾ф墍鍦ㄥ叕鍛婂垪琛�") @GetMapping(value = "list") public Result list(String keyword, Integer pageNum, Integer pageSize) { if (!ClientUtils.isAdmin()) { - // 获取班级列表及班级所在公告列表 + // 鑾峰彇鐝骇鍒楄〃鍙婄彮绾ф墍鍦ㄥ叕鍛婂垪琛� List<String> noticeIds = new ArrayList<String>(10); List<ClsClass> clsLst = classService.getClassLstByTeacherId(); for (ClsClass cls : clsLst) { @@ -91,13 +91,13 @@ } /** - * 显示 公告管理列表 + * 鏄剧ず 鍏憡绠$悊鍒楄〃 * @param keyword * @param pageNum * @param pageSize * @return */ - @ApiOperation(value = "公告管理列表", notes = "") + @ApiOperation(value = "鍏憡绠$悊鍒楄〃", notes = "") @GetMapping(value = "managerLst") public Result managerLst(String keyword, Pager pager, @RequestParam(defaultValue = "desc") String sort) { String keyword_ = StringUtils.isBlank(keyword) ? "" : keyword; @@ -127,23 +127,23 @@ private String getTypeName(String key) { Map<String, String> typeMap = new HashMap<>(); - typeMap.put("homework", "作业公告"); - typeMap.put("exam", "考试公告"); - typeMap.put("other", "其他公告"); - typeMap.put("class", "上课公告"); + typeMap.put("homework", "浣滀笟鍏憡"); + typeMap.put("exam", "鑰冭瘯鍏憡"); + typeMap.put("other", "鍏朵粬鍏憡"); + typeMap.put("class", "涓婅鍏憡"); return typeMap.get(key); } /** - * 发布公告/多个id已逗号隔开 + * 鍙戝竷鍏憡/澶氫釜id宸查�楀彿闅斿紑 * - * @param noticeIds 公告ids + * @param noticeIds 鍏憡ids * @return */ - @ApiOperation(value = "发布公告", notes = "多个id已逗号隔开") + @ApiOperation(value = "鍙戝竷鍏憡", notes = "澶氫釜id宸查�楀彿闅斿紑") @ApiImplicitParams({ - @ApiImplicitParam(name = "noticeIds", value = "多个id已逗号隔开", required = true, paramType="query", dataType = "String") + @ApiImplicitParam(name = "noticeIds", value = "澶氫釜id宸查�楀彿闅斿紑", required = true, paramType="query", dataType = "String") }) @PostMapping(value = "release") public Result release(String noticeIds) { @@ -151,14 +151,14 @@ } /** - * 取消发布/多个id已逗号隔开 + * 鍙栨秷鍙戝竷/澶氫釜id宸查�楀彿闅斿紑 * - * @param noticeIds 公告ids + * @param noticeIds 鍏憡ids * @return */ - @ApiOperation(value = "取消发布", notes = "多个id已逗号隔开") + @ApiOperation(value = "鍙栨秷鍙戝竷", notes = "澶氫釜id宸查�楀彿闅斿紑") @ApiImplicitParams({ - @ApiImplicitParam(name = "noticeIds", value = "多个id已逗号隔开", required = true, paramType="query", dataType = "String"), + @ApiImplicitParam(name = "noticeIds", value = "澶氫釜id宸查�楀彿闅斿紑", required = true, paramType="query", dataType = "String"), }) @PostMapping(value = "cancel") public Result cancel(String noticeIds) { @@ -166,14 +166,14 @@ } /** - * 删除 公告/多个id已逗号隔开 + * 鍒犻櫎 鍏憡/澶氫釜id宸查�楀彿闅斿紑 * - * @param noticeIds 公告ids + * @param noticeIds 鍏憡ids * @return */ - @ApiOperation(value = "删除公告", notes = "多个id已逗号隔开") + @ApiOperation(value = "鍒犻櫎鍏憡", notes = "澶氫釜id宸查�楀彿闅斿紑") @ApiImplicitParams({ - @ApiImplicitParam(name = "noticeIds", value = "多个id已逗号隔开", required = true, paramType="query", dataType = "String"), + @ApiImplicitParam(name = "noticeIds", value = "澶氫釜id宸查�楀彿闅斿紑", required = true, paramType="query", dataType = "String"), }) @PostMapping(value = "delete") public Result delete(String noticeIds) { @@ -181,7 +181,7 @@ } /** - * 新增/更新 + * 鏂板/鏇存柊 * * @param noticeId * @param name @@ -191,12 +191,12 @@ * @param pathUrl * @return */ - @ApiOperation(value = "新增/更新公告", notes = "noticeId存在则更新,否则新增") + @ApiOperation(value = "鏂板/鏇存柊鍏憡", notes = "noticeId瀛樺湪鍒欐洿鏂帮紝鍚﹀垯鏂板") @ApiImplicitParams({ - @ApiImplicitParam(name = "name", value = "公告标题", required = true, paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "content", value = "公告内容", required = true, paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "type", value = "公告类型名称", required = true, paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "classIds", value = "关联的班级id,逗号组装", required = true, paramType = "query", dataType = "String") }) + @ApiImplicitParam(name = "name", value = "鍏憡鏍囬", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "content", value = "鍏憡鍐呭", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "type", value = "鍏憡绫诲瀷鍚嶇О", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "classIds", value = "鍏宠仈鐨勭彮绾d锛岄�楀彿缁勮", required = true, paramType = "query", dataType = "String") }) @PostMapping(value = "addOrUpdate") public Result addOrUpdate(String noticeId, String name, String content, String type, String classIds, String pathUrl) { @@ -209,14 +209,14 @@ } /** - * 获取公告详情 + * 鑾峰彇鍏憡璇︽儏 * * @param noticeId * @return */ - @ApiOperation(value = "获取公告详情", notes = "") + @ApiOperation(value = "鑾峰彇鍏憡璇︽儏", notes = "") @ApiImplicitParams({ - @ApiImplicitParam(name = "noticeId", value = "公告id", required = true, paramType = "query", dataType = "String") + @ApiImplicitParam(name = "noticeId", value = "鍏憡id", required = true, paramType = "query", dataType = "String") }) @GetMapping(value = "detail") public Result detail(String noticeId) { @@ -241,27 +241,27 @@ )); } - @ApiOperation(value = "获取班级列表", notes = "") + @ApiOperation(value = "鑾峰彇鐝骇鍒楄〃", notes = "") @GetMapping(value = "findClassLst") public Result findClassLst() { if (ClientUtils.isAdmin()) { List<Map<String, Object>> clsLst = classService.getAllClassLst().getDataT("classLst"); - return new Result(true, "操作成功", QBeanUtils.listBean2ListMap(clsLst, CollectionUtils.newStringMap( + return new Result(true, "鎿嶄綔鎴愬姛", QBeanUtils.listBean2ListMap(clsLst, CollectionUtils.newStringMap( "classId", "classId", "className", "className" ))); } else { List<ClsClass> clsLst = classService.getClassLstByTeacherId(); - return new Result(true, "操作成功", QBeanUtils.listBean2ListMap(clsLst, CollectionUtils.newStringMap( + return new Result(true, "鎿嶄綔鎴愬姛", QBeanUtils.listBean2ListMap(clsLst, CollectionUtils.newStringMap( "classId", "classId", "name", "className" ))); } } - @ApiOperation(value = "更新公告查看次数", notes = "") + @ApiOperation(value = "鏇存柊鍏憡鏌ョ湅娆℃暟", notes = "") @ApiImplicitParams({ - @ApiImplicitParam(name = "noticeId", value = "公告id", required = false, paramType = "query", dataType = "String") + @ApiImplicitParam(name = "noticeId", value = "鍏憡id", required = false, paramType = "query", dataType = "String") }) @GetMapping(value = "view") public Result view(String noticeId) { -- Gitblit v1.8.0