Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chuanshan_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
chuanshan_gov_platform
Commits
5d826e84
Commit
5d826e84
authored
Mar 14, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户同步任务bug修改
parent
888bd51f
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
615 additions
and
292 deletions
+615
-292
knowledge-base/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
...va/com/mortals/xhx/base/system/user/model/UserEntity.java
+303
-144
single-matter/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
...va/com/mortals/xhx/base/system/user/model/UserEntity.java
+303
-144
single-matter/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
...ls/xhx/base/system/user/service/impl/UserServiceImpl.java
+3
-2
single-matter/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
+6
-2
No files found.
knowledge-base/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
View file @
5d826e84
This diff is collapsed.
Click to expand it.
single-matter/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
View file @
5d826e84
This diff is collapsed.
Click to expand it.
single-matter/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
View file @
5d826e84
...
@@ -341,10 +341,11 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
...
@@ -341,10 +341,11 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
throw
new
AppException
(
"密码转换异常!"
,
e
);
throw
new
AppException
(
"密码转换异常!"
,
e
);
}
}
entity
.
setUserType
(
DataUtil
.
converStr2Int
(
phpPdu
.
getType
(),
1
));
entity
.
setUserType
(
DataUtil
.
converStr2Int
(
phpPdu
.
getType
(),
1
));
this
.
save
(
entity
);
dao
.
insert
(
entity
);
}
else
{
}
else
{
//更新
//更新
UserEntity
userEntity
=
new
UserEntity
();
UserEntity
userEntity
=
new
UserEntity
();
userEntity
.
setId
(
tempUser
.
getId
());
userEntity
.
setLoginName
(
phpPdu
.
getAccount
());
userEntity
.
setLoginName
(
phpPdu
.
getAccount
());
userEntity
.
setRealName
(
phpPdu
.
getUser_name
());
userEntity
.
setRealName
(
phpPdu
.
getUser_name
());
userEntity
.
setMobile
(
phpPdu
.
getMobile
());
userEntity
.
setMobile
(
phpPdu
.
getMobile
());
...
@@ -354,7 +355,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
...
@@ -354,7 +355,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
throw
new
AppException
(
"密码转换异常!"
,
e
);
throw
new
AppException
(
"密码转换异常!"
,
e
);
}
}
userEntity
.
setUserType
(
DataUtil
.
converStr2Int
(
phpPdu
.
getType
(),
1
));
userEntity
.
setUserType
(
DataUtil
.
converStr2Int
(
phpPdu
.
getType
(),
1
));
this
.
update
(
userEntity
);
dao
.
update
(
userEntity
);
}
}
}
}
}
}
...
...
single-matter/src/main/java/com/mortals/xhx/daemon/task/SyncUserTaskImpl.java
View file @
5d826e84
package
com.mortals.xhx.daemon.task
;
package
com.mortals.xhx.daemon.task
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -38,8 +40,9 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
...
@@ -38,8 +40,9 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
try
{
try
{
HashMap
<
String
,
String
>
paramsMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
paramsMap
=
new
HashMap
<>();
resp
=
HttpUtil
.
doGet
(
phpUrl
,
paramsMap
);
resp
=
HttpUtil
.
doGet
(
phpUrl
,
paramsMap
);
Rest
<
List
<
UserPhpPdu
>>
list
=
JSON
.
parseObject
(
resp
,
Rest
.
class
);
Rest
<
List
<
JSONObject
>>
list
=
JSON
.
parseObject
(
resp
,
Rest
.
class
);
userService
.
updateUserList
(
list
.
getData
());
List
<
UserPhpPdu
>
upp
=
JSONArray
.
parseArray
(
JSONObject
.
toJSONString
(
list
.
getData
()),
UserPhpPdu
.
class
);
userService
.
updateUserList
(
upp
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"同步用户发生异常"
,
e
);
log
.
error
(
"同步用户发生异常"
,
e
);
}
}
...
@@ -52,4 +55,5 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
...
@@ -52,4 +55,5 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
}
}
}
}
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