Commit 50e92f08 by wangnb

账户体系账户类型、角色管理列表返回值调整--think.wang

1 parent ef348ecc
...@@ -2,7 +2,6 @@ package cn.com.glsx.merchants.controller; ...@@ -2,7 +2,6 @@ package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse; import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.response.MerchantAccountTypeResponse;
import cn.com.glsx.merchants.request.accounttype.*; import cn.com.glsx.merchants.request.accounttype.*;
import cn.com.glsx.merchants.response.AccountTypeResponse; import cn.com.glsx.merchants.response.AccountTypeResponse;
import cn.com.glsx.merchants.service.MerchantAccountTypeService; import cn.com.glsx.merchants.service.MerchantAccountTypeService;
...@@ -44,7 +43,7 @@ public class MerchantAccountTypeController { ...@@ -44,7 +43,7 @@ public class MerchantAccountTypeController {
*/ */
@ServiceMethod(method = "org.ore.api.accountType.list", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "org.ore.api.accountType.list", needInSession = NeedInSessionType.YES)
@ApiOperation("账户类型获取列表接口") @ApiOperation("账户类型获取列表接口")
public RopResponse<List<MerchantAccountTypeResponse>> getAccountTypeList(AccountTypeListSearchRequest request) { public RopResponse<List<AccountTypeResponse>> getAccountTypeList(AccountTypeListSearchRequest request) {
try { try {
return RopResponse.success(accountTypeService.getAccountTypeList(request)); return RopResponse.success(accountTypeService.getAccountTypeList(request));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
...@@ -61,7 +60,7 @@ public class MerchantAccountTypeController { ...@@ -61,7 +60,7 @@ public class MerchantAccountTypeController {
*/ */
@ServiceMethod(method = "org.ore.api.accountType.page", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "org.ore.api.accountType.page", needInSession = NeedInSessionType.YES)
@ApiOperation("账户类型获取分页数据接口") @ApiOperation("账户类型获取分页数据接口")
public RopResponse<Pagination<MerchantAccountTypeResponse>> getAccountTypePage(AccountTypeListSearchRequest request) { public RopResponse<Pagination<AccountTypeResponse>> getAccountTypePage(AccountTypeListSearchRequest request) {
try { try {
return RopResponse.success(accountTypeService.getAccountTypePage(request)); return RopResponse.success(accountTypeService.getAccountTypePage(request));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
......
...@@ -48,7 +48,7 @@ public class MerchantRoleController { ...@@ -48,7 +48,7 @@ public class MerchantRoleController {
*/ */
@ServiceMethod(method = "org.ore.api.role.list", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "org.ore.api.role.list", needInSession = NeedInSessionType.YES)
@ApiOperation("角色管理获取列表接口") @ApiOperation("角色管理获取列表接口")
public RopResponse<List<MerchantRoleResponse>> getRoleList(RoleListSearchRequest request) { public RopResponse<List<RoleResponse>> getRoleList(RoleListSearchRequest request) {
try { try {
return RopResponse.success(roleService.getRoleList(request)); return RopResponse.success(roleService.getRoleList(request));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
...@@ -65,7 +65,7 @@ public class MerchantRoleController { ...@@ -65,7 +65,7 @@ public class MerchantRoleController {
*/ */
@ServiceMethod(method = "org.ore.api.role.page", needInSession = NeedInSessionType.YES) @ServiceMethod(method = "org.ore.api.role.page", needInSession = NeedInSessionType.YES)
@ApiOperation("角色管理获取分页数据接口") @ApiOperation("角色管理获取分页数据接口")
public RopResponse<Pagination<MerchantRoleResponse>> getRolePage(RoleListSearchRequest request) { public RopResponse<Pagination<RoleResponse>> getRolePage(RoleListSearchRequest request) {
try { try {
return RopResponse.success(roleService.getRolePage(request)); return RopResponse.success(roleService.getRolePage(request));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
......
...@@ -71,13 +71,13 @@ public class MerchantAccountTypeService { ...@@ -71,13 +71,13 @@ public class MerchantAccountTypeService {
* @param request * @param request
* @return * @return
*/ */
public Pagination<MerchantAccountTypeResponse> getAccountTypePage(AccountTypeListSearchRequest request) { public Pagination<AccountTypeResponse> getAccountTypePage(AccountTypeListSearchRequest request) {
RpcPagination<MerchantAccountTypeRequest> pagination = RpcPagination<MerchantAccountTypeRequest> pagination =
ConvertRequest.convertPage(request, new MerchantAccountTypeRequest()); ConvertRequest.convertPage(request, new MerchantAccountTypeRequest());
RpcResponse<RpcPagination<MerchantAccountTypeResponse>> response = RpcResponse<RpcPagination<MerchantAccountTypeResponse>> response =
accountTypeRemote.getAccountTypePageRemote(pagination); accountTypeRemote.getAccountTypePageRemote(pagination);
if(response.isSuccess()){ if(response.isSuccess()){
return ConvertResponse.convertPage(response.getResult(), MerchantAccountTypeResponse.class); return ConvertResponse.convertPage(response.getResult(), AccountTypeResponse.class);
} }
throw new RpcServiceException(response.getException().getErrId(),response.getMessage()); throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
} }
...@@ -88,14 +88,14 @@ public class MerchantAccountTypeService { ...@@ -88,14 +88,14 @@ public class MerchantAccountTypeService {
* @param request * @param request
* @return * @return
*/ */
public List<MerchantAccountTypeResponse> getAccountTypeList(AccountTypeListSearchRequest request) { public List<AccountTypeResponse> getAccountTypeList(AccountTypeListSearchRequest request) {
MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest(); MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest();
typeRequest.setAccounttypeName(request.getAccounttypeName()); typeRequest.setAccounttypeName(request.getAccounttypeName());
typeRequest.setDelFlag(request.getDelFlag()); typeRequest.setDelFlag(request.getDelFlag());
RpcResponse<List<MerchantAccountTypeResponse>> response = RpcResponse<List<MerchantAccountTypeResponse>> response =
accountTypeRemote.getAccountTypeListRemote(typeRequest); accountTypeRemote.getAccountTypeListRemote(typeRequest);
if(response.isSuccess()){ if(response.isSuccess()){
return response.getResult(); return ConvertResponse.convertList(response.getResult(), AccountTypeResponse.class);
} }
throw new RpcServiceException(response.getException().getErrId(),response.getMessage()); throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
} }
......
...@@ -121,13 +121,13 @@ public class MerchantRoleService { ...@@ -121,13 +121,13 @@ public class MerchantRoleService {
* @param request * @param request
* @return * @return
*/ */
public Pagination<MerchantRoleResponse> getRolePage(RoleListSearchRequest request) { public Pagination<RoleResponse> getRolePage(RoleListSearchRequest request) {
RpcPagination<MerchantRoleRequest> pagination = RpcPagination<MerchantRoleRequest> pagination =
ConvertRequest.convertPage(request, new MerchantRoleRequest()); ConvertRequest.convertPage(request, new MerchantRoleRequest());
RpcResponse<RpcPagination<MerchantRoleResponse>> response = RpcResponse<RpcPagination<MerchantRoleResponse>> response =
roleRemote.getRolePageRemote(pagination); roleRemote.getRolePageRemote(pagination);
if(response.isSuccess()){ if(response.isSuccess()){
return ConvertResponse.convertPage(response.getResult(), MerchantRoleResponse.class); return ConvertResponse.convertPage(response.getResult(), RoleResponse.class);
} }
throw new RpcServiceException(response.getException().getErrId(),response.getMessage()); throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
} }
...@@ -138,14 +138,14 @@ public class MerchantRoleService { ...@@ -138,14 +138,14 @@ public class MerchantRoleService {
* @param request * @param request
* @return * @return
*/ */
public List<MerchantRoleResponse> getRoleList(RoleListSearchRequest request) { public List<RoleResponse> getRoleList(RoleListSearchRequest request) {
MerchantRoleRequest typeRequest = new MerchantRoleRequest(); MerchantRoleRequest typeRequest = new MerchantRoleRequest();
typeRequest.setMerchantId(request.getMerchantId()); typeRequest.setMerchantId(request.getMerchantId());
typeRequest.setRoleName(request.getRoleName()); typeRequest.setRoleName(request.getRoleName());
RpcResponse<List<MerchantRoleResponse>> response = RpcResponse<List<MerchantRoleResponse>> response =
roleRemote.getRoleListRemote(typeRequest); roleRemote.getRoleListRemote(typeRequest);
if(response.isSuccess()){ if(response.isSuccess()){
return response.getResult(); return ConvertResponse.convertList(response.getResult(), RoleResponse.class);
} }
throw new RpcServiceException(response.getException().getErrId(),response.getMessage()); 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!