|
@@ -0,0 +1,97 @@
|
|
|
+package com.fs.hisStore;
|
|
|
+
|
|
|
+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.page.TableDataInfo;
|
|
|
+import com.fs.common.enums.BusinessType;
|
|
|
+import com.fs.common.utils.poi.ExcelUtil;
|
|
|
+import com.fs.hisStore.domain.FsMenuScrm;
|
|
|
+import com.fs.hisStore.service.IFsMenuScrmService;
|
|
|
+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 2022-03-15
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/store/store/menu")
|
|
|
+public class FsMenuScrmController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IFsMenuScrmService fsMenuService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询用户端菜单管理列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:menu:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(FsMenuScrm fsMenu)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<FsMenuScrm> list = fsMenuService.selectFsMenuList(fsMenu);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出用户端菜单管理列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:menu:export')")
|
|
|
+ @Log(title = "用户端菜单管理", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult export(FsMenuScrm fsMenu)
|
|
|
+ {
|
|
|
+ List<FsMenuScrm> list = fsMenuService.selectFsMenuList(fsMenu);
|
|
|
+ ExcelUtil<FsMenuScrm> util = new ExcelUtil<FsMenuScrm>(FsMenuScrm.class);
|
|
|
+ return util.exportExcel(list, "menu");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户端菜单管理详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:menu:query')")
|
|
|
+ @GetMapping(value = "/{menuId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("menuId") Long menuId)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(fsMenuService.selectFsMenuById(menuId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增用户端菜单管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:menu:add')")
|
|
|
+ @Log(title = "用户端菜单管理", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody FsMenuScrm fsMenu)
|
|
|
+ {
|
|
|
+ return toAjax(fsMenuService.insertFsMenu(fsMenu));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改用户端菜单管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:menu:edit')")
|
|
|
+ @Log(title = "用户端菜单管理", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody FsMenuScrm fsMenu)
|
|
|
+ {
|
|
|
+ return toAjax(fsMenuService.updateFsMenu(fsMenu));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除用户端菜单管理
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:menu:remove')")
|
|
|
+ @Log(title = "用户端菜单管理", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{menuIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] menuIds)
|
|
|
+ {
|
|
|
+ return toAjax(fsMenuService.deleteFsMenuByIds(menuIds));
|
|
|
+ }
|
|
|
+}
|