Commit cfafc35a by wangnb

账户体系获取账户类型下产品菜单功能树--think.wang

1 parent 62354e7a
......@@ -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
......
......@@ -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
......@@ -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());
}
/**
* 更新账户类型数据
*
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!