Commit 84a8048d authored by kongfm's avatar kongfm

接口不校验逻辑判断更新 根据值班区域获取值班人员接口 不校验token

parent 4fad27be
...@@ -63,6 +63,14 @@ public class ControllerAop { ...@@ -63,6 +63,14 @@ public class ControllerAop {
public void doBefore(JoinPoint joinPoint) { public void doBefore(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest(); HttpServletRequest request = attributes.getRequest();
// 不需要添加请求头的接口
String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany", "/jcs/command/lookHtmlText", "/jcs/common/duty-person/findByDutyAreaId"};
// 获取请求路径
for(String uri : url) {
if(request.getRequestURI().indexOf(uri) != -1) {
return;
}
}
//TODO tyboot 框架拦截器已缓存数据 //TODO tyboot 框架拦截器已缓存数据
String token = RequestContext.getToken(); String token = RequestContext.getToken();
// 平台studio配置的下载接口token从url里取 // 平台studio配置的下载接口token从url里取
...@@ -70,12 +78,6 @@ public class ControllerAop { ...@@ -70,12 +78,6 @@ public class ControllerAop {
fillRequestContext(request); fillRequestContext(request);
token = RequestContext.getToken(); token = RequestContext.getToken();
} }
// 不需要添加请求头的接口
String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany", "/jcs/command/lookHtmlText"};
// 获取请求路径
if (Arrays.asList(url).contains(request.getRequestURI())) {
return;
}
if (token != null) { if (token != null) {
String pattern = RedisKey.buildPatternKey(token); String pattern = RedisKey.buildPatternKey(token);
//验证token有效性,防止token失效 //验证token有效性,防止token失效
......
...@@ -171,7 +171,7 @@ public class DutyPersonController extends BaseController { ...@@ -171,7 +171,7 @@ public class DutyPersonController extends BaseController {
* 新接口 根据值班区域id 查询值班人 by kongfm 2021-09-15 * 新接口 根据值班区域id 查询值班人 by kongfm 2021-09-15
* @return ResponseModel * @return ResponseModel
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/findByDutyAreaId/{dutyAreaId}") @GetMapping(value = "/findByDutyAreaId/{dutyAreaId}")
@ApiOperation(httpMethod = "GET", value = "根据值班区域ID查询当前值班人", notes = "根据值班区域ID查询当前值班人") @ApiOperation(httpMethod = "GET", value = "根据值班区域ID查询当前值班人", notes = "根据值班区域ID查询当前值班人")
public ResponseModel<List<DutyPersonDto>> findByDutyAreaId( public ResponseModel<List<DutyPersonDto>> findByDutyAreaId(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment