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
5167791c
Commit
5167791c
authored
May 29, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对人员管理中密码进行DES加密
parent
0fa71662
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
+21
-6
DesUtil.java
.../com/yeejoin/amos/boot/module/jxiop/api/util/DesUtil.java
+0
-0
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+14
-6
application-dev.properties
...e-jxiop-biz/src/main/resources/application-dev.properties
+7
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/util/DesUtil.java
0 → 100644
View file @
5167791c
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
5167791c
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.feign.privilege.util.DesUtil;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -53,6 +54,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
//人员教育信息
@Autowired
PersonSkillEducationServiceImpl
personSkillEducationService
;
@Value
(
"${amos.secret.key}"
)
String
secretKey
;
/**
* 分页查询
...
...
@@ -118,9 +121,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}
usd
.
setOrgRoleSeqs
(
map
);
//密码
usd
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
"qaz"
));
usd
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
secretKey
));
//二次密码
usd
.
setRePassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
"qaz"
));
usd
.
setRePassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
secretKey
));
//用户名
usd
.
setRealName
(
personAccount
.
getName
());
//账号
...
...
@@ -154,6 +157,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}
personAccount
.
setPuserId
(
agencyUserModel
.
getUserId
());
personAccount
.
setProjectName
(
companyModel
.
getCompanyName
());
personAccount
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
secretKey
));
personAccount
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
secretKey
));
this
.
personBasicMapper
.
updateById
(
personBasic
);
this
.
personAccountService
.
updateById
(
personAccount
);
}
...
...
@@ -205,9 +210,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}
usd
.
setOrgRoleSeqs
(
map
);
//密码
usd
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
"qaz"
));
usd
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
secretKey
));
//二次密码
usd
.
setRePassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
"qaz"
));
usd
.
setRePassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
secretKey
));
//用户名
usd
.
setRealName
(
personAccount
.
getName
());
//账号
...
...
@@ -242,6 +247,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
personBasic
.
setNativePlace
(
JSON
.
toJSONString
(
personUser
.
getNativePlace
()));
}
personAccount
.
setProjectName
(
companyModel
.
getCompanyName
());
personAccount
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getPassword
(),
secretKey
));
personAccount
.
setPassword
(
DesUtil
.
encode
(
personAccount
.
getSecondaryPassword
(),
secretKey
));
this
.
personBasicMapper
.
updateById
(
personBasic
);
personAccountService
.
updateById
(
personAccount
);
return
model
;
...
...
@@ -275,6 +282,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
//人员账号信息
PersonAccount
personAccount
=
personAccountService
.
getOne
(
wrapper4
);
personAccount
.
setPhoneNum
(
personBasic
.
getPhone
());
//对于密码进行解密
personAccount
.
setPassword
(
DesUtil
.
decode
(
personAccount
.
getPassword
(),
secretKey
));
personAccount
.
setSecondaryPassword
(
DesUtil
.
decode
(
personAccount
.
getSecondaryPassword
(),
secretKey
));
if
(
personBasic
.
getNativePlace
()
!=
null
)
{
personUser
.
setNativePlace
(
JSON
.
parseArray
(
personBasic
.
getNativePlace
(),
Integer
.
class
));
}
...
...
@@ -418,5 +428,4 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
return
page
;
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/resources/application-dev.properties
View file @
5167791c
...
...
@@ -72,3 +72,9 @@ spring.security.user.password=a1234560
fire-rescue
=
123
mybatis-plus.global-config.db-config.update-strategy
=
ignored
# user-amos setting : This value is the secretkey for person manage moudle accout password encryption.please don't change it!!!
amos.secret.key
=
qaz
# if your service can't be access ,you can use this setting , you need change ip as your.
#eureka.instance.prefer-ip-address=true
#
eureka.instance.ip-address
=
172.16.3.122
\ 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