Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
b251d18d
Commit
b251d18d
authored
Sep 27, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台修改密码同步给业务
parent
05e5e9ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
1 deletion
+58
-1
PlatformModifyPasswordistener.java
...ule/jxiop/biz/listener/PlatformModifyPasswordistener.java
+55
-0
application-dev.properties
...e-jxiop-biz/src/main/resources/application-dev.properties
+3
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/listener/PlatformModifyPasswordistener.java
0 → 100644
View file @
b251d18d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
listener
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonAccount
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonAccountFed
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountFedMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.activemq.command.ActiveMQTextMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.jms.annotation.JmsListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
javax.jms.Message
;
@Component
@Slf4j
public
class
PlatformModifyPasswordistener
{
@Autowired
PersonAccountMapper
personAccountMapper
;
@Autowired
PersonAccountFedMapper
personAccountFedMapper
;
@Value
(
"${amos.secret.key}"
)
private
String
secretKey
;
@JmsListener
(
destination
=
"${modifypasswordqueue}"
)
public
void
reciveMesssage
(
Message
message
)
{
try
{
String
dadainfo
=
((
ActiveMQTextMessage
)
message
).
getText
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
dadainfo
);
jsonObject
=
(
JSONObject
)
jsonObject
.
get
(
"body"
);
jsonObject
=
(
JSONObject
)
jsonObject
.
get
(
"authData"
);
PersonAccount
personAccount
=
personAccountMapper
.
selectOne
(
new
QueryWrapper
<
PersonAccount
>().
eq
(
"puser_id"
,
jsonObject
.
get
(
"userId"
)));
if
(!
ObjectUtils
.
isEmpty
(
personAccount
))
{
personAccount
.
setPassword
((
String
)
jsonObject
.
get
(
"password"
));
personAccount
.
setSecondaryPassword
((
String
)
jsonObject
.
get
(
"rePassword"
));
personAccountMapper
.
updateById
(
personAccount
);
}
PersonAccountFed
personAccountFed
=
personAccountFedMapper
.
selectOne
(
new
QueryWrapper
<
PersonAccountFed
>().
eq
(
"puser_id"
,
jsonObject
.
get
(
"userId"
)));
if
(!
ObjectUtils
.
isEmpty
(
personAccount
))
{
personAccountFed
.
setPassword
((
String
)
jsonObject
.
get
(
"password"
));
personAccountFed
.
setSecondaryPassword
((
String
)
jsonObject
.
get
(
"rePassword"
));
personAccountFedMapper
.
updateById
(
personAccountFed
);
}
message
.
acknowledge
();
log
.
info
(
"--------------------消息消费成功 {}"
,
jsonObject
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/resources/application-dev.properties
View file @
b251d18d
...
...
@@ -80,8 +80,9 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://1
39.9.173.44
:61616
spring.activemq.broker-url
=
tcp://1
72.16.10.253
:61616
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
myqueue
=
amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
modifypasswordqueue
=
amos.privilege.v1.JXIOP.AMOS_ADMIN.modifyPassword
\ No newline at end of file
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