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 26baf9b9
authored
Sep 26, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]接口添加
1 parent
6b3b054c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
0 deletions
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
src/main/java/cn/com/glsx/merchants/request/open/OpenProximityMerchantRequest.java
src/main/java/cn/com/glsx/merchants/request/open/OpenUserDataPermissionRequest.java
src/main/java/cn/com/glsx/merchants/request/open/OpenUserMenuPermissionRequest.java
src/main/java/cn/com/glsx/merchants/service/OpenService.java
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
View file @
26baf9b
...
...
@@ -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
());
}
}
}
src/main/java/cn/com/glsx/merchants/request/open/OpenProximityMerchantRequest.java
0 → 100644
View file @
26baf9b
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
;
}
src/main/java/cn/com/glsx/merchants/request/open/OpenUserDataPermissionRequest.java
View file @
26baf9b
...
...
@@ -25,4 +25,10 @@ public class OpenUserDataPermissionRequest extends DefaultRequest {
@ApiModelProperty
(
notes
=
"用户名"
)
private
String
loginAccout
;
/**
* 商户号
*/
@ApiModelProperty
(
notes
=
"商户号"
)
private
Integer
merchantId
;
}
src/main/java/cn/com/glsx/merchants/request/open/OpenUserMenuPermissionRequest.java
View file @
26baf9b
...
...
@@ -31,4 +31,10 @@ public class OpenUserMenuPermissionRequest extends DefaultRequest {
@ApiModelProperty
(
notes
=
"产品编码"
)
private
String
productCode
;
/**
* 商户号
*/
@ApiModelProperty
(
notes
=
"商户号"
)
private
Integer
merchantId
;
}
src/main/java/cn/com/glsx/merchants/service/OpenService.java
View file @
26baf9b
...
...
@@ -147,4 +147,12 @@ public class OpenService {
}
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
());
}
}
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