Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
5a82f5e4
Commit
5a82f5e4
authored
Aug 13, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加人员维保或者业主单位权限判断逻辑
parent
90873ad3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+1
-1
PersonIdentify.java
...ejoin/amos/maintenance/core/framework/PersonIdentify.java
+1
-1
PersonIdentifyAspect.java
...amos/maintenance/core/framework/PersonIdentifyAspect.java
+1
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanTaskController.java
View file @
5a82f5e4
...
@@ -459,7 +459,7 @@ public class PlanTaskController extends AbstractBaseController {
...
@@ -459,7 +459,7 @@ public class PlanTaskController extends AbstractBaseController {
* @param
* @param
* @return
* @return
*/
*/
@PersonIdentify
(
is
Person
Identity
=
true
)
@PersonIdentify
(
is
Need
Identity
=
true
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保任务查询-mobile"
,
notes
=
"根据用户条件查询所有计划任务-mobile"
)
@ApiOperation
(
value
=
"维保任务查询-mobile"
,
notes
=
"根据用户条件查询所有计划任务-mobile"
)
@RequestMapping
(
value
=
"/queryPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/core/framework/PersonIdentify.java
View file @
5a82f5e4
...
@@ -19,6 +19,6 @@ public @interface PersonIdentify {
...
@@ -19,6 +19,6 @@ public @interface PersonIdentify {
* 是否进行人员校验
* 是否进行人员校验
* @return
* @return
*/
*/
boolean
is
Person
Identity
()
default
false
;
boolean
is
Need
Identity
()
default
false
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/core/framework/PersonIdentifyAspect.java
View file @
5a82f5e4
...
@@ -30,7 +30,7 @@ public class PersonIdentifyAspect {
...
@@ -30,7 +30,7 @@ public class PersonIdentifyAspect {
@Before
(
value
=
"@annotation(com.yeejoin.amos.maintenance.core.framework.PersonIdentify) && @annotation(permission)"
)
@Before
(
value
=
"@annotation(com.yeejoin.amos.maintenance.core.framework.PersonIdentify) && @annotation(permission)"
)
public
void
personIdentity
(
JoinPoint
joinPoint
,
PersonIdentify
permission
)
throws
PermissionException
{
public
void
personIdentity
(
JoinPoint
joinPoint
,
PersonIdentify
permission
)
throws
PermissionException
{
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
buildKey
(
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
buildKey
(
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
permission
.
is
Person
Identity
()
&&
reginParam
!=
null
)
{
if
(
permission
.
is
Need
Identity
()
&&
reginParam
!=
null
)
{
//调用jcs,进行人员身份判断,是维保公司人员还是业主单位人员
//调用jcs,进行人员身份判断,是维保公司人员还是业主单位人员
// JSONObject result = new JSONObject();
// JSONObject result = new JSONObject();
// String identityType = result.get("identityType").toString();
// String identityType = result.get("identityType").toString();
...
@@ -47,8 +47,6 @@ public class PersonIdentifyAspect {
...
@@ -47,8 +47,6 @@ public class PersonIdentifyAspect {
}
}
public
String
buildKey
(
String
token
)
{
public
String
buildKey
(
String
token
)
{
//由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时,
//return "region_" + userId + "_" + token;
return
"region_"
+
token
;
return
"region_"
+
token
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment