Administrator 1 year ago
parent
commit
f53ee4d370

+ 0 - 104
ruoyi-admin/src/main/java/com/ruoyi/web/controller/news/BomanMaterialController.java

@@ -1,104 +0,0 @@
-package com.ruoyi.web.controller.news;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.system.domain.BomanMaterial;
-import com.ruoyi.system.service.IBomanMaterialService;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
-
-/**
- * 素材库Controller
- * 
- * @author boman
- * @date 2023-11-02
- */
-@RestController
-@RequestMapping("/system/material")
-public class BomanMaterialController extends BaseController
-{
-    @Autowired
-    private IBomanMaterialService bomanMaterialService;
-
-    /**
-     * 查询素材库列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:material:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(BomanMaterial bomanMaterial)
-    {
-        startPage();
-        List<BomanMaterial> list = bomanMaterialService.selectBomanMaterialList(bomanMaterial);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出素材库列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:material:export')")
-    @Log(title = "素材库", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, BomanMaterial bomanMaterial)
-    {
-        List<BomanMaterial> list = bomanMaterialService.selectBomanMaterialList(bomanMaterial);
-        ExcelUtil<BomanMaterial> util = new ExcelUtil<BomanMaterial>(BomanMaterial.class);
-        util.exportExcel(response, list, "素材库数据");
-    }
-
-    /**
-     * 获取素材库详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('system:material:query')")
-    @GetMapping(value = "/{materialId}")
-    public AjaxResult getInfo(@PathVariable("materialId") Long materialId)
-    {
-        return success(bomanMaterialService.selectBomanMaterialByMaterialId(materialId));
-    }
-
-    /**
-     * 新增素材库
-     */
-    @PreAuthorize("@ss.hasPermi('system:material:add')")
-    @Log(title = "素材库", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody BomanMaterial bomanMaterial)
-    {
-        return toAjax(bomanMaterialService.insertBomanMaterial(bomanMaterial));
-    }
-
-    /**
-     * 修改素材库
-     */
-    @PreAuthorize("@ss.hasPermi('system:material:edit')")
-    @Log(title = "素材库", businessType = BusinessType.UPDATE)
-    @PostMapping("/put")
-    public AjaxResult edit(@RequestBody BomanMaterial bomanMaterial)
-    {
-        return toAjax(bomanMaterialService.updateBomanMaterial(bomanMaterial));
-    }
-
-    /**
-     * 删除素材库
-     */
-    @PreAuthorize("@ss.hasPermi('system:material:remove')")
-    @Log(title = "素材库", businessType = BusinessType.DELETE)
-	@GetMapping("/delete/{materialIds}")
-    public AjaxResult remove(@PathVariable Long[] materialIds)
-    {
-        return toAjax(bomanMaterialService.deleteBomanMaterialByMaterialIds(materialIds));
-    }
-}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/news/BomanNewsController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.news;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.BomanNews;
+import com.ruoyi.system.service.IBomanNewsService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * boman_newsController
+ * 
+ * @author boman
+ * @date 2023-11-02
+ */
+@RestController
+@RequestMapping("/system/news")
+public class BomanNewsController extends BaseController
+{
+    @Autowired
+    private IBomanNewsService bomanNewsService;
+
+    /**
+     * 查询boman_news列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:news:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BomanNews bomanNews)
+    {
+        startPage();
+        List<BomanNews> list = bomanNewsService.selectBomanNewsList(bomanNews);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出boman_news列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:news:export')")
+    @Log(title = "boman_news", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BomanNews bomanNews)
+    {
+        List<BomanNews> list = bomanNewsService.selectBomanNewsList(bomanNews);
+        ExcelUtil<BomanNews> util = new ExcelUtil<BomanNews>(BomanNews.class);
+        util.exportExcel(response, list, "boman_news数据");
+    }
+
+    /**
+     * 获取boman_news详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:news:query')")
+    @GetMapping(value = "/{newsId}")
+    public AjaxResult getInfo(@PathVariable("newsId") Long newsId)
+    {
+        return success(bomanNewsService.selectBomanNewsByNewsId(newsId));
+    }
+
+    /**
+     * 新增boman_news
+     */
+    @PreAuthorize("@ss.hasPermi('system:news:add')")
+    @Log(title = "boman_news", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BomanNews bomanNews)
+    {
+        return toAjax(bomanNewsService.insertBomanNews(bomanNews));
+    }
+
+    /**
+     * 修改boman_news
+     */
+    @PreAuthorize("@ss.hasPermi('system:news:edit')")
+    @Log(title = "boman_news", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody BomanNews bomanNews)
+    {
+        return toAjax(bomanNewsService.updateBomanNews(bomanNews));
+    }
+
+    /**
+     * 删除boman_news
+     */
+    @PreAuthorize("@ss.hasPermi('system:news:remove')")
+    @Log(title = "boman_news", businessType = BusinessType.DELETE)
+	@GetMapping("/delete/{newsIds}")
+    public AjaxResult remove(@PathVariable Long[] newsIds)
+    {
+        return toAjax(bomanNewsService.deleteBomanNewsByNewsIds(newsIds));
+    }
+}