Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms_api
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
高宇
wms_api
Commits
de29c57c
Commit
de29c57c
authored
Dec 23, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改客户验重
parent
16da0210
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
CustInfoRepository.java
...java/org/rcisoft/bus/custinfo/dao/CustInfoRepository.java
+2
-0
CustInfoServiceImpl.java
...cisoft/bus/custinfo/service/impl/CustInfoServiceImpl.java
+13
-0
CustInfoMapper.xml
src/main/resources/mapper/bus/custInfo/CustInfoMapper.xml
+6
-0
No files found.
src/main/java/org/rcisoft/bus/custinfo/dao/CustInfoRepository.java
View file @
de29c57c
...
...
@@ -22,5 +22,7 @@ public interface CustInfoRepository extends CyBaseMapper<CustInfo> {
*
*/
IPage
<
CustInfo
>
queryCustInfosPaged
(
CyPageInfo
cyPageInfo
,
@Param
(
"entity"
)
CustInfo
custInfo
);
CustInfo
selectByCustomerTelephone
(
String
customerTelephone
);
}
src/main/java/org/rcisoft/bus/custinfo/service/impl/CustInfoServiceImpl.java
View file @
de29c57c
...
...
@@ -3,6 +3,8 @@ package org.rcisoft.bus.custinfo.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.rcisoft.bean.AdminProperties
;
import
org.rcisoft.bus.wmsgoodsprice.entity.WmsGoodsPrice
;
import
org.rcisoft.core.exception.CyServiceException
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.bus.custinfo.dao.CustInfoRepository
;
...
...
@@ -45,6 +47,11 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoRepository,CustInfo
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
CustInfo
custInfo
){
CustInfo
existingRecord
=
baseMapper
.
selectByCustomerTelephone
(
custInfo
.
getCustomerTelephone
());
if
(
existingRecord
!=
null
)
{
throw
new
CyServiceException
(
1001
,
"电话号码已存在"
);
}
//增加操作
custInfo
.
setStoreId
(
CyUserUtil
.
getAuthenDept
());
int
line
=
baseMapper
.
insert
(
custInfo
);
...
...
@@ -90,6 +97,12 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoRepository,CustInfo
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
merge
(
CustInfo
custInfo
){
CustInfo
existingRecord
=
baseMapper
.
selectByCustomerTelephone
(
custInfo
.
getCustomerTelephone
());
if
(
existingRecord
!=
null
&&
!
existingRecord
.
getBusinessId
().
equals
(
custInfo
.
getBusinessId
()))
{
throw
new
CyServiceException
(
1001
,
"电话号码已存在"
);
}
int
line
=
baseMapper
.
updateById
(
custInfo
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
custInfo
.
getBusinessId
()+
"的客户信息表信息"
);
return
new
CyPersistModel
(
line
);
...
...
src/main/resources/mapper/bus/custInfo/CustInfoMapper.xml
View file @
de29c57c
...
...
@@ -117,4 +117,10 @@
</if>
ORDER BY cio.business_id DESC
</select>
<select
id=
"selectByCustomerTelephone"
resultType=
"org.rcisoft.bus.custinfo.entity.CustInfo"
>
select * from cust_info
where 1=1
and cust_info.del_flag = '0'
and customer_telephone = #{customerTelephone}
</select>
</mapper>
\ 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