Commit 5a82f5e4 authored by suhuiguang's avatar suhuiguang

1.增加人员维保或者业主单位权限判断逻辑

parent 90873ad3
......@@ -459,7 +459,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param
* @return
*/
@PersonIdentify(isPersonIdentity = true)
@PersonIdentify(isNeedIdentity = true)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "维保任务查询-mobile", notes = "根据用户条件查询所有计划任务-mobile")
@RequestMapping(value = "/queryPlanTask", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
......
......@@ -19,6 +19,6 @@ public @interface PersonIdentify {
* 是否进行人员校验
* @return
*/
boolean isPersonIdentity() default false;
boolean isNeedIdentity() default false;
}
......@@ -30,7 +30,7 @@ public class PersonIdentifyAspect {
@Before(value = "@annotation(com.yeejoin.amos.maintenance.core.framework.PersonIdentify) && @annotation(permission)")
public void personIdentity(JoinPoint joinPoint, PersonIdentify permission) throws PermissionException {
ReginParams reginParam = JSON.parseObject(redisUtils.get(buildKey(RequestContext.getToken())).toString(), ReginParams.class);
if (permission.isPersonIdentity() && reginParam != null) {
if (permission.isNeedIdentity() && reginParam != null) {
//调用jcs,进行人员身份判断,是维保公司人员还是业主单位人员
// JSONObject result = new JSONObject();
// String identityType = result.get("identityType").toString();
......@@ -47,8 +47,6 @@ public class PersonIdentifyAspect {
}
public String buildKey(String token) {
//由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时,
//return "region_" + userId + "_" + token;
return "region_" + token;
}
......
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