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
2cea7a0b
Commit
2cea7a0b
authored
Jan 09, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bigzcode
parent
15380d69
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
75 additions
and
8 deletions
+75
-8
PersonIdentifyAspect.java
...odule/common/api/core/framework/PersonIdentifyAspect.java
+11
-1
PersonIdentifyAspect.java
.../com/yeejoin/equipmanage/config/PersonIdentifyAspect.java
+9
-0
PersonIdentifyAspect.java
...amos/maintenance/core/framework/PersonIdentifyAspect.java
+10
-0
PersonIdentifyAspect.java
.../com/yeejoin/amos/patrol/config/PersonIdentifyAspect.java
+8
-0
PersonIdentifyAspect.java
...amos/supervision/core/framework/PersonIdentifyAspect.java
+8
-1
application.properties
...ot-system-equip/src/main/resources/application.properties
+5
-2
application.properties
...boot-system-fas/src/main/resources/application.properties
+2
-0
application.properties
...m-knowledgebase/src/main/resources/application.properties
+2
-0
application.properties
...em-latentdanger/src/main/resources/application.properties
+2
-0
application.properties
...tem-maintenance/src/main/resources/application.properties
+4
-2
application.properties
...ystem-precontrol/src/main/resource/application.properties
+2
-0
application.properties
...tem-supervision/src/main/resources/application.properties
+4
-2
application.properties
...oot-utils-jpush/src/main/resources/application.properties
+2
-0
application.properties
...t-utils-message/src/main/resources/application.properties
+2
-0
application.properties
...oot-utils-video/src/main/resources/application.properties
+4
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/core/framework/PersonIdentifyAspect.java
View file @
2cea7a0b
...
...
@@ -14,6 +14,7 @@ import org.aspectj.lang.JoinPoint;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -32,6 +33,8 @@ public class PersonIdentifyAspect {
RedisUtils
redisUtils
;
@Autowired
private
IOrgUsrService
orgUsrService
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Before
(
value
=
"@annotation(com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify) && @annotation(permission)"
)
public
void
personIdentity
(
JoinPoint
joinPoint
,
PersonIdentify
permission
)
throws
PermissionException
{
...
...
@@ -41,12 +44,19 @@ public class PersonIdentifyAspect {
UserDto
userDto
=
orgUsrService
.
getUserParentInfo
(
userId
);
ReginParams
.
PersonIdentity
personIdentity
=
new
ReginParams
.
PersonIdentity
();
// TODO 没有绑定机场单位的人员,则赋值不存在的bizOrgCode,规避查询出所有数据
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
userDto
.
getBizOrgCode
())
?
"-1"
:
userDto
.
getBizOrgCode
());
//
personIdentity.setBizOrgCode(StringUtils.isEmpty(userDto.getBizOrgCode()) ? "-1" : userDto.getBizOrgCode());
personIdentity
.
setCompanyId
(
userDto
.
getCompanyId
());
personIdentity
.
setCompanyName
(
userDto
.
getCompanyName
());
personIdentity
.
setPersonSeq
(
userDto
.
getPersonSeq
());
personIdentity
.
setPersonName
(
userDto
.
getPersonName
());
personIdentity
.
setIdentityType
(
userDto
.
getIdentityType
());
//电力默认走公司权限
if
(!
logic
){
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
userDto
.
getCompanyBizOrgCode
())
?
"-1"
:
userDto
.
getCompanyBizOrgCode
());
}
else
{
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
userDto
.
getBizOrgCode
())
?
"-1"
:
userDto
.
getBizOrgCode
());
}
personIdentity
.
setCompanyBizOrgCode
(
userDto
.
getCompanyBizOrgCode
());
reginParam
.
setPersonIdentity
(
personIdentity
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/config/PersonIdentifyAspect.java
View file @
2cea7a0b
...
...
@@ -14,6 +14,7 @@ import org.aspectj.lang.annotation.Aspect;
import
org.aspectj.lang.annotation.Before
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Component
;
...
...
@@ -38,6 +39,9 @@ public class PersonIdentifyAspect {
@Autowired
private
JcsFeign
jcsFeignClient
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Pointcut
(
"execution(public * com.*.equipmanage.controller..*(..))"
)
public
void
userDate
()
{
...
...
@@ -60,6 +64,11 @@ public class PersonIdentifyAspect {
// ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
String
s
=
JSONObject
.
toJSONString
(
responseModel
.
getResult
());
ReginParams
.
PersonIdentity
personIdentity
=
JSONObject
.
parseObject
(
s
,
ReginParams
.
PersonIdentity
.
class
);
//电力默认走公司权限
if
(!
logic
){
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
personIdentity
.
getCompanyBizOrgCode
())
?
"-1"
:
personIdentity
.
getCompanyBizOrgCode
());
}
reginParam
.
setPersonIdentity
(
personIdentity
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
}
...
...
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 @
2cea7a0b
...
...
@@ -9,10 +9,12 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.maintenance.business.feign.JCSFeignClient
;
import
com.yeejoin.amos.maintenance.exception.PermissionException
;
import
org.apache.commons.lang3.StringUtils
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Component
;
...
...
@@ -36,6 +38,8 @@ public class PersonIdentifyAspect {
RedisUtils
redisUtils
;
@Autowired
JCSFeignClient
jcsFeignClient
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Before
(
value
=
"@annotation(com.yeejoin.amos.maintenance.core.framework.PersonIdentify) && @annotation(permission)"
)
...
...
@@ -49,6 +53,12 @@ public class PersonIdentifyAspect {
throw
new
RuntimeException
(
responseModel
.
getDevMessage
());
}
ReginParams
.
PersonIdentity
personIdentity
=
(
ReginParams
.
PersonIdentity
)
Bean
.
mapToBean
((
Map
<
String
,
Object
>)
responseModel
.
getResult
(),
ReginParams
.
PersonIdentity
.
class
);
//电力默认走公司权限
if
(!
logic
){
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
personIdentity
.
getCompanyBizOrgCode
())
?
"-1"
:
personIdentity
.
getCompanyBizOrgCode
());
}
reginParam
.
setPersonIdentity
(
personIdentity
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/config/PersonIdentifyAspect.java
View file @
2cea7a0b
...
...
@@ -15,6 +15,7 @@ import org.aspectj.lang.annotation.Aspect;
import
org.aspectj.lang.annotation.Before
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Component
;
...
...
@@ -39,6 +40,8 @@ public class PersonIdentifyAspect {
@Autowired
private
JcsFeignClient
jcsFeignClient
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Pointcut
(
"execution(public * com.yeejoin.amos.*.business.controller..*(..))"
)
public
void
userDate
()
{
...
...
@@ -69,6 +72,11 @@ public class PersonIdentifyAspect {
String
s
=
JSONObject
.
toJSONString
(
responseModel
.
getResult
());
ReginParams
.
PersonIdentity
personIdentity
=
JSONObject
.
parseObject
(
s
,
ReginParams
.
PersonIdentity
.
class
);
// ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
//电力默认走公司权限
if
(!
logic
){
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
personIdentity
.
getCompanyBizOrgCode
())
?
"-1"
:
personIdentity
.
getCompanyBizOrgCode
());
}
reginParam
.
setPersonIdentity
(
personIdentity
);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/core/framework/PersonIdentifyAspect.java
View file @
2cea7a0b
...
...
@@ -9,17 +9,18 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.supervision.business.feign.JCSFeignClient
;
import
com.yeejoin.amos.supervision.exception.PermissionException
;
import
org.apache.commons.lang.StringUtils
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -36,6 +37,8 @@ public class PersonIdentifyAspect {
RedisUtils
redisUtils
;
@Autowired
JCSFeignClient
jcsFeignClient
;
@Value
(
"${logic}"
)
Boolean
logic
;
@Before
(
value
=
"@annotation(com.yeejoin.amos.supervision.core.framework.PersonIdentify) && @annotation(permission)"
)
public
void
personIdentity
(
JoinPoint
joinPoint
,
PersonIdentify
permission
)
throws
PermissionException
{
...
...
@@ -61,6 +64,10 @@ public class PersonIdentifyAspect {
personIdentity
.
setCompanyId
((
String
)
other
.
get
(
"sequenceNbr"
));
personIdentity
.
setCompanyName
((
String
)
other
.
get
(
"bizOrgName"
));
}
//电力默认走公司权限
if
(!
logic
){
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
personIdentity
.
getCompanyBizOrgCode
())
?
"-1"
:
personIdentity
.
getCompanyBizOrgCode
());
}
// ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) result.get(0), ReginParams.PersonIdentity.class);
reginParam
.
setPersonIdentity
(
personIdentity
);
...
...
amos-boot-system-equip/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -126,4 +126,7 @@ management.security.enabled=true
management.endpoint.health.show-details
=
always
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
stationCode
=
LSHLZ1bZAJU645Pgl7
\ No newline at end of file
stationCode
=
LSHLZ1bZAJU645Pgl7
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
\ No newline at end of file
amos-boot-system-fas/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -103,5 +103,7 @@ redis.cache.failure.time=10800
#now.gateway.address=http://172.16.10.72:10005/
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-system-knowledgebase/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -23,3 +23,5 @@ mybatis-plus.mapper-locations=classpath:mapper/*
redis.cache.failure.time
=
10800
management.endpoints.enabled-by-default
=
false
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-system-latentdanger/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -65,3 +65,5 @@ Knowledgebase.fegin.name=AMOS-API-KNOWLEDGEBASE
## 消防救援保障部ID
fire-rescue
=
1432549862557130753
management.endpoints.enabled-by-default
=
false
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-system-maintenance/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -67,4 +67,7 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
management.endpoints.enabled-by-default
=
false
\ No newline at end of file
management.endpoints.enabled-by-default
=
false
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-system-precontrol/src/main/resource/application.properties
View file @
2cea7a0b
...
...
@@ -27,3 +27,5 @@ rule.award="\u65BD\u5DE5\u5B89\u5168\u9884\u63A7/award"
#server.ssl.key-store-type=JKS
login.environment
=
dev
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-system-supervision/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -73,4 +73,7 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
management.endpoints.enabled-by-default
=
false
\ No newline at end of file
management.endpoints.enabled-by-default
=
false
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-utils/amos-boot-utils-jpush/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -5,3 +5,5 @@ spring.profiles.active=dev
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.serialization.write-dates-as-timestamps
=
true
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-utils/amos-boot-utils-message/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -6,3 +6,5 @@ spring.jackson.time-zone=GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.serialization.write-dates-as-timestamps
=
true
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
amos-boot-utils/amos-boot-utils-video/src/main/resources/application.properties
View file @
2cea7a0b
...
...
@@ -35,3 +35,7 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
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