Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-smartcarlife
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9f4b5044
authored
Sep 28, 2026
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新dj_car_life_yq_merchant_info、dj_car_life_service_merchant、dj_car_life_scene_merchant_ref_new表中门店名称
1 parent
f1f4d776
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
3 deletions
rpc-dj-smartcarlife-api/pom.xml
rpc-dj-smartcarlife-api/src/main/java/cn/com/glsx/dj/smartcarlife/remote/SyncMerchantInfoRemote.java
rpc-dj-smartcarlife/pom.xml
rpc-dj-smartcarlife/src/main/java/cn/com/glsx/dj/smartcarlife/remote/SyncMerchantInfoRemoteImpl.java
rpc-dj-smartcarlife/src/main/java/cn/com/glsx/dj/smartcarlife/service/merchant/SyncMerchantInformationService.java
rpc-dj-smartcarlife-api/pom.xml
View file @
9f4b504
...
...
@@ -12,7 +12,7 @@
<name>
rpc-dj-smartcarlife-api
</name>
<properties>
<deploy.scanPackage>
cn.com.glsx.dj.smartcarlife.remote
</deploy.scanPackage>
<smartcarlife.api.version>
5.8.
4
-SNAPSHOT
</smartcarlife.api.version>
<smartcarlife.api.version>
5.8.
6.2
-SNAPSHOT
</smartcarlife.api.version>
<shopamll.api.version>
5.6.4-SNAPSHOT
</shopamll.api.version>
</properties>
<dependencies>
...
...
rpc-dj-smartcarlife-api/src/main/java/cn/com/glsx/dj/smartcarlife/remote/SyncMerchantInfoRemote.java
0 → 100644
View file @
9f4b504
package
cn
.
com
.
glsx
.
dj
.
smartcarlife
.
remote
;
import
cn.com.glsx.dj.smartcarlife.dto.merchant.MerchantDetailBatchQueryDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchant.MerchantDetailQueryDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchant.MerchantDetailResponseDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchant.MerchantEditDTO
;
import
cn.com.glsx.dj.smartcarlife.model.SceneMerchantRefUpd
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
import
cn.com.glsx.framework.core.annotation.ApiResponse
;
import
cn.com.glsx.framework.core.annotation.ApiService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.merchants.model.request.MerchantRequest
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
* 商户门店信息同步服务接口
*
* @author yelq
* @since 2026-09-24
*/
@ApiService
(
value
=
"商户门店信息同步服务接口"
,
owner
=
"yelq"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
public
interface
SyncMerchantInfoRemote
{
/**
* 同步门店名称
*
*/
@ApiMethod
(
"同步门店名称"
)
@ApiParam
(
name
=
"merchantRequest"
,
notes
=
"更新参数"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"是否成功"
)
RpcResponse
<
Boolean
>
updateMerchantName
(
@NotNull
MerchantRequest
merchantRequest
);
}
\ No newline at end of file
rpc-dj-smartcarlife/pom.xml
View file @
9f4b504
...
...
@@ -16,7 +16,7 @@
<skipTests>
true
</skipTests>
<shopmall.api.version>
5.8.2-SNAPSHOT
</shopmall.api.version>
<stoassistant.api.version>
5.6.4-SNAPSHOT
</stoassistant.api.version>
<smartcarlife.api.version>
5.8.
4
-SNAPSHOT
</smartcarlife.api.version>
<smartcarlife.api.version>
5.8.
6.2
-SNAPSHOT
</smartcarlife.api.version>
<sale.api.version>
5.8.4-SNAPSHOT
</sale.api.version>
<mindworkplate.api.version>
5.8.3-SNAPSHOT
</mindworkplate.api.version>
</properties>
...
...
@@ -34,7 +34,7 @@
<dependency>
<groupId>
cn.com.glsx.merchants
</groupId>
<artifactId>
platform-merchants-api
</artifactId>
<version>
5.8.
0
-SNAPSHOT
</version>
<version>
5.8.
4
-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.com.glsx
</groupId>
...
...
rpc-dj-smartcarlife/src/main/java/cn/com/glsx/dj/smartcarlife/remote/SyncMerchantInfoRemoteImpl.java
0 → 100644
View file @
9f4b504
package
cn
.
com
.
glsx
.
dj
.
smartcarlife
.
remote
;
import
cn.com.glsx.dj.smartcarlife.service.merchant.SyncMerchantInformationService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.merchants.model.request.MerchantRequest
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* 商户门店信息同步服务接口
*/
@Slf4j
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
public
class
SyncMerchantInfoRemoteImpl
implements
SyncMerchantInfoRemote
{
@Autowired
private
SyncMerchantInformationService
syncMerchantInformationService
;
/**
* 同步门店名称
*
* @param merchantRequest
* @return
*/
@Override
public
RpcResponse
<
Boolean
>
updateMerchantName
(
MerchantRequest
merchantRequest
)
{
Boolean
b
=
syncMerchantInformationService
.
updateMerchantName
(
merchantRequest
);
if
(
b
)
return
RpcResponse
.
success
(
b
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
"同步门店名称更新失败!"
);
}
}
rpc-dj-smartcarlife/src/main/java/cn/com/glsx/dj/smartcarlife/service/merchant/SyncMerchantInformationService.java
0 → 100644
View file @
9f4b504
package
cn
.
com
.
glsx
.
dj
.
smartcarlife
.
service
.
merchant
;
import
cn.com.glsx.dj.smartcarlife.mapper.SceneMerchantRefNewMapper
;
import
cn.com.glsx.dj.smartcarlife.mapper.ServiceMerchantMapper
;
import
cn.com.glsx.dj.smartcarlife.mapper.YqMerchantInfoMapper
;
import
cn.com.glsx.dj.smartcarlife.model.SceneMerchantRefNew
;
import
cn.com.glsx.dj.smartcarlife.model.ServiceMerchant
;
import
cn.com.glsx.dj.smartcarlife.model.YqMerchantInfo
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.model.request.MerchantRequest
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Date
;
/**
* 门店信息同步
*/
@Slf4j
@Service
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
rollbackFor
=
RpcServiceException
.
class
)
public
class
SyncMerchantInformationService
{
@Autowired
private
YqMerchantInfoMapper
yqMerchantInfoMapper
;
@Autowired
private
ServiceMerchantMapper
serviceMerchantMapper
;
@Autowired
private
SceneMerchantRefNewMapper
sceneMerchantRefNewMapper
;
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
RpcServiceException
.
class
)
public
Boolean
updateMerchantName
(
MerchantRequest
merchantRequest
)
{
log
.
info
(
"门店信息:{}"
,
JSON
.
toJSONString
(
merchantRequest
));
if
(
merchantRequest
==
null
||
merchantRequest
.
getMerchantNo
()
==
null
||
merchantRequest
.
getMerchantName
()
==
null
)
{
log
.
error
(
"门店信息不全,无法更新!!"
);
return
false
;
}
try
{
// 更新园区店名称
YqMerchantInfo
updateYq
=
new
YqMerchantInfo
();
updateYq
.
setUpdatedDate
(
new
Date
());
updateYq
.
setUpdatedBy
(
"system"
);
updateYq
.
setMerchantName
(
merchantRequest
.
getMerchantName
());
Example
exyq
=
new
Example
(
YqMerchantInfo
.
class
);
exyq
.
createCriteria
().
andEqualTo
(
"merchantId"
,
merchantRequest
.
getMerchantNo
());
yqMerchantInfoMapper
.
updateByExampleSelective
(
updateYq
,
exyq
);
// 更新服务门店名称
ServiceMerchant
updateService
=
new
ServiceMerchant
();
updateService
.
setUpdatedDate
(
new
Date
());
updateService
.
setUpdatedBy
(
"system"
);
updateService
.
setMerchantName
(
merchantRequest
.
getMerchantName
());
Example
exService
=
new
Example
(
ServiceMerchant
.
class
);
exService
.
createCriteria
().
andEqualTo
(
"merchantId"
,
merchantRequest
.
getMerchantNo
());
serviceMerchantMapper
.
updateByExampleSelective
(
updateService
,
exService
);
// 更新场景门店名称,主关联
SceneMerchantRefNew
updateScene
=
new
SceneMerchantRefNew
();
updateScene
.
setUpdatedDate
(
new
Date
());
updateScene
.
setUpdatedBy
(
"system"
);
updateScene
.
setMainMerchantName
(
merchantRequest
.
getMerchantName
());
Example
exScene
=
new
Example
(
SceneMerchantRefNew
.
class
);
exScene
.
createCriteria
().
andEqualTo
(
"mainMerchantId"
,
merchantRequest
.
getMerchantNo
());
sceneMerchantRefNewMapper
.
updateByExampleSelective
(
updateScene
,
exScene
);
// 更新场景门店名称,子关联
SceneMerchantRefNew
updateScene1
=
new
SceneMerchantRefNew
();
updateScene1
.
setUpdatedDate
(
new
Date
());
updateScene1
.
setUpdatedBy
(
"system"
);
updateScene1
.
setSubMerchantName
(
merchantRequest
.
getMerchantName
());
Example
exScene1
=
new
Example
(
SceneMerchantRefNew
.
class
);
exScene
.
createCriteria
().
andEqualTo
(
"subMerchantId"
,
merchantRequest
.
getMerchantNo
());
sceneMerchantRefNewMapper
.
updateByExampleSelective
(
updateScene1
,
exScene1
);
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
false
;
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment