认证-参数模板-权限
This commit is contained in:
+12
@@ -16,6 +16,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -57,6 +58,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-分页列表查询")
|
||||
@ApiOperation(value="参数项基本信息表-分页列表查询", notes="参数项基本信息表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
@RequiresPermissions("params:paramsInfo:page")
|
||||
public Result<?> queryPageList(ParamsInfoEO paramsInfoEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@@ -108,6 +110,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-校验nio编号")
|
||||
@ApiOperation(value="参数项基本信息表-校验nio编号", notes="参数项基本信息表-校验nio编号")
|
||||
@GetMapping(value = "/verifyNioNumber")
|
||||
@RequiresPermissions("params:paramsInfo:add")
|
||||
public boolean verifyNioNumber(@RequestParam(name = "nioNumber") String nioNumber) {
|
||||
LambdaQueryWrapper<ParamsInfoEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsInfoEO::getNioNumber, nioNumber);
|
||||
@@ -127,6 +130,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-添加")
|
||||
@ApiOperation(value="参数项基本信息表-添加", notes="参数项基本信息表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
@RequiresPermissions("params:paramsInfo:add")
|
||||
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
||||
if (isSuccess) {
|
||||
@@ -145,6 +149,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-编辑")
|
||||
@ApiOperation(value="参数项基本信息表-编辑", notes="参数项基本信息表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
@RequiresPermissions("params:paramsInfo:edit")
|
||||
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
|
||||
if (isSuccess) {
|
||||
@@ -163,6 +168,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-通过id删除")
|
||||
@ApiOperation(value="参数项基本信息表-通过id删除", notes="参数项基本信息表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@RequiresPermissions("params:paramsInfo:delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error("删除数据不能为空");
|
||||
@@ -180,6 +186,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-批量删除")
|
||||
@ApiOperation(value="参数项基本信息表-批量删除", notes="参数项基本信息表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
@RequiresPermissions("params:paramsInfo:deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error("删除数据不能为空");
|
||||
@@ -197,6 +204,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-通过id查询")
|
||||
@ApiOperation(value="参数项基本信息表-通过id查询", notes="参数项基本信息表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
@RequiresPermissions("params:paramsInfo:edit")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ParamsInfoEO paramsInfoEO = paramsInfoEOService.queryById(id);
|
||||
if(paramsInfoEO==null) {
|
||||
@@ -214,6 +222,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-发布版本")
|
||||
@ApiOperation(value="参数项基本信息表-发布版本", notes="参数项基本信息表-发布版本")
|
||||
@GetMapping(value = "/publish")
|
||||
@RequiresPermissions("params:paramsInfo:publish")
|
||||
public Result<?> publish(@RequestParam(name="paramsTemplateId") String paramsTemplateId) {
|
||||
int publishVersion = paramsInfoPublishEOService.publishTemplate(paramsTemplateId);
|
||||
return Result.OK("发布版本:" + publishVersion + "成功!");
|
||||
@@ -230,6 +239,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-模板下载")
|
||||
@ApiOperation(value = "参数项基本信息表-模板下载", notes="参数项基本信息表-模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
@RequiresPermissions("params:paramsInfo:template")
|
||||
public void exportTemplate(@RequestParam(name = "cut") String cut,
|
||||
@RequestParam(name = "templateName", required = false) String templateName,
|
||||
HttpServletResponse response,
|
||||
@@ -245,6 +255,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-导出")
|
||||
@ApiOperation(value = "参数项基本信息表-导出", notes="参数项基本信息表-导出")
|
||||
@GetMapping(value = "/exportParamsInfoZip")
|
||||
@RequiresPermissions("params:paramsInfo:export")
|
||||
public void exportParamsInfoZip(@RequestParam Map<String, Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
@@ -266,6 +277,7 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
||||
@AutoLog(value = "参数项基本信息表-导入")
|
||||
@ApiOperation(value = "参数项基本信息表-导入")
|
||||
@PostMapping(value = "/importParamsInfo")
|
||||
@RequiresPermissions("params:paramsInfo:import")
|
||||
public Result<?> importParamsInfo( MultipartFile file,
|
||||
@RequestParam(value = "cut") String cut,
|
||||
@RequestParam(value = "paramsTemplateId") String paramsTemplateId) throws Exception {
|
||||
|
||||
+7
@@ -12,6 +12,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -49,6 +50,7 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
||||
@AutoLog(value = "参数模板表-分页列表查询")
|
||||
@ApiOperation(value="参数模板表-分页列表查询", notes="参数模板表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
@RequiresPermissions("params:template:page")
|
||||
public Result<?> queryPageList(ParamsTemplateEO paramsTemplateEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@@ -86,6 +88,7 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
||||
@AutoLog(value = "参数模板表-添加")
|
||||
@ApiOperation(value="参数模板表-添加", notes="参数模板表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
@RequiresPermissions("params:template:add")
|
||||
public Result<?> add(@Validated @RequestBody ParamsTemplateEO paramsTemplateEO) {
|
||||
paramsTemplateEOService.add(paramsTemplateEO);
|
||||
return Result.OK("添加成功!");
|
||||
@@ -100,6 +103,7 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
||||
@AutoLog(value = "参数模板表-编辑")
|
||||
@ApiOperation(value="参数模板表-编辑", notes="参数模板表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
@RequiresPermissions("params:template:edit")
|
||||
public Result<?> edit(@Validated @RequestBody ParamsTemplateEO paramsTemplateEO) {
|
||||
paramsTemplateEOService.editById(paramsTemplateEO);
|
||||
return Result.OK("编辑成功!");
|
||||
@@ -114,6 +118,7 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
||||
@AutoLog(value = "参数模板表-通过id删除")
|
||||
@ApiOperation(value="参数模板表-通过id删除", notes="参数模板表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@RequiresPermissions("params:template:delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error("删除数据不能为空");
|
||||
@@ -131,6 +136,7 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
||||
@AutoLog(value = "参数模板表-批量删除")
|
||||
@ApiOperation(value="参数模板表-批量删除", notes="参数模板表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
@RequiresPermissions("params:template:deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error("删除数据不能为空");
|
||||
@@ -165,6 +171,7 @@ public class ParamsTemplateEOController extends JeroController<ParamsTemplateEO,
|
||||
@AutoLog(value = "参数模板表-复制")
|
||||
@ApiOperation(value="参数模板表-复制", notes="参数模板表-复制")
|
||||
@GetMapping(value = "/copyById")
|
||||
@RequiresPermissions("params:template:copy")
|
||||
public Result<?> copyById(@RequestParam(name="id") String id,
|
||||
@RequestParam(name="paramsTemplateName") String paramsTemplateName) {
|
||||
ParamsTemplateEO paramsTemplateEO = paramsTemplateEOService.copyById(id, paramsTemplateName);
|
||||
|
||||
Reference in New Issue
Block a user