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 6e59e325
authored
Jul 27, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+商户接口添加
1 parent
a3aef103
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
View file @
6e59e32
...
...
@@ -8,6 +8,7 @@ import cn.com.glsx.merchants.response.MerchantRopResponse;
import
cn.com.glsx.merchants.response.MerchantTreeRopResponse
;
import
cn.com.glsx.merchants.service.MerchantService
;
import
cn.com.glsx.merchants.util.Pagination
;
import
com.rop.AbstractRopRequest
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
...
...
@@ -29,7 +30,7 @@ import java.util.List;
*/
@Slf4j
@Api
(
"商户接口"
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
public
class
MerchantController
{
@Autowired
...
...
@@ -100,7 +101,7 @@ public class MerchantController {
@ApiOperation
(
"查询商户详情"
)
public
RopResponse
<
MerchantRopResponse
>
findMerchantDetail
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
MerchantRopResponse
merchantResponse
=
merchantService
.
findMerchantDetail
(
merchantDetailRequest
);
MerchantRopResponse
merchantResponse
=
merchantService
.
findMerchantDetail
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__updatePermissions__exception:{}"
,
e
.
getMessage
());
...
...
@@ -136,7 +137,7 @@ public class MerchantController {
@ApiOperation
(
"查询商户树"
)
public
RopResponse
<
List
<
MerchantTreeRopResponse
>>
findMerchantTree
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
List
<
MerchantTreeRopResponse
>
merchantResponse
=
merchantService
.
findMerchantTree
(
merchantDetailRequest
);
List
<
MerchantTreeRopResponse
>
merchantResponse
=
merchantService
.
findMerchantTree
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__findMerchantTree__exception:{}"
,
e
.
getMessage
());
...
...
@@ -154,7 +155,7 @@ public class MerchantController {
@ApiOperation
(
"查询商户的菜单权限"
)
public
RopResponse
<
List
<
AccountTypeTreeRopResponse
>>
findPermissionsByMerId
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
List
<
AccountTypeTreeRopResponse
>
merchantResponse
=
merchantService
.
findPermissionsByMerId
(
merchantDetailRequest
);
List
<
AccountTypeTreeRopResponse
>
merchantResponse
=
merchantService
.
findPermissionsByMerId
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__findMerchantTree__exception:{}"
,
e
.
getMessage
());
...
...
@@ -197,4 +198,21 @@ public class MerchantController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询所有商户
*
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.menu.findAllMerchant"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询所有商户"
)
public
RopResponse
<
List
<
MerchantRopResponse
>>
findAllMerchant
(
AbstractRopRequest
abstractRopRequest
)
{
try
{
List
<
MerchantRopResponse
>
list
=
merchantService
.
findAllMerchant
();
return
RopResponse
.
success
(
list
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMenuController__invoke__findAllMerchant__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
View file @
6e59e32
...
...
@@ -173,4 +173,12 @@ public class MerchantService {
}
throw
new
RpcServiceException
(
merProductByPageRemote
.
getException
().
getErrId
(),
merProductByPageRemote
.
getMessage
());
}
public
List
<
MerchantRopResponse
>
findAllMerchant
()
{
RpcResponse
<
List
<
MerchantResponse
>>
allMerchantRemote
=
merchantRemote
.
findAllMerchantRemote
();
if
(
allMerchantRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
allMerchantRemote
.
getResult
(),
MerchantRopResponse
.
class
);
}
throw
new
RpcServiceException
(
allMerchantRemote
.
getException
().
getErrId
(),
allMerchantRemote
.
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