Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agent-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
赵啸非
agent-platform
Commits
e264acba
Commit
e264acba
authored
Apr 28, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3dd3e35f
766c14a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
agent-manager/src/main/java/com/mortals/xhx/busiz/web/H5LoginController.java
...ain/java/com/mortals/xhx/busiz/web/H5LoginController.java
+25
-4
No files found.
agent-manager/src/main/java/com/mortals/xhx/busiz/web/H5LoginController.java
View file @
e264acba
...
...
@@ -117,9 +117,23 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
userQuery
.
setOpenId
(
req
.
getOpenId
());
userEntity
=
userService
.
selectOne
(
userQuery
);
if
(
ObjectUtils
.
isEmpty
(
userEntity
))
{
throw
new
AppException
(
"不存在当前匹配的关联用户!openId:"
+
req
.
getOpenId
());
//throw new AppException("不存在当前匹配的关联用户!openId:" + req.getOpenId());
userEntity
=
new
UserEntity
();
userEntity
.
initAttrValue
();
userEntity
.
setOpenId
(
req
.
getOpenId
());
userEntity
.
setRealName
(
req
.
getUserName
());
userEntity
.
setLoginName
(
req
.
getOpenId
());
// userEntity.setPhone(req.getPhone());
// userEntity.setMobile(req.getPhone());
userEntity
.
setLoginPwd
(
SecurityUtil
.
md5DoubleEncoding
(
"123"
));
userEntity
.
setUserType
(
2
);
userEntity
=
userService
.
save
(
userEntity
);
}
if
(
userEntity
.
getCompanyId
()!=
null
){
CompanyEntity
companyEntity
=
companyService
.
get
(
userEntity
.
getCompanyId
());
data
.
put
(
"parkId"
,
companyEntity
.
getParkId
());
data
.
put
(
"parkName"
,
companyEntity
.
getParkName
());
}
data
.
put
(
"id"
,
userEntity
.
getId
());
data
.
put
(
"staffId"
,
userEntity
.
getCustomerId
());
...
...
@@ -184,6 +198,10 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
CompanyEntity
companyEntity
=
companyService
.
getCompanyByH5
(
req
);
userEntity
.
setCompanyId
(
companyEntity
.
getId
());
userEntity
=
userService
.
save
(
userEntity
);
}
else
{
userEntity
.
setPhone
(
req
.
getPhone
());
userEntity
.
setMobile
(
req
.
getPhone
());
userService
.
update
(
userEntity
);
}
if
(!
ObjectUtils
.
isEmpty
(
userEntity
)
...
...
@@ -197,9 +215,12 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
userEntity
.
setCompanyId
(
companyEntity
.
getId
());
}
//当前用户绑定公司 用户名可与phone绑定
JSONObject
data
=
new
JSONObject
();
if
(
userEntity
.
getCompanyId
()!=
null
){
CompanyEntity
companyEntity
=
companyService
.
get
(
userEntity
.
getCompanyId
());
data
.
put
(
"parkId"
,
companyEntity
.
getParkId
());
data
.
put
(
"parkName"
,
companyEntity
.
getParkName
());
}
data
.
put
(
"id"
,
userEntity
.
getId
());
data
.
put
(
"userType"
,
userEntity
.
getUserType
());
userEntity
.
setLoginTime
(
System
.
currentTimeMillis
());
...
...
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