|
|
@@ -0,0 +1,55 @@
|
|
|
+package com.fdkankan.manage.controller;
|
|
|
+
|
|
|
+
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.dtflys.forest.annotation.Post;
|
|
|
+import com.fdkankan.common.controller.BaseController;
|
|
|
+import com.fdkankan.common.response.ResultData;
|
|
|
+import com.fdkankan.manage.entity.News;
|
|
|
+import com.fdkankan.manage.service.INewsService;
|
|
|
+import com.fdkankan.manage.vo.NewsDisplayParamVO;
|
|
|
+import com.fdkankan.manage.vo.NewsVO;
|
|
|
+import com.fdkankan.manage.vo.PageNewsParamVO;
|
|
|
+import com.fdkankan.manage.vo.PageNewsVO;
|
|
|
+import java.io.BufferedInputStream;
|
|
|
+import java.io.ByteArrayOutputStream;
|
|
|
+import java.io.InputStream;
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.sql.Blob;
|
|
|
+import java.util.List;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2022-06-06
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/service/manage/news")
|
|
|
+public class NewsController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private INewsService newsService;
|
|
|
+
|
|
|
+ @PostMapping("/pageNews")
|
|
|
+ public Page<PageNewsVO> pageNews(@RequestBody PageNewsParamVO param){
|
|
|
+ return newsService.pageNews(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/display")
|
|
|
+ public ResultData display(@RequestBody NewsDisplayParamVO param){
|
|
|
+ return newsService.display(param);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|