Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
easy-affair-show
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
赵啸非
easy-affair-show
Commits
b97a428d
Commit
b97a428d
authored
Aug 12, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list接口增加时间倒序;新增客户,手机号码唯一
parent
068a983a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerServiceImpl.java
...xhx/module/customer/service/impl/CustomerServiceImpl.java
+2
-6
No files found.
eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerServiceImpl.java
View file @
b97a428d
...
...
@@ -35,7 +35,8 @@ import java.util.List;
public
class
CustomerServiceImpl
extends
AbstractCRUDServiceImpl
<
CustomerDao
,
CustomerEntity
,
Long
>
implements
CustomerService
{
@Override
protected
void
validData
(
CustomerEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
CustomerEntity
entity
,
Context
context
)
throws
AppException
{
this
.
validData
(
entity
,
context
);
if
(
StringUtils
.
isEmpty
(
entity
.
getContactTelphone
())){
throw
new
AppException
(
"手机号不能为空"
);
}
...
...
@@ -45,11 +46,6 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
if
(!
PhoneUtil
.
isPhone
(
entity
.
getContactTelphone
())){
throw
new
AppException
(
"手机号码格式不正确"
);
}
}
@Override
protected
void
saveBefore
(
CustomerEntity
entity
,
Context
context
)
throws
AppException
{
this
.
validData
(
entity
,
context
);
CustomerEntity
query
=
new
CustomerEntity
();
query
.
setContactTelphone
(
entity
.
getContactTelphone
());
List
<
CustomerEntity
>
list
=
dao
.
getList
(
query
);
...
...
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