|
|
@@ -0,0 +1,49 @@
|
|
|
+package net.mingsoft.tf.www;
|
|
|
+
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import io.swagger.v3.oas.annotations.Parameters;
|
|
|
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import net.mingsoft.base.entity.ResultData;
|
|
|
+import net.mingsoft.tf.entity.AnnouncementEntity;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+@Controller()
|
|
|
+@RequestMapping("/tf/announcement")
|
|
|
+public class AnnouncementAction {
|
|
|
+ @Resource
|
|
|
+ private net.mingsoft.tf.action.AnnouncementAction action;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询公告管理列表
|
|
|
+ *
|
|
|
+ * @param announcement 公告管理实体
|
|
|
+ */
|
|
|
+ @Operation(summary = "查询公告管理列表接口")
|
|
|
+ @Parameters({
|
|
|
+ @Parameter(name = "announcementTitle", description = "公告标题", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "announcementTime", description = "发布时间", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "announcementStatus", description = "发布状态", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "announcementContent", description = "公告内容", in = ParameterIn.QUERY),
|
|
|
+ })
|
|
|
+ @PostMapping(value = "/list")
|
|
|
+ @ResponseBody
|
|
|
+ public ResultData list(@RequestBody AnnouncementEntity announcement) {
|
|
|
+ return action.list(announcement);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取公告管理
|
|
|
+ *
|
|
|
+ * @param announcement 公告管理实体
|
|
|
+ */
|
|
|
+ @Operation(summary = "获取公告管理列表接口")
|
|
|
+ @Parameter(name = "id", description = "主键ID", required = true, in = ParameterIn.QUERY)
|
|
|
+ @GetMapping("/get")
|
|
|
+ @ResponseBody
|
|
|
+ public ResultData get(@ModelAttribute @Parameter(hidden = true) AnnouncementEntity announcement) {
|
|
|
+ return action.get(announcement);
|
|
|
+ }
|
|
|
+}
|