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 c3a4bcc5
authored
Mar 02, 2022
by
wanghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merge all from merchant_1.0.3
1 parent
33e07cb1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
7 deletions
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantAccessMode.java
src/main/java/cn/com/glsx/merchants/response/MerchantAccessModeResponse.java
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
View file @
c3a4bcc
...
@@ -315,4 +315,16 @@ public class MerchantController {
...
@@ -315,4 +315,16 @@ public class MerchantController {
}
}
}
}
@ServiceMethod
(
method
=
"merchants.api.merchant.updateAccessMode"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"修改商户接入模式"
)
public
RopResponse
<
Boolean
>
accessMode
(
MerchantAccessMode
merchantAccessMode
){
try
{
merchantService
.
updateAccessMode
(
merchantAccessMode
);
return
RopResponse
.
success
(
Boolean
.
TRUE
);
}
catch
(
RpcServiceException
e
){
log
.
info
(
"MerchantController_updateMerchantPath_exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
View file @
c3a4bcc
...
@@ -2,12 +2,9 @@ package cn.com.glsx.merchants.controller;
...
@@ -2,12 +2,9 @@ package cn.com.glsx.merchants.controller;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
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.model.response.MerchantUserResponse
;
import
cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest
;
import
cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest
;
import
cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest
;
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.response.*
;
import
cn.com.glsx.merchants.response.*
;
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
;
...
@@ -20,10 +17,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -20,10 +17,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -433,5 +427,4 @@ public class OpenController {
...
@@ -433,5 +427,4 @@ public class OpenController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantAccessMode.java
0 → 100644
View file @
c3a4bcc
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
MerchantAccessMode
extends
AbstractRopRequest
{
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
id
;
@ApiModelProperty
(
notes
=
"接入模式: 0.自建应用模式,3.应用待开发模式"
,
required
=
true
)
private
Integer
accessMode
;
}
src/main/java/cn/com/glsx/merchants/response/MerchantAccessModeResponse.java
0 → 100644
View file @
c3a4bcc
package
cn
.
com
.
glsx
.
merchants
.
response
;
public
class
MerchantAccessModeResponse
{
}
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
View file @
c3a4bcc
...
@@ -342,4 +342,13 @@ public class MerchantRopResponse {
...
@@ -342,4 +342,13 @@ public class MerchantRopResponse {
@ApiModelProperty
(
notes
=
"是否嘀加渠道"
)
@ApiModelProperty
(
notes
=
"是否嘀加渠道"
)
private
Boolean
djBl
;
private
Boolean
djBl
;
@ApiModelProperty
(
notes
=
"接入模式: 0.自建应用模式,3.应用代开发模式"
)
private
Integer
accessMode
;
@ApiModelProperty
(
notes
=
"接入模式"
)
private
String
accessModeName
;
@ApiModelProperty
(
notes
=
"是否可编辑[接入模式], true, false"
)
private
Boolean
hasAccessMode
;
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
View file @
c3a4bcc
...
@@ -274,4 +274,13 @@ public class MerchantService {
...
@@ -274,4 +274,13 @@ public class MerchantService {
}
}
}
}
public
void
updateAccessMode
(
MerchantAccessMode
merchantAccessMode
)
{
MerchantApiAccessMode
apiAccessMode
=
new
MerchantApiAccessMode
();
BeanUtils
.
copyProperties
(
merchantAccessMode
,
apiAccessMode
);
RpcResponse
<
Boolean
>
rpcResponse
=
merchantRemote
.
updateAccessMode
(
apiAccessMode
);
if
(
rpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
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