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 bc5e5db3
authored
Sep 27, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]代码新增
1 parent
a051138f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
15 deletions
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
src/main/java/cn/com/glsx/merchants/request/open/MerchantTreeOpenRequest.java
src/main/java/cn/com/glsx/merchants/request/open/OpenCheckUserRequest.java
src/main/java/cn/com/glsx/merchants/response/MerchantTreeOpenResponse.java
src/main/java/cn/com/glsx/merchants/response/OpenUserResponse.java
src/main/java/cn/com/glsx/merchants/service/OpenService.java
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
View file @
bc5e5db
...
@@ -7,10 +7,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
...
@@ -7,10 +7,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import
cn.com.glsx.merchants.request.merchant.OpenMerchantRequest
;
import
cn.com.glsx.merchants.request.merchant.OpenMerchantRequest
;
import
cn.com.glsx.merchants.request.open.*
;
import
cn.com.glsx.merchants.request.open.*
;
import
cn.com.glsx.merchants.request.user.OpenUserRequest
;
import
cn.com.glsx.merchants.request.user.OpenUserRequest
;
import
cn.com.glsx.merchants.response.AccountTypeTreeRopResponse
;
import
cn.com.glsx.merchants.response.*
;
import
cn.com.glsx.merchants.response.MerchantRopResponse
;
import
cn.com.glsx.merchants.response.OpenUserResponse
;
import
cn.com.glsx.merchants.response.StaffResponse
;
import
cn.com.glsx.merchants.service.OpenService
;
import
cn.com.glsx.merchants.service.OpenService
;
import
cn.com.glsx.merchants.util.Pagination
;
import
cn.com.glsx.merchants.util.Pagination
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.NeedInSessionType
;
...
@@ -259,4 +256,22 @@ public class OpenController {
...
@@ -259,4 +256,22 @@ public class OpenController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
/**
* 商户树查询
*
* @param merchantTreeOpenRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.open.findMerchantTreeByMerchantNo"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"商户树查询"
)
public
RopResponse
<
List
<
MerchantTreeOpenResponse
>>
findMerchantTreeByMerchantNo
(
MerchantTreeOpenRequest
merchantTreeOpenRequest
)
{
try
{
List
<
MerchantTreeOpenResponse
>
merchantTreeByMerchantNo
=
openService
.
findMerchantTreeByMerchantNo
(
merchantTreeOpenRequest
);
return
RopResponse
.
success
(
merchantTreeByMerchantNo
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======OpenController__invoke__findMerchantTreeByMerchantNo__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
src/main/java/cn/com/glsx/merchants/request/open/MerchantTreeOpenRequest.java
0 → 100644
View file @
bc5e5db
package
cn
.
com
.
glsx
.
merchants
.
request
.
open
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public
class
MerchantTreeOpenRequest
extends
DefaultRequest
{
/**
* 商户号
*/
@ApiModelProperty
(
notes
=
"商户号"
)
private
Integer
merchantId
;
}
src/main/java/cn/com/glsx/merchants/request/open/OpenCheckUserRequest.java
View file @
bc5e5db
...
@@ -26,9 +26,9 @@ public class OpenCheckUserRequest extends DefaultRequest {
...
@@ -26,9 +26,9 @@ public class OpenCheckUserRequest extends DefaultRequest {
private
String
loginPassword
;
private
String
loginPassword
;
/**
/**
* 渠道
编码
* 渠道
类型
*/
*/
@ApiModelProperty
(
notes
=
"渠道
编码
"
)
@ApiModelProperty
(
notes
=
"渠道
类型
"
)
private
String
channel
Cod
e
;
private
String
channel
Typ
e
;
}
}
src/main/java/cn/com/glsx/merchants/response/MerchantTreeOpenResponse.java
0 → 100644
View file @
bc5e5db
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public
class
MerchantTreeOpenResponse
implements
Serializable
{
private
Integer
id
;
private
String
label
;
private
Integer
merchantAccountLevel
;
private
String
entmicroName
;
private
List
<
MerchantTreeOpenResponse
>
children
;
}
src/main/java/cn/com/glsx/merchants/response/OpenUserResponse.java
View file @
bc5e5db
...
@@ -78,6 +78,9 @@ public class OpenUserResponse {
...
@@ -78,6 +78,9 @@ public class OpenUserResponse {
@ApiModelProperty
(
name
=
"merchantNo"
,
notes
=
"商户号"
)
@ApiModelProperty
(
name
=
"merchantNo"
,
notes
=
"商户号"
)
private
Integer
merchantNo
;
private
Integer
merchantNo
;
@ApiModelProperty
(
name
=
"openId"
,
notes
=
"openId"
)
private
String
openId
;
@ApiModelProperty
(
notes
=
"手机号"
)
@ApiModelProperty
(
notes
=
"手机号"
)
private
String
phone
;
private
String
phone
;
}
}
src/main/java/cn/com/glsx/merchants/service/OpenService.java
View file @
bc5e5db
...
@@ -6,10 +6,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
...
@@ -6,10 +6,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.model.request.*
;
import
cn.com.glsx.merchants.model.request.*
;
import
cn.com.glsx.merchants.model.response.AccountTypeTreeResponse
;
import
cn.com.glsx.merchants.model.response.*
;
import
cn.com.glsx.merchants.model.response.MerchantResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantUserResponse
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
...
@@ -20,10 +17,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantRequest;
...
@@ -20,10 +17,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantRequest;
import
cn.com.glsx.merchants.request.open.*
;
import
cn.com.glsx.merchants.request.open.*
;
import
cn.com.glsx.merchants.request.open.MerchantListOpenRequest
;
import
cn.com.glsx.merchants.request.open.MerchantListOpenRequest
;
import
cn.com.glsx.merchants.request.user.OpenUserRequest
;
import
cn.com.glsx.merchants.request.user.OpenUserRequest
;
import
cn.com.glsx.merchants.response.AccountTypeTreeRopResponse
;
import
cn.com.glsx.merchants.response.*
;
import
cn.com.glsx.merchants.response.MerchantRopResponse
;
import
cn.com.glsx.merchants.response.OpenUserResponse
;
import
cn.com.glsx.merchants.response.StaffResponse
;
import
cn.com.glsx.merchants.util.Pagination
;
import
cn.com.glsx.merchants.util.Pagination
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -174,4 +168,12 @@ public class OpenService {
...
@@ -174,4 +168,12 @@ public class OpenService {
}
}
throw
new
RpcServiceException
(
staffByAccount
.
getException
().
getErrId
(),
staffByAccount
.
getMessage
());
throw
new
RpcServiceException
(
staffByAccount
.
getException
().
getErrId
(),
staffByAccount
.
getMessage
());
}
}
public
List
<
MerchantTreeOpenResponse
>
findMerchantTreeByMerchantNo
(
MerchantTreeOpenRequest
merchantTreeOpenRequest
)
{
RpcResponse
<
List
<
MerchantTreeResponse
>>
merchantTreeByMerchantNoRemote
=
merchantRemote
.
findMerchantTreeByMerchantNoRemote
(
merchantTreeOpenRequest
.
getMerchantId
());
if
(
merchantTreeByMerchantNoRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
merchantTreeByMerchantNoRemote
.
getResult
(),
MerchantTreeOpenResponse
.
class
);
}
throw
new
RpcServiceException
(
merchantTreeByMerchantNoRemote
.
getException
().
getErrId
(),
merchantTreeByMerchantNoRemote
.
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