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 66470e02
authored
Jul 28, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]商户代码修改
1 parent
6e59e325
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
11 deletions
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantUpdateValRequest.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 @
66470e0
...
@@ -166,14 +166,14 @@ public class MerchantController {
...
@@ -166,14 +166,14 @@ public class MerchantController {
/**
/**
* 更新商户的有效期
* 更新商户的有效期
*
*
* @param merchant
Detai
lRequest 入参
* @param merchant
UpdateVa
lRequest 入参
* @return
* @return
*/
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.updateValPerByMerId"
,
needInSession
=
NeedInSessionType
.
NO
)
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.updateValPerByMerId"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"更新商户的有效期"
)
@ApiOperation
(
"更新商户的有效期"
)
public
RopResponse
<
Boolean
>
updateValPerByMerId
(
Merchant
DetailRequest
merchantDetai
lRequest
)
{
public
RopResponse
<
Boolean
>
updateValPerByMerId
(
Merchant
UpdateValRequest
merchantUpdateVa
lRequest
)
{
try
{
try
{
merchantService
.
updateValPerByMerId
(
merchant
Detai
lRequest
);
merchantService
.
updateValPerByMerId
(
merchant
UpdateVa
lRequest
);
return
RopResponse
.
success
(
true
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__updateValPerByMerId__exception:{}"
,
e
.
getMessage
());
log
.
info
(
"=======MerchantController__invoke__updateValPerByMerId__exception:{}"
,
e
.
getMessage
());
...
...
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantUpdateValRequest.java
0 → 100644
View file @
66470e0
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 11:14
*/
@Data
public
class
MerchantUpdateValRequest
extends
DefaultRequest
implements
Serializable
{
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
id
;
@ApiModelProperty
(
notes
=
"有效期"
,
required
=
true
)
private
Integer
effectiveTime
;
}
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
View file @
66470e0
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
...
@@ -86,7 +87,7 @@ public class MerchantRopResponse {
...
@@ -86,7 +87,7 @@ public class MerchantRopResponse {
*/
*/
@ApiModelProperty
(
name
=
"createdTime"
,
notes
=
"创建时间"
,
dataType
=
"date"
)
@ApiModelProperty
(
name
=
"createdTime"
,
notes
=
"创建时间"
,
dataType
=
"date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
String
createdTime
;
private
Date
createdTime
;
/**
/**
...
@@ -117,21 +118,21 @@ public class MerchantRopResponse {
...
@@ -117,21 +118,21 @@ public class MerchantRopResponse {
* 营业开始时间
* 营业开始时间
*/
*/
@ApiModelProperty
(
name
=
"bussinessBegintime"
,
notes
=
"营业开始时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"bussinessBegintime"
,
notes
=
"营业开始时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
private
String
bussinessBegintime
;
private
Date
bussinessBegintime
;
/**
/**
* 营业结束时间
* 营业结束时间
*/
*/
@ApiModelProperty
(
name
=
"bussinessEndtime"
,
notes
=
"营业结束时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"bussinessEndtime"
,
notes
=
"营业结束时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
String
bussinessEndtime
;
private
Date
bussinessEndtime
;
/**
/**
* 商户过期时间
* 商户过期时间
*/
*/
@ApiModelProperty
(
name
=
"expireDate"
,
notes
=
"商户过期时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
name
=
"expireDate"
,
notes
=
"商户过期时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
String
expireDate
;
private
Date
expireDate
;
/**
/**
* 1.草稿 2.发布 3.注销 4.过期
* 1.草稿 2.发布 3.注销 4.过期
...
@@ -189,6 +190,12 @@ public class MerchantRopResponse {
...
@@ -189,6 +190,12 @@ public class MerchantRopResponse {
private
String
businessScopeCustomize
;
private
String
businessScopeCustomize
;
/**
/**
* 有效时间
*/
@ApiModelProperty
(
name
=
"effectiveTime"
,
notes
=
"有效时间"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Integer
effectiveTime
;
/**
* 关联关系
* 关联关系
*/
*/
private
List
<
AccountTypeTreeRopResponse
>
accountTypes
;
private
List
<
AccountTypeTreeRopResponse
>
accountTypes
;
...
...
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
View file @
66470e0
...
@@ -149,12 +149,12 @@ public class MerchantService {
...
@@ -149,12 +149,12 @@ public class MerchantService {
/**
/**
* 更新商户的有效期
* 更新商户的有效期
*
*
* @param merchant
Detai
lRequest 入参
* @param merchant
UpdateVa
lRequest 入参
* @return
* @return
*/
*/
public
void
updateValPerByMerId
(
Merchant
DetailRequest
merchantDetai
lRequest
)
{
public
void
updateValPerByMerId
(
Merchant
UpdateValRequest
merchantUpdateVa
lRequest
)
{
merchantUserService
.
setUser
(
merchant
Detai
lRequest
);
merchantUserService
.
setUser
(
merchant
UpdateVa
lRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
saveMerchantRemote
(
ConvertRequest
.
convertRequest
(
merchantDetai
lRequest
,
new
MerchantRequest
()));
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
updateValPerByMerId
(
ConvertRequest
.
convertRequest
(
merchantUpdateVa
lRequest
,
new
MerchantRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
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