修改events表查询;

添加接口权限校验
master
吴顺杰 1 year ago
parent 2e817a4d51
commit 5d65f46156

@ -1,7 +1,6 @@
package com.ruoyi.pt.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
@ -64,7 +63,9 @@ public class EventsController extends BaseController {
@GetMapping("{id}")
@ApiOperation(value = "通过主键查询单条事件集合表", response = Events.class)
public AjaxResult getById(@PathVariable Serializable id) {
return success(eventsService.getById(id));
QueryWrapper<Events> wrapper = new QueryWrapper<>();
wrapper.eq("innerEventId", id);
return success(eventsService.getOne(wrapper));
}
/**

@ -114,9 +114,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/pt/**","/gateway/event/event/eventData/**","/gateway/event/event/eventData/eventProgress/**").permitAll()
.antMatchers("/remoteCall/**").anonymous()
.antMatchers("/common/**").anonymous()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// .antMatchers("/remoteCall/**").anonymous()
// .antMatchers("/pt/**").anonymous()
// .antMatchers("/gateway/event/event/eventData/**").anonymous()
// .antMatchers("/gateway/event/event/eventData/eventProgress/**").anonymous()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()
.and()

Loading…
Cancel
Save