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
7f205cc6
Commit
7f205cc6
authored
Apr 29, 2025
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复测试bug
parent
16bbdfad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
agent-manager/src/main/java/com/mortals/xhx/busiz/web/H5LoginController.java
...ain/java/com/mortals/xhx/busiz/web/H5LoginController.java
+3
-3
agent-manager/src/main/java/com/mortals/xhx/module/company/service/impl/CompanyServiceImpl.java
...s/xhx/module/company/service/impl/CompanyServiceImpl.java
+14
-9
No files found.
agent-manager/src/main/java/com/mortals/xhx/busiz/web/H5LoginController.java
View file @
7f205cc6
...
@@ -196,8 +196,8 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
...
@@ -196,8 +196,8 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
userEntity
.
setMobile
(
req
.
getPhone
());
userEntity
.
setMobile
(
req
.
getPhone
());
userEntity
.
setLoginPwd
(
SecurityUtil
.
md5DoubleEncoding
(
"123"
));
userEntity
.
setLoginPwd
(
SecurityUtil
.
md5DoubleEncoding
(
"123"
));
userEntity
.
setUserType
(
2
);
userEntity
.
setUserType
(
2
);
CompanyEntity
companyEntity
=
companyService
.
getCompanyByH5
(
req
);
//
CompanyEntity companyEntity = companyService.getCompanyByH5(req);
userEntity
.
setCompanyId
(
companyEntity
.
getId
());
//
userEntity.setCompanyId(companyEntity.getId());
userEntity
.
setRoleIds
(
"2"
);
userEntity
.
setRoleIds
(
"2"
);
userEntity
=
userService
.
save
(
userEntity
);
userEntity
=
userService
.
save
(
userEntity
);
}
else
{
}
else
{
...
@@ -213,7 +213,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
...
@@ -213,7 +213,7 @@ public class H5LoginController extends BaseCRUDJsonBodyMappingController<UserSer
&&
ObjectUtils
.
isEmpty
(
userEntity
.
getCompanyId
()))
{
&&
ObjectUtils
.
isEmpty
(
userEntity
.
getCompanyId
()))
{
//todo 当前用户存在 但是未绑定公司 可绑定
//todo 当前用户存在 但是未绑定公司 可绑定
CompanyEntity
companyEntity
=
companyService
.
getCompanyByH5
(
req
);
CompanyEntity
companyEntity
=
companyService
.
getCompanyByH5
(
req
);
userEntity
.
setCompanyId
(
companyEntity
.
getId
());
userEntity
.
setCompanyId
(
companyEntity
==
null
?
null
:
companyEntity
.
getId
());
userEntity
.
setRoleIds
(
"2"
);
userEntity
.
setRoleIds
(
"2"
);
userService
.
update
(
userEntity
);
userService
.
update
(
userEntity
);
}
}
...
...
agent-manager/src/main/java/com/mortals/xhx/module/company/service/impl/CompanyServiceImpl.java
View file @
7f205cc6
package
com.mortals.xhx.module.company.service.impl
;
package
com.mortals.xhx.module.company.service.impl
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.busiz.req.H5Req
;
import
com.mortals.xhx.busiz.req.H5Req
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.company.model.CompanyQuery
;
import
com.mortals.xhx.module.company.model.CompanyQuery
;
...
@@ -30,16 +31,20 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
...
@@ -30,16 +31,20 @@ public class CompanyServiceImpl extends AbstractCRUDServiceImpl<CompanyDao, Comp
@Override
@Override
public
CompanyEntity
getCompanyByH5
(
H5Req
req
)
{
public
CompanyEntity
getCompanyByH5
(
H5Req
req
)
{
CompanyEntity
companyEntity
=
this
.
selectOne
(
new
CompanyQuery
().
parkId
(
req
.
getParkId
()).
applyName
(
req
.
getApplyName
()).
phone
(
req
.
getPhone
()));
if
(
req
.
getParkId
()!=
null
&&
StringUtils
.
isNotEmpty
(
req
.
getApplyName
())
&&
StringUtils
.
isNotEmpty
(
req
.
getPhone
()))
{
if
(
ObjectUtils
.
isEmpty
(
companyEntity
)){
CompanyEntity
companyEntity
=
this
.
selectOne
(
new
CompanyQuery
().
parkId
(
req
.
getParkId
()).
applyName
(
req
.
getApplyName
()).
phone
(
req
.
getPhone
()));
companyEntity
=
new
CompanyEntity
();
if
(
ObjectUtils
.
isEmpty
(
companyEntity
))
{
companyEntity
.
initAttrValue
();
companyEntity
=
new
CompanyEntity
();
BeanUtils
.
copyProperties
(
req
,
companyEntity
,
BeanUtil
.
getNullPropertyNames
(
req
));
companyEntity
.
initAttrValue
();
companyEntity
.
setCreateTime
(
new
Date
());
BeanUtils
.
copyProperties
(
req
,
companyEntity
,
BeanUtil
.
getNullPropertyNames
(
req
));
companyEntity
.
setCreateUserId
(
1L
);
companyEntity
.
setCreateTime
(
new
Date
());
return
this
.
save
(
companyEntity
);
companyEntity
.
setCreateUserId
(
1L
);
return
this
.
save
(
companyEntity
);
}
else
{
return
companyEntity
;
}
}
else
{
}
else
{
return
companyEntity
;
return
null
;
}
}
}
}
}
}
\ 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