Parcourir la source

Merge branch 'bly_store'

yfh il y a 1 semaine
Parent
commit
2e2389b9ea

+ 99 - 0
fs-admin/src/main/java/com/fs/his/controller/FsHomeArticleCategoryController.java

@@ -0,0 +1,99 @@
+package com.fs.his.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsHomeArticleCategoryScrm;
+import com.fs.hisStore.service.IFsHomeArticleCategoryScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 期刊分类Controller
+ *
+ * @author fs
+ * @date 2025-05-21
+ */
+@RestController
+@RequestMapping("/his/homeCategory")
+public class FsHomeArticleCategoryController extends BaseController {
+    @Autowired
+    private IFsHomeArticleCategoryScrmService fsHomeArticleCategoryService;
+
+    /**
+     * 查询期刊分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        startPage();
+        List<FsHomeArticleCategoryScrm> list = fsHomeArticleCategoryService.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出期刊分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:export')")
+    @Log(title = "期刊分类", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        List<FsHomeArticleCategoryScrm> list = fsHomeArticleCategoryService.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
+        ExcelUtil<FsHomeArticleCategoryScrm> util = new ExcelUtil<FsHomeArticleCategoryScrm>(FsHomeArticleCategoryScrm.class);
+        return util.exportExcel(list, "homeCategory");
+    }
+
+    /**
+     * 获取期刊分类详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:query')")
+    @GetMapping(value = "/{categoryId}")
+    public AjaxResult getInfo(@PathVariable("categoryId") Long categoryId) {
+        return AjaxResult.success(fsHomeArticleCategoryService.selectFsHomeArticleCategoryById(categoryId));
+    }
+
+    /**
+     * 新增期刊分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:add')")
+    @Log(title = "期刊分类", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        return toAjax(fsHomeArticleCategoryService.insertFsHomeArticleCategory(fsHomeArticleCategory));
+    }
+
+    /**
+     * 修改期刊分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:edit')")
+    @Log(title = "期刊分类", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        return toAjax(fsHomeArticleCategoryService.updateFsHomeArticleCategory(fsHomeArticleCategory));
+    }
+
+    /**
+     * 删除期刊分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:remove')")
+    @Log(title = "期刊分类", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{categoryIds}")
+    public AjaxResult remove(@PathVariable Long[] categoryIds) {
+        return toAjax(fsHomeArticleCategoryService.deleteFsHomeArticleCategoryByIds(categoryIds));
+    }
+
+    @GetMapping("/allList")
+    public R getAllList(FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        fsHomeArticleCategory.setStatus(1);
+        List<FsHomeArticleCategoryScrm> list = fsHomeArticleCategoryService.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
+        return R.ok().put("rows", list);
+    }
+
+}

+ 94 - 0
fs-admin/src/main/java/com/fs/his/controller/FsHomeArticleController.java

@@ -0,0 +1,94 @@
+package com.fs.his.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsHomeArticleScrm;
+import com.fs.hisStore.service.IFsHomeArticleScrmService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 期刊Controller
+ *
+ * @author fs
+ * @date 2025-05-21
+ */
+@RestController
+@RequestMapping("/his/homeArticle")
+public class FsHomeArticleController extends BaseController {
+    @Autowired
+    private IFsHomeArticleScrmService fsHomeArticleService;
+
+    /**
+     * 查询期刊列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:list')")
+    @GetMapping("/list")
+    public R list(FsHomeArticleScrm fsHomeArticle)
+    {
+        PageHelper.startPage(fsHomeArticle.getPageNum(), fsHomeArticle.getPageSize());
+        List<FsHomeArticleScrm> list = fsHomeArticleService.selectFsHomeArticleList(fsHomeArticle);
+        PageInfo<FsHomeArticleScrm> listPageInfo = new PageInfo<>(list);
+        return R.ok().put("rows", listPageInfo);
+    }
+
+    /**
+     * 导出期刊列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:export')")
+    @Log(title = "期刊", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsHomeArticleScrm fsHomeArticle) {
+        List<FsHomeArticleScrm> list = fsHomeArticleService.selectFsHomeArticleList(fsHomeArticle);
+        ExcelUtil<FsHomeArticleScrm> util = new ExcelUtil<FsHomeArticleScrm>(FsHomeArticleScrm.class);
+        return util.exportExcel(list, "homArticle");
+    }
+
+    /**
+     * 获取期刊详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:query')")
+    @GetMapping(value = "/{articleId}")
+    public AjaxResult getInfo(@PathVariable("articleId") Long articleId) {
+        return AjaxResult.success(fsHomeArticleService.selectFsHomeArticleById(articleId));
+    }
+
+    /**
+     * 新增期刊
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:add')")
+    @Log(title = "期刊", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsHomeArticleScrm fsHomeArticle) {
+        return toAjax(fsHomeArticleService.insertFsHomeArticle(fsHomeArticle));
+    }
+
+    /**
+     * 修改期刊
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:edit')")
+    @Log(title = "期刊", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsHomeArticleScrm fsHomeArticle) {
+        return toAjax(fsHomeArticleService.updateFsHomeArticle(fsHomeArticle));
+    }
+
+    /**
+     * 删除期刊
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:remove')")
+    @Log(title = "期刊", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{articleIds}")
+    public AjaxResult remove(@PathVariable Long[] articleIds) {
+        return toAjax(fsHomeArticleService.deleteFsHomeArticleByIds(articleIds));
+    }
+}

+ 93 - 0
fs-admin/src/main/java/com/fs/his/controller/FsHomeArticleViewController.java

@@ -0,0 +1,93 @@
+package com.fs.his.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsHomeArticleViewScrm;
+import com.fs.hisStore.service.IFsHomeArticleViewScrmService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 期刊阅读Controller
+ *
+ * @author fs
+ * @date 2025-05-21
+ */
+@RestController
+@RequestMapping("/his/homeView")
+public class FsHomeArticleViewController extends BaseController {
+    @Autowired
+    private IFsHomeArticleViewScrmService fsHomeArticleViewService;
+
+    /**
+     * 查询期刊阅读列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:list')")
+    @GetMapping("/list")
+    public R list(FsHomeArticleViewScrm fsHomeArticleView) {
+        PageHelper.startPage(fsHomeArticleView.getPageNum(), fsHomeArticleView.getPageSize());
+        List<FsHomeArticleViewScrm> list = fsHomeArticleViewService.selectFsHomeArticleViewList(fsHomeArticleView);
+        PageInfo<FsHomeArticleViewScrm> listPageInfo = new PageInfo<>(list);
+        return R.ok().put("rows", listPageInfo);
+    }
+
+    /**
+     * 导出期刊阅读列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:export')")
+    @Log(title = "期刊阅读", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsHomeArticleViewScrm fsHomeArticleView) {
+        List<FsHomeArticleViewScrm> list = fsHomeArticleViewService.selectFsHomeArticleViewList(fsHomeArticleView);
+        ExcelUtil<FsHomeArticleViewScrm> util = new ExcelUtil<FsHomeArticleViewScrm>(FsHomeArticleViewScrm.class);
+        return util.exportExcel(list, "homeView");
+    }
+
+    /**
+     * 获取期刊阅读详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:query')")
+    @GetMapping(value = "/{viewId}")
+    public AjaxResult getInfo(@PathVariable("viewId") Long viewId) {
+        return AjaxResult.success(fsHomeArticleViewService.selectFsHomeArticleViewById(viewId));
+    }
+
+    /**
+     * 新增期刊阅读
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:add')")
+    @Log(title = "期刊阅读", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsHomeArticleViewScrm fsHomeArticleView) {
+        return toAjax(fsHomeArticleViewService.insertFsHomeArticleView(fsHomeArticleView));
+    }
+
+    /**
+     * 修改期刊阅读
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:edit')")
+    @Log(title = "期刊阅读", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsHomeArticleViewScrm fsHomeArticleView) {
+        return toAjax(fsHomeArticleViewService.updateFsHomeArticleView(fsHomeArticleView));
+    }
+
+    /**
+     * 删除期刊阅读
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:remove')")
+    @Log(title = "期刊阅读", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{viewIds}")
+    public AjaxResult remove(@PathVariable Long[] viewIds) {
+        return toAjax(fsHomeArticleViewService.deleteFsHomeArticleViewByIds(viewIds));
+    }
+}