Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
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 e63d1923
authored
Jul 31, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码修改
1 parent
55af418e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
0 deletions
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffListRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffPageRequest.java
src/main/java/cn/com/glsx/merchants/response/MerchantProTreeRopResponse.java
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
View file @
e63d192
...
...
@@ -217,4 +217,21 @@ public class MerchantController {
}
}
/**
* 查询上下级商户详情
*
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.menu.findSubordinateRelationship"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询上下级商户详情"
)
public
RopResponse
<
MerchantRopResponse
>
findSubordinateRelationship
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
MerchantRopResponse
merchantRopResponse
=
merchantService
.
findSubordinateRelationship
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantRopResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMenuController__invoke__findSubordinateRelationship__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffListRequest.java
View file @
e63d192
...
...
@@ -18,4 +18,10 @@ public class StaffListRequest extends AbstractRopRequest {
*/
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
merchantId
;
/**
* 商户id
*/
@ApiModelProperty
(
notes
=
"关键字"
)
private
String
keyword
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffPageRequest.java
View file @
e63d192
...
...
@@ -22,6 +22,9 @@ public class StaffPageRequest extends DefaultRequest {
@ApiModelProperty
(
notes
=
"员工姓名"
)
private
String
staffName
;
@ApiModelProperty
(
notes
=
"员工手机号"
)
private
String
staffPhone
;
@ApiModelProperty
(
notes
=
"创建人"
)
private
String
createdName
;
...
...
src/main/java/cn/com/glsx/merchants/response/MerchantProTreeRopResponse.java
View file @
e63d192
...
...
@@ -2,6 +2,7 @@ package cn.com.glsx.merchants.response;
import
cn.com.glsx.merchants.model.response.MerchantProTreeResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -15,13 +16,23 @@ import java.util.List;
@Api
(
"菜单功能树"
)
public
class
MerchantProTreeRopResponse
{
@ApiModelProperty
(
name
=
"id"
,
notes
=
"节点id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
name
=
"label"
,
notes
=
"节点名称"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
label
;
@ApiModelProperty
(
name
=
"value"
,
notes
=
"节点值"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
value
;
@ApiModelProperty
(
name
=
"value"
,
notes
=
"节点标识"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
logo
;
@ApiModelProperty
(
name
=
"parentId"
,
notes
=
"父id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Integer
parentId
;
@ApiModelProperty
(
name
=
"parentId"
,
notes
=
"爷id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Integer
superParentId
;
private
List
<
MerchantProTreeResponse
>
children
;
}
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
View file @
e63d192
...
...
@@ -197,6 +197,18 @@ public class MerchantRopResponse {
private
Integer
effectiveTime
;
/**
* 门店数量
*/
@ApiModelProperty
(
name
=
"numberOfStores"
,
notes
=
"门店数量"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Long
numberOfStores
;
/**
* 子商户数量
*/
@ApiModelProperty
(
name
=
"numberOfSubMerchants"
,
notes
=
"子商户数量"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Long
numberOfSubMerchants
;
/**
* 关联关系
*/
private
List
<
AccountTypeTreeRopResponse
>
accountTypes
;
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
View file @
e63d192
...
...
@@ -185,4 +185,17 @@ public class MerchantService {
}
throw
new
RpcServiceException
(
allMerchantRemote
.
getException
().
getErrId
(),
allMerchantRemote
.
getMessage
());
}
/**
* 查询上下级商户
*
* @return
*/
public
MerchantRopResponse
findSubordinateRelationship
(
MerchantDetailRequest
merchantDetailRequest
)
{
RpcResponse
<
MerchantResponse
>
allMerchantRemote
=
merchantRemote
.
findSubordinateRelationshipRemote
(
ConvertRequest
.
convertRequest
(
merchantDetailRequest
,
new
MerchantRequest
()));
if
(
allMerchantRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertObject
(
allMerchantRemote
.
getResult
(),
MerchantRopResponse
.
class
);
}
throw
new
RpcServiceException
(
allMerchantRemote
.
getException
().
getErrId
(),
allMerchantRemote
.
getMessage
());
}
}
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