Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7fbffd95
authored
Mar 03, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工单标准接口-数据迁移
1 parent
e55a21d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
src/main/java/cn/com/glsx/stdinterface/modules/mapper/ZhongliAccountMapper.java
src/main/java/cn/com/glsx/stdinterface/modules/service/ZhongliVehicleService.java
src/main/resources/mapper/ZhongliAccountMapper.xml
src/main/java/cn/com/glsx/stdinterface/modules/mapper/ZhongliAccountMapper.java
View file @
7fbffd9
...
...
@@ -11,6 +11,8 @@ import java.util.List;
@Mapper
public
interface
ZhongliAccountMapper
extends
CommonBaseMapper
<
ZhongliAccount
>
{
int
updateZhongliAccountUserId
();
List
<
ZhongliAccountModel
>
selectByLevel
(
@Param
(
"level"
)
String
level
);
}
\ No newline at end of file
src/main/java/cn/com/glsx/stdinterface/modules/service/ZhongliVehicleService.java
View file @
7fbffd9
...
...
@@ -37,6 +37,9 @@ public class ZhongliVehicleService {
private
VehiclePermitMapper
vehiclePermitMapper
;
public
void
linkVehicle2Account
()
{
//更新用户id
zhongliAccountMapper
.
updateZhongliAccountUserId
();
List
<
ZhongliAccountModel
>
accountModelList
=
zhongliAccountMapper
.
selectByLevel
(
null
);
Map
<
String
,
ZhongliAccountModel
>
accountMap
=
accountModelList
.
stream
().
collect
(
Collectors
.
toMap
(
ZhongliAccountModel:
:
getAccount
,
v
->
v
));
...
...
src/main/resources/mapper/ZhongliAccountMapper.xml
View file @
7fbffd9
...
...
@@ -29,6 +29,12 @@
`type`, del_flag, created_date, created_by, updated_date, updated_by
</sql>
<update
id=
"updateZhongliAccountUserId"
>
update t_zhongli_account tza,t_user tu
set tza.created_by = tu.id
where tza.account = tu.account and tu.del_flag = 0
</update>
<select
id=
"selectByLevel"
resultType=
"cn.com.glsx.stdinterface.modules.model.ZhongliAccountModel"
>
select `level`, created_by userId, account, username, department, role_name roleName
from t_zhongli_account
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment