Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
f6425a20
Commit
f6425a20
authored
Dec 18, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改客户管理
parent
5a7e79b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
AppStaffUserBiz.java
...om/github/wxiaoqi/security/admin/biz/AppStaffUserBiz.java
+23
-17
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppStaffUserBiz.java
View file @
f6425a20
...
@@ -54,26 +54,35 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
...
@@ -54,26 +54,35 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
criteria
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"isDel"
,
0
);
if
(
appStaffUser
.
getId
()
!=
null
)
{
if
(
appStaffUser
.
getId
()
!=
null
)
{
criteria
.
andEqualTo
(
"id"
,
appStaffUser
.
getId
());
criteria
.
andEqualTo
(
"id"
,
appStaffUser
.
getId
());
return
mapper
.
selectOneByExample
(
example
);
}
}
if
(
appStaffUser
.
getPhone
()
!=
null
)
{
if
(
appStaffUser
.
getPhone
()
!=
null
)
{
criteria
.
andEqualTo
(
"phone"
,
appStaffUser
.
getPhone
());
criteria
.
andEqualTo
(
"phone"
,
appStaffUser
.
getPhone
());
List
<
AppStaffUser
>
appStaffUsers
=
mapper
.
selectByExample
(
example
);
if
(
CollectionUtil
.
isNotEmpty
(
appStaffUsers
))
{
AppStaffUser
staffUser
=
appStaffUsers
.
get
(
0
);
AppStaffUserVo
appStaffUserVo
=
new
AppStaffUserVo
();
BeanUtils
.
copyProperties
(
staffUser
,
appStaffUserVo
);
Integer
suId
=
staffUser
.
getSuId
();
AppUserVo
userInfoById
=
appUserDetailBiz
.
getUserInfoById
(
suId
);
appStaffUserVo
.
setEmployeeName
(
userInfoById
.
getRealname
());
appStaffUserVo
.
setEmployeePhone
(
userInfoById
.
getUsername
());
return
appStaffUserVo
;
}
}
}
return
null
;
List
<
AppStaffUser
>
appStaffUsers
=
mapper
.
selectByExample
(
example
);
if
(
CollectionUtil
.
isNotEmpty
(
appStaffUsers
))
{
AppStaffUser
staffUser
=
appStaffUsers
.
get
(
0
);
AppStaffUserVo
appStaffUserVo
=
new
AppStaffUserVo
();
BeanUtils
.
copyProperties
(
staffUser
,
appStaffUserVo
);
Integer
suId
=
staffUser
.
getSuId
();
//上级员工信息
if
(
suId
!=
null
||
suId
!=
0
||
appStaffUser
.
getPhone
()!=
null
){
AppUserVo
spuser
=
appUserDetailBiz
.
getUserInfoById
(
suId
);
appStaffUserVo
.
setEmployeeName
(
spuser
.
getRealname
());
appStaffUserVo
.
setEmployeePhone
(
spuser
.
getUsername
());
}
//客户信息
Integer
uid
=
staffUser
.
getUid
();
if
(
uid
!=
null
||
uid
!=
0
){
AppUserVo
user
=
appUserDetailBiz
.
getUserInfoById
(
uid
);
appStaffUserVo
.
setUName
(
StringUtil
.
isEmpty
(
user
.
getRealname
())?
user
.
getNickname
():
user
.
getRealname
());
appStaffUserVo
.
setPhone
(
user
.
getUsername
());
}
return
appStaffUserVo
;
}
return
null
;
}
}
public
boolean
select
(
AppStaffUser
appStaffUser
)
{
public
boolean
select
(
AppStaffUser
appStaffUser
)
{
...
@@ -115,9 +124,6 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
...
@@ -115,9 +124,6 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
appStaffUser
.
setPhone
(
userInfoById
.
getUsername
());
appStaffUser
.
setPhone
(
userInfoById
.
getUsername
());
appStaffUser
.
setStatus
(
1
);
appStaffUser
.
setStatus
(
1
);
if
(
POSITION_ID
.
equals
(
staffUserDTO
.
getPositionId
()))
{
throw
new
BaseException
(
"绑定的是员工"
);
}
if
(
select
(
appStaffUser
))
{
if
(
select
(
appStaffUser
))
{
insertSelective
(
appStaffUser
);
insertSelective
(
appStaffUser
);
}
else
{
}
else
{
...
...
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