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 cfafc35a
authored
Aug 06, 2021
by
wangnb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
账户体系获取账户类型下产品菜单功能树--think.wang
1 parent
62354e7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
8 deletions
src/main/java/cn/com/glsx/merchants/controller/MerchantAccountTypeController.java
src/main/java/cn/com/glsx/merchants/request/accounttype/AccountTypeSearchRequest.java
src/main/java/cn/com/glsx/merchants/service/MerchantAccountTypeService.java
src/main/java/cn/com/glsx/merchants/controller/MerchantAccountTypeController.java
View file @
cfafc35
...
...
@@ -2,6 +2,7 @@ package cn.com.glsx.merchants.controller;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.model.response.AccountProductTreeResponse
;
import
cn.com.glsx.merchants.request.accounttype.*
;
import
cn.com.glsx.merchants.response.AccountTypeResponse
;
import
cn.com.glsx.merchants.service.MerchantAccountTypeService
;
...
...
@@ -82,6 +83,23 @@ public class MerchantAccountTypeController {
}
/**
* 获取账户类型下产品菜单功能树
*
* @param request
* @return
*/
@ServiceMethod
(
method
=
"org.ore.api.accountType.getProductTreeList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"获取账户类型下产品菜单功能树"
)
public
RopResponse
<
List
<
AccountProductTreeResponse
>>
getProductTreeList
(
AccountTypeSearchRequest
request
)
{
try
{
return
RopResponse
.
success
(
accountTypeService
.
getProductTreeList
(
request
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantAccountTypeController__invoke__getById__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 根据id获取账户类型接口
*
* @param request
...
...
src/main/java/cn/com/glsx/merchants/request/accounttype/AccountTypeSearchRequest.java
View file @
cfafc35
...
...
@@ -4,13 +4,16 @@ import com.rop.AbstractRopRequest;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
@Data
public
class
AccountTypeSearchRequest
extends
AbstractRopRequest
{
@NotNull
@ApiModelProperty
(
notes
=
"id"
,
name
=
"id"
,
dataType
=
"Integer"
,
required
=
true
)
@ApiModelProperty
(
notes
=
"id"
,
name
=
"账户类型id"
,
dataType
=
"Integer"
)
private
Integer
id
;
@ApiModelProperty
(
notes
=
"merchantId"
,
name
=
"商户id"
,
dataType
=
"Integer"
)
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"accountLevel"
,
name
=
"accountLevel"
,
dataType
=
"Integer"
)
private
Integer
accountLevel
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/service/MerchantAccountTypeService.java
View file @
cfafc35
...
...
@@ -9,14 +9,12 @@ import cn.com.glsx.merchants.enums.CommonStatusEnum;
import
cn.com.glsx.merchants.model.request.AccountFunctionRelationRequest
;
import
cn.com.glsx.merchants.model.request.MerchantAccountTypeRequest
;
import
cn.com.glsx.merchants.model.response.AccountFunctionRelationResponse
;
import
cn.com.glsx.merchants.model.response.AccountProductTreeResponse
;
import
cn.com.glsx.merchants.model.response.MerchantAccountTypeResponse
;
import
cn.com.glsx.merchants.remote.MerchantAccountTypeRemote
;
import
cn.com.glsx.merchants.request.FunctionRequest
;
import
cn.com.glsx.merchants.request.ProductRequest
;
import
cn.com.glsx.merchants.request.accounttype.AccountTypeDeleteRequest
;
import
cn.com.glsx.merchants.request.accounttype.AccountTypeInsertRequest
;
import
cn.com.glsx.merchants.request.accounttype.AccountTypeListSearchRequest
;
import
cn.com.glsx.merchants.request.accounttype.AccountTypeUpdateRequest
;
import
cn.com.glsx.merchants.request.accounttype.*
;
import
cn.com.glsx.merchants.response.AccountTypeResponse
;
import
cn.com.glsx.merchants.response.ProductRelationResponse
;
import
cn.com.glsx.merchants.util.Pagination
;
...
...
@@ -143,6 +141,23 @@ public class MerchantAccountTypeService {
throw
new
RpcServiceException
(
response
.
getException
().
getErrId
(),
response
.
getMessage
());
}
/**
* 获取账户类型下产品菜单功能树
*
* @param request
* @return
*/
@SysLog
(
value
=
"获取账户类型下产品菜单功能树"
,
action
=
OperateType
.
QUERY
,
module
=
"账户类型管理"
)
public
List
<
AccountProductTreeResponse
>
getProductTreeList
(
AccountTypeSearchRequest
request
)
{
RpcResponse
<
List
<
AccountProductTreeResponse
>>
response
=
accountTypeRemote
.
getProductTreeListByTypeId
(
request
.
getId
(),
request
.
getAccountLevel
(),
request
.
getMerchantId
());
if
(
response
.
isSuccess
()){
return
response
.
getResult
();
}
throw
new
RpcServiceException
(
response
.
getException
().
getErrId
(),
response
.
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