Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
platform-merchants
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 c16e67e9
authored
Sep 28, 2026
by
叶立庆
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v5.8.6.2' into 'master'
上线合并 See merge request
!22
2 parents
2299e320
7c4b9021
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
156 additions
and
4 deletions
platform-merchants-api/pom.xml
platform-merchants-api/src/main/java/cn/com/glsx/merchants/remote/MerchantRemote.java
platform-merchants-container/pom.xml
platform-merchants-container/src/main/java/cn/com/glsx/merchants/config/SmartCarLifeDubboConfig.java
platform-merchants-container/src/main/java/cn/com/glsx/merchants/event/MerchantInfoEvent.java
platform-merchants-container/src/main/java/cn/com/glsx/merchants/event/MerchantInfoEventListener.java
platform-merchants-container/src/main/java/cn/com/glsx/merchants/mapper/MerchantMapper.java
platform-merchants-container/src/main/java/cn/com/glsx/merchants/remote/MerchantRemoteImpl.java
platform-merchants-container/src/main/java/cn/com/glsx/merchants/service/MerchantService.java
platform-merchants-container/src/main/resources/META-INF/orm/MerchantMapper.xml
platform-merchants-api/pom.xml
View file @
c16e67e
...
...
@@ -7,7 +7,7 @@
</parent>
<groupId>
cn.com.glsx.merchants
</groupId>
<artifactId>
platform-merchants-api
</artifactId>
<version>
5.8.
4
-SNAPSHOT
</version>
<version>
5.8.
6.2
-SNAPSHOT
</version>
<name>
platform-merchants-api
</name>
<properties>
<deploy.scanPackage>
cn.com.glsx.merchants.remote
</deploy.scanPackage>
...
...
platform-merchants-api/src/main/java/cn/com/glsx/merchants/remote/MerchantRemote.java
View file @
c16e67e
...
...
@@ -562,4 +562,9 @@ public interface MerchantRemote {
@ApiResponse
(
"门店/品牌/子品牌列表"
)
RpcResponse
<
RpcPagination
<
MerchantPageWithBrandDTO
>>
pageListMerchantWithBrand
(
@NotNull
RpcPagination
<
MerchantPageWithBrandDTO
>
pagination
);
@ApiMethod
(
"查询当天更新的商户名称"
)
@ApiResponse
(
"查询商户名称"
)
RpcResponse
<
List
<
MerchantRequest
>>
getMerchantNameByLastTime
();
}
platform-merchants-container/pom.xml
View file @
c16e67e
...
...
@@ -14,7 +14,7 @@
<dependency>
<groupId>
cn.com.glsx.merchants
</groupId>
<artifactId>
platform-merchants-api
</artifactId>
<version>
5.8.
4
-SNAPSHOT
</version>
<version>
5.8.
6.2
-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
...
...
@@ -134,8 +134,14 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
cn.com.glsx.dj
</groupId>
<artifactId>
rpc-dj-smartcarlife-api
</artifactId>
<version>
5.8.6.2-SNAPSHOT
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
...
...
platform-merchants-container/src/main/java/cn/com/glsx/merchants/config/SmartCarLifeDubboConfig.java
0 → 100644
View file @
c16e67e
package
cn
.
com
.
glsx
.
merchants
.
config
;
import
cn.com.glsx.dj.smartcarlife.remote.SyncMerchantInfoRemote
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* @author deployer name
* @version V1.0
* @Title: DubboConfig.java
* @Description: Dubbo服务注册配置
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public
class
SmartCarLifeDubboConfig
{
@Autowired
private
ReferenceBuilderFactory
factory
;
@Bean
public
SyncMerchantInfoRemote
getSyncMerchantInfoRemote
()
{
return
factory
.
builder
(
SyncMerchantInfoRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
}
platform-merchants-container/src/main/java/cn/com/glsx/merchants/event/MerchantInfoEvent.java
0 → 100644
View file @
c16e67e
package
cn
.
com
.
glsx
.
merchants
.
event
;
import
cn.com.glsx.merchants.entity.Merchant
;
import
org.springframework.context.ApplicationEvent
;
/**
* 门店基础信息事件
*
* @description: 商户更新后发布,携带门店基础信息
*/
public
class
MerchantInfoEvent
extends
ApplicationEvent
{
private
final
Merchant
merchant
;
public
MerchantInfoEvent
(
Object
source
,
Merchant
merchant
)
{
super
(
source
);
this
.
merchant
=
merchant
;
}
public
Merchant
getMerchant
()
{
return
merchant
;
}
}
platform-merchants-container/src/main/java/cn/com/glsx/merchants/event/MerchantInfoEventListener.java
0 → 100644
View file @
c16e67e
package
cn
.
com
.
glsx
.
merchants
.
event
;
import
cn.com.glsx.dj.smartcarlife.remote.SyncMerchantInfoRemote
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.merchants.entity.Merchant
;
import
cn.com.glsx.merchants.model.request.MerchantRequest
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
/**
* 门店基础信息事件消费
*/
@Slf4j
@Component
public
class
MerchantInfoEventListener
{
@Autowired
private
SyncMerchantInfoRemote
syncMerchantInfoRemote
;
@EventListener
public
void
onMerchantInfo
(
MerchantInfoEvent
event
)
{
Merchant
merchant
=
event
.
getMerchant
();
log
.
info
(
"收到门店基础信息事件: merchantNo={}, merchantName={}, merchantUuid={}"
,
merchant
.
getMerchantNo
(),
merchant
.
getMerchantName
(),
merchant
.
getMerchantUuid
());
MerchantRequest
request
=
new
MerchantRequest
();
request
.
setMerchantNo
(
merchant
.
getMerchantNo
());
request
.
setMerchantName
(
merchant
.
getMerchantName
());
request
.
setMerchantId
(
merchant
.
getMerchantNo
());
RpcResponse
<
Boolean
>
booleanRpcResponse
=
syncMerchantInfoRemote
.
updateMerchantName
(
request
);
if
(
booleanRpcResponse
.
isFailed
()
||
!
booleanRpcResponse
.
getResult
())
{
log
.
error
(
"更新DJ系统门店名称失败"
);
return
;
}
}
}
platform-merchants-container/src/main/java/cn/com/glsx/merchants/mapper/MerchantMapper.java
View file @
c16e67e
...
...
@@ -178,4 +178,7 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> {
List
<
Integer
>
pageListMerchantIds
(
RpcPagination
<
MerchantPageWithBrandDTO
>
pagination
);
List
<
MerchantPageWithBrandDTO
>
listMerchantWithBrandByMerchantIds
(
@Param
(
"merchantIds"
)
List
<
Integer
>
merchantIds
);
List
<
Merchant
>
getMerchantNameByLastTime
();
}
\ No newline at end of file
platform-merchants-container/src/main/java/cn/com/glsx/merchants/remote/MerchantRemoteImpl.java
View file @
c16e67e
...
...
@@ -962,6 +962,20 @@ public class MerchantRemoteImpl implements MerchantRemote {
}
/**
* 查询当天更新的商户名称
* @return
*/
@Override
public
RpcResponse
<
List
<
MerchantRequest
>>
getMerchantNameByLastTime
()
{
try
{
return
merchantService
.
getMerchantNameByLastTime
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
e
);
}
}
/**
* 查询商户名称
* @author yangwei
* @since 2026/1/23 16:49
...
...
platform-merchants-container/src/main/java/cn/com/glsx/merchants/service/MerchantService.java
View file @
c16e67e
...
...
@@ -19,6 +19,7 @@ import cn.com.glsx.merchants.dto.merchant.*;
import
cn.com.glsx.merchants.entity.*
;
import
cn.com.glsx.merchants.enums.*
;
import
cn.com.glsx.merchants.enums.beisen.AccountEventSyncBeiSenEnum
;
import
cn.com.glsx.merchants.event.MerchantInfoEvent
;
import
cn.com.glsx.merchants.kafka.producer.SynMerchantComponent
;
import
cn.com.glsx.merchants.listener.ImportMerchantListener
;
import
cn.com.glsx.merchants.mapper.MerchantMapper
;
...
...
@@ -55,12 +56,12 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.http.*
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestTemplate
;
import
tk.mybatis.mapper.entity.Example
;
...
...
@@ -114,6 +115,9 @@ public class MerchantService {
@Autowired
private
DataPermissionService
dataPermissionService
;
@Autowired
private
ApplicationEventPublisher
applicationEventPublisher
;
@Autowired
private
MerchantProductMenuService
merchantProductMenuService
;
...
...
@@ -285,6 +289,8 @@ public class MerchantService {
// 7.
MerchantLog
merchantLog
=
merchantLogService
.
buildMerchantLog
(
ModuleEnum
.
MERCHANT
.
getModelType
(),
MethodEnum
.
ADD_MERCHANT
.
getMethodType
(),
merchantId
+
""
,
"成功"
,
merchantRequest
);
merchantLogService
.
saveMerchantLog
(
merchantLog
);
// 发布门店基础信息事件
applicationEventPublisher
.
publishEvent
(
new
MerchantInfoEvent
(
this
,
merchant
));
return
merchantId
;
}
...
...
@@ -724,6 +730,10 @@ public class MerchantService {
// 发布商户同步
synMerchantComponent
.
sendKafkaMessageSynMerchant
(
merchant1
.
getMerchantNo
().
toString
());
// 发布门店基础信息事件
merchant
.
setMerchantNo
(
merchant1
.
getMerchantNo
());
merchant
.
setMerchantUuid
(
merchant1
.
getMerchantUuid
());
applicationEventPublisher
.
publishEvent
(
new
MerchantInfoEvent
(
this
,
merchant
));
return
merchant1
.
getMerchantUuid
();
}
...
...
@@ -3078,4 +3088,24 @@ public class MerchantService {
return
merchantList
;
}
public
RpcResponse
<
List
<
MerchantRequest
>>
getMerchantNameByLastTime
()
{
try
{
List
<
Merchant
>
list
=
merchantMapper
.
getMerchantNameByLastTime
();
if
(
list
==
null
||
list
.
isEmpty
())
{
return
RpcResponse
.
success
(
new
ArrayList
<>());
}
List
<
MerchantRequest
>
collect
=
list
.
stream
().
map
(
s
->
{
MerchantRequest
m
=
new
MerchantRequest
();
BeanUtils
.
copyProperties
(
s
,
m
);
m
.
setMerchantId
(
s
.
getMerchantNo
());
m
.
setMerchantNo
(
s
.
getMerchantNo
());
m
.
setMerchantName
(
s
.
getMerchantName
());
return
m
;
}).
collect
(
Collectors
.
toList
());
return
RpcResponse
.
success
(
collect
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RpcServiceException
(
e
.
getMessage
());
}
}
}
platform-merchants-container/src/main/resources/META-INF/orm/MerchantMapper.xml
View file @
c16e67e
...
...
@@ -1349,6 +1349,9 @@
</foreach>
ORDER BY s.merchantNo DESC
</select>
<select
id=
"getMerchantNameByLastTime"
resultMap=
"BaseResultMap"
>
SELECT * FROM `platform_merchant` WHERE DATE_FORMAT(updated_time,'%Y-%m-%d')=DATE_FORMAT(NOW(),'%Y-%m-%d') LIMIT 1000
</select>
</mapper>
\ No newline at end of file
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