Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
4a451b7c
Commit
4a451b7c
authored
Dec 30, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保洁添加昵称没有的问题
parent
b28415d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+8
-0
No files found.
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
4a451b7c
...
...
@@ -9,6 +9,7 @@ import cn.hutool.core.collection.ListUtil;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -78,6 +79,12 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
@Override
public
int
insertSConsumer
(
SConsumer
sConsumer
)
{
QueryWrapper
<
SConsumer
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"phone"
,
sConsumer
.
getPhone
());
SConsumer
consumer
=
baseMapper
.
selectOne
(
queryWrapper
);
if
(
ObjectUtil
.
isNotEmpty
(
consumer
))
{
throw
new
BaseException
(
"该手机号已注册"
);
}
sConsumer
.
setAccount
(
sConsumer
.
getPhone
());
return
baseMapper
.
insertSConsumer
(
sConsumer
);
}
...
...
@@ -240,6 +247,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
// 存在用户设置未保洁人员,不存在新增保洁人员
if
(
list
.
size
()
>
0
)
{
SConsumer
consumer
=
list
.
get
(
0
);
consumer
.
setNickName
(
sConsumer
.
getNickName
());
consumer
.
setRoleType
(
RoleTypeEnum
.
CLEANER
.
getCode
());
return
baseMapper
.
updateSConsumer
(
consumer
);
}
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