大屏接口编写

duhanyu
dongdingding 1 year ago
parent e636a738a2
commit 809c3f5712

@ -3,6 +3,9 @@ package com.ruoyi.web.controller.system;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -30,6 +33,7 @@ import com.ruoyi.system.service.ISysDictTypeService;
* *
* @author ruoyi * @author ruoyi
*/ */
@Api(tags = "数据字典信息")
@RestController @RestController
@RequestMapping("/system/dict/data") @RequestMapping("/system/dict/data")
public class SysDictDataController extends BaseController public class SysDictDataController extends BaseController
@ -40,7 +44,7 @@ public class SysDictDataController extends BaseController
@Autowired @Autowired
private ISysDictTypeService dictTypeService; private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasPermi('system:dict:list')") @ApiOperation("list数据")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysDictData dictData) public TableDataInfo list(SysDictData dictData)
{ {
@ -62,7 +66,7 @@ public class SysDictDataController extends BaseController
/** /**
* *
*/ */
@PreAuthorize("@ss.hasPermi('system:dict:query')") @ApiOperation("查询字典数据详细")
@GetMapping(value = "/{dictCode}") @GetMapping(value = "/{dictCode}")
public AjaxResult getInfo(@PathVariable Long dictCode) public AjaxResult getInfo(@PathVariable Long dictCode)
{ {
@ -72,6 +76,7 @@ public class SysDictDataController extends BaseController
/** /**
* *
*/ */
@ApiOperation("根据字典类型查询字典数据信息")
@GetMapping(value = "/type/{dictType}") @GetMapping(value = "/type/{dictType}")
public AjaxResult dictType(@PathVariable String dictType) public AjaxResult dictType(@PathVariable String dictType)
{ {

@ -117,7 +117,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/tcZz/networkSecurity/xtjc/ListNoToken", "/tcZz/netWorkYq/yqxxltj/ListNoToken").permitAll() "/tcZz/networkSecurity/xtjc/ListNoToken", "/tcZz/netWorkYq/yqxxltj/ListNoToken").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**",
"/tcZz/networkSecurity/cybersecurity/common/importExcel","/tcZz/networkEcology/**/**","/tcZz/networkSecurity/**/**" "/tcZz/networkSecurity/cybersecurity/common/importExcel","/tcZz/networkEcology/**/**","/tcZz/networkSecurity/**/**"
,"/tcZz/netManage/**/**","/tcZz/netWorkYq/**/**" ,"/tcZz/netManage/**/**","/tcZz/netWorkYq/**/**","/system/dict/data/type/**","/system/dict/data/**"
).permitAll() ).permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()

Loading…
Cancel
Save