Commit 81da7f5f by yelq

Merge all from rop-merchant scrm_v4.46.0_20241031

1 parent 6d22630d
...@@ -5,6 +5,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException; ...@@ -5,6 +5,7 @@ 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.dto.MerchantBrandDTO; import cn.com.glsx.merchants.dto.MerchantBrandDTO;
import cn.com.glsx.merchants.model.request.MerchantRequest; import cn.com.glsx.merchants.model.request.MerchantRequest;
import cn.com.glsx.merchants.model.response.MerchantSimpleResponse;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse; import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.model.response.MerchantSubListResponse; import cn.com.glsx.merchants.model.response.MerchantSubListResponse;
import cn.com.glsx.merchants.model.response.merchant.MerchantBasicInfoListResponse; import cn.com.glsx.merchants.model.response.merchant.MerchantBasicInfoListResponse;
...@@ -705,6 +706,22 @@ public class OpenController { ...@@ -705,6 +706,22 @@ public class OpenController {
} }
} }
/**
* 根据账户类型,层级查询商户列表
*
* @param merchantListOpenRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.findSimpleMerchantListByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("根据账户类型,层级查询商户列表简化")
public RopResponse<Pagination<MerchantSimpleResponse>> findSimpleMerchantListByPage(MerchantListOpenRequest merchantListOpenRequest) {
try {
Pagination<MerchantSimpleResponse> subordinateListByPage = openService.findSimpleMerchantListByPage(merchantListOpenRequest);
return RopResponse.success(subordinateListByPage);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantListByPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
} }
...@@ -547,4 +547,13 @@ public class OpenService { ...@@ -547,4 +547,13 @@ public class OpenService {
} }
throw new RpcServiceException(rpcResponse.getError(),rpcResponse.getException().getErrId(), rpcResponse.getMessage()); throw new RpcServiceException(rpcResponse.getError(),rpcResponse.getException().getErrId(), rpcResponse.getMessage());
} }
public Pagination<MerchantSimpleResponse> findSimpleMerchantListByPage(MerchantListOpenRequest merchantListOpenRequest) {
cn.com.glsx.merchants.model.request.MerchantListOpenRequest openRequest = buildOpenRequest(merchantListOpenRequest);
RpcResponse<RpcPagination<MerchantSimpleResponse>> merchantListByPageRemote = merchantRemote.findSimpleMerchantListByPage(ConvertRequest.convertPage(merchantListOpenRequest, openRequest));
if (merchantListByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merchantListByPageRemote.getResult(), MerchantSimpleResponse.class);
}
throw new RpcServiceException(merchantListByPageRemote.getException().getErrId(), merchantListByPageRemote.getMessage());
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!