storagelog菜单鉴权

This commit is contained in:
sxu 2024-09-29 14:18:42 +08:00
parent f138b59f2d
commit d63830f40f
2 changed files with 55 additions and 54 deletions

View File

@ -1,54 +1,54 @@
package com.bonus.sgzb.system.controller; //package com.bonus.sgzb.system.controller;
import com.bonus.sgzb.common.core.web.controller.BaseController; //import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult; //import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo; //import com.bonus.sgzb.common.core.web.page.TableDataInfo;
import com.bonus.sgzb.common.security.annotation.InnerAuth; //import com.bonus.sgzb.common.security.annotation.InnerAuth;
import com.bonus.sgzb.system.api.domain.BmNumLogs; //import com.bonus.sgzb.system.api.domain.BmNumLogs;
import com.bonus.sgzb.system.service.impl.BmNumLogsService; //import com.bonus.sgzb.system.service.impl.BmNumLogsService;
import org.springframework.web.bind.annotation.*; //import org.springframework.web.bind.annotation.*;
//
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
//
import java.util.List; //import java.util.List;
//
/** ///**
* (bm_num_logs)表控制层 //* (bm_num_logs)表控制层
* //*
* @author syruan //* @author syruan
*/ //*/
@RestController //@RestController
@RequestMapping("/bm_num_logs") //@RequestMapping("/bm_num_logs")
public class BmNumLogsController extends BaseController { //public class BmNumLogsController extends BaseController {
//
/** // /**
* 服务对象 // * 服务对象
*/ // */
@Autowired // @Autowired
private BmNumLogsService bmNumLogsService; // private BmNumLogsService bmNumLogsService;
//
@GetMapping("/list") // @GetMapping("/list")
public TableDataInfo list(BmNumLogs record) { // public TableDataInfo list(BmNumLogs record) {
startPage(); // startPage();
List<BmNumLogs> list = bmNumLogsService.selectAll(record); // List<BmNumLogs> list = bmNumLogsService.selectAll(record);
return getDataTable(list); // return getDataTable(list);
} // }
//
/** // /**
* 通过主键查询单条数据 // * 通过主键查询单条数据
* // *
* @param id 主键 // * @param id 主键
* @return 单条数据 // * @return 单条数据
*/ // */
@GetMapping("selectByPrimaryKey") // @GetMapping("selectByPrimaryKey")
public BmNumLogs selectByPrimaryKey(Integer id) { // public BmNumLogs selectByPrimaryKey(Integer id) {
return bmNumLogsService.selectByPrimaryKey(id); // return bmNumLogsService.selectByPrimaryKey(id);
} // }
//
@InnerAuth // @InnerAuth
@PostMapping // @PostMapping
public AjaxResult add(@RequestBody BmNumLogs bmNumLogs) { // public AjaxResult add(@RequestBody BmNumLogs bmNumLogs) {
return toAjax(bmNumLogsService.insert(bmNumLogs)); // return toAjax(bmNumLogsService.insert(bmNumLogs));
} // }
//
//
} //}

View File

@ -41,6 +41,7 @@ public class BmStorageLogController extends BaseController {
* @param id 主键 * @param id 主键
* @return 单条数据 * @return 单条数据
*/ */
@RequiresPermissions("stock:log:select")
@GetMapping("selectByPrimaryKey") @GetMapping("selectByPrimaryKey")
public BmStorageLog selectByPrimaryKey(Integer id) { public BmStorageLog selectByPrimaryKey(Integer id) {
return bmStorageLogService.selectByPrimaryKey(id); return bmStorageLogService.selectByPrimaryKey(id);