Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rop-dj-strategy
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 268d9afe
authored
Jan 28, 2026
by
林永健
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(dubbo): 添加SceneMerchantRefRemote远程调用支持
1 parent
60971b7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
src/main/java/cn/com/glsx/dj/strategy/config/dubbo/DubboConfig.java
src/main/java/cn/com/glsx/dj/strategy/controller/MerchantStaffController.java
src/main/java/cn/com/glsx/dj/strategy/config/dubbo/DubboConfig.java
View file @
268d9af
...
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.strategy.config.dubbo;
import
cn.com.glsx.dj.mindworkplate.remote.MonitoringRemote
;
import
cn.com.glsx.dj.peanalysis.remote.BusinessSceneAnalysisRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.SceneMerchantRefRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote
;
import
cn.com.glsx.dj.strategy.remote.StrategyInfoRemote
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
...
...
@@ -40,6 +41,11 @@ public class DubboConfig {
}
@Bean
public
SceneMerchantRefRemote
sceneMerchantRefRemote
()
{
return
factory
.
builder
(
SceneMerchantRefRemote
.
class
).
check
(
check
).
timeout
(
timeout
).
build
();
}
@Bean
public
BusinessSceneAnalysisRemote
businessSceneAnalysisRemote
()
{
return
factory
.
builder
(
BusinessSceneAnalysisRemote
.
class
).
check
(
check
).
timeout
(
timeout
).
version
(
"1.0.0"
).
build
();
}
...
...
src/main/java/cn/com/glsx/dj/strategy/controller/MerchantStaffController.java
View file @
268d9af
package
cn
.
com
.
glsx
.
dj
.
strategy
.
controller
;
import
cn.com.glsx.dj.smartcarlife.dto.MerchantListDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.StaffInfoDTO
;
import
cn.com.glsx.dj.smartcarlife.remote.SceneMerchantRefRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote
;
import
cn.com.glsx.dj.strategy.request.StrategyStaffRequest
;
import
cn.com.glsx.dj.strategy.uitl.CommonUtil
;
...
...
@@ -50,6 +52,9 @@ public class MerchantStaffController {
@Autowired
private
StaffInfoRemote
staffInfoRemote
;
@Autowired
private
SceneMerchantRefRemote
sceneMerchantRefRemote
;
@ApiOperation
(
"添加员工"
)
@ServiceMethod
(
method
=
"dj.api.strategy.merchant.staff.add"
,
needInSession
=
NeedInSessionType
.
NO
)
public
RopResponse
<
Boolean
>
addMerchantStaff
(
StrategyStaffRequest
request
)
{
...
...
@@ -104,17 +109,28 @@ public class MerchantStaffController {
staffRequest
.
setCreatedName
(
CommonUtil
.
getUserName
());
staffRequest
.
setStaffLabel
(
request
.
getStaffLabel
());
staffRequest
.
setStaffBusinessType
(
0
);
// 查询园区店
RpcResponse
<
MerchantListDTO
>
yqMerchantInfo
=
sceneMerchantRefRemote
.
getYqMerchantInfo
(
request
.
getMerchantId
(),
0
);
if
(
yqMerchantInfo
.
isFailed
()
||
yqMerchantInfo
.
getResult
()
==
null
)
{
log
.
error
(
"查询4s店关联的园区店失败,merchantId:{}, response:{}"
,
request
.
getMerchantId
(),
yqMerchantInfo
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"查询4s店关联的园区店失败"
);
}
Integer
merchantId
=
yqMerchantInfo
.
getResult
().
getMerchantId
();
log
.
info
(
"查询4s店关联的园区店成功,merchantId:{}"
,
merchantId
);
// 查询商户主键
RpcResponse
<
MerchantBaseInfoResponse
>
merchantRes
=
merchantRemote
.
findMerchantBaseInfo
(
request
.
getMerchantId
()
);
RpcResponse
<
MerchantBaseInfoResponse
>
merchantRes
=
merchantRemote
.
findMerchantBaseInfo
(
merchantId
);
if
(
merchantRes
.
isFailed
()
||
merchantRes
.
getResult
()
==
null
)
{
log
.
error
(
"查询商户信息失败,merchantId:{}, response:{}"
,
request
.
getMerchantId
()
,
merchantRes
);
log
.
error
(
"查询商户信息失败,merchantId:{}, response:{}"
,
merchantId
,
merchantRes
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"查询商户信息失败"
);
}
staffRequest
.
setMerchantId
(
merchantRes
.
getResult
().
getId
());
// 查找该门店的角色id
MerchantRoleRequest
roleQuery
=
new
MerchantRoleRequest
();
roleQuery
.
setMerchantNo
(
request
.
getMerchantId
()
);
roleQuery
.
setMerchantNo
(
merchantId
);
roleQuery
.
setRoleName
(
"驻店人员"
);
log
.
info
(
"查询角色列表参数:{}"
,
roleQuery
);
RpcResponse
<
List
<
MerchantRoleResponse
>>
roleListRes
=
merchantRoleRemote
.
getRoleListRemote
(
roleQuery
);
...
...
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