Commit 26baf9b9 by zhouhb

[+]接口添加

1 parent 6b3b054c
...@@ -205,4 +205,22 @@ public class OpenController { ...@@ -205,4 +205,22 @@ public class OpenController {
} }
} }
/**
* 查询最近的n家门店
*
* @param openProximityMerchantRequest 入参
* @return
*/
@ServiceMethod(method = "cn.com.glsx.merchants.open.proximityMerchantList", needInSession = NeedInSessionType.NO)
@ApiOperation("查询最近的n家门店")
public RopResponse<List<MerchantRopResponse>> proximityMerchantList(OpenProximityMerchantRequest openProximityMerchantRequest) {
try {
List<MerchantRopResponse> proximityMerchantList = openService.proximityMerchantList(openProximityMerchantRequest);
return RopResponse.success(proximityMerchantList);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__proximityMerchantList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
} }
package cn.com.glsx.merchants.request.open;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/26 14:04
*/
@Data
public class OpenProximityMerchantRequest {
/**
* 商户号
*/
private Integer merchantId;
/**
* 经度
*/
private Float lng;
/**
* 纬度
*/
private Float lat;
/**
* 门店数量
*/
private Integer storeCount=10;
}
...@@ -25,4 +25,10 @@ public class OpenUserDataPermissionRequest extends DefaultRequest { ...@@ -25,4 +25,10 @@ public class OpenUserDataPermissionRequest extends DefaultRequest {
@ApiModelProperty(notes = "用户名") @ApiModelProperty(notes = "用户名")
private String loginAccout; private String loginAccout;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
} }
...@@ -31,4 +31,10 @@ public class OpenUserMenuPermissionRequest extends DefaultRequest { ...@@ -31,4 +31,10 @@ public class OpenUserMenuPermissionRequest extends DefaultRequest {
@ApiModelProperty(notes = "产品编码") @ApiModelProperty(notes = "产品编码")
private String productCode; private String productCode;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
} }
...@@ -147,4 +147,12 @@ public class OpenService { ...@@ -147,4 +147,12 @@ public class OpenService {
} }
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage()); throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
} }
public List<MerchantRopResponse> proximityMerchantList(OpenProximityMerchantRequest openProximityMerchantRequest) {
RpcResponse<List<MerchantResponse>> subordinateListByPageRemote = merchantRemote.findProximityMerchantListRemote(ConvertRequest.convertRequest(openProximityMerchantRequest, new MerchantOpenRequest()));
if (subordinateListByPageRemote.isSuccess()) {
return ConvertResponse.convertList(subordinateListByPageRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(subordinateListByPageRemote.getException().getErrId(), subordinateListByPageRemote.getMessage());
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!