Commit 66470e02 by zhouhb

[+]商户代码修改

1 parent 6e59e325
...@@ -166,14 +166,14 @@ public class MerchantController { ...@@ -166,14 +166,14 @@ public class MerchantController {
/** /**
* 更新商户的有效期 * 更新商户的有效期
* *
* @param merchantDetailRequest 入参 * @param merchantUpdateValRequest 入参
* @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(MerchantDetailRequest merchantDetailRequest) { public RopResponse<Boolean> updateValPerByMerId(MerchantUpdateValRequest merchantUpdateValRequest) {
try { try {
merchantService.updateValPerByMerId(merchantDetailRequest); merchantService.updateValPerByMerId(merchantUpdateValRequest);
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());
......
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;
}
...@@ -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;
......
...@@ -149,12 +149,12 @@ public class MerchantService { ...@@ -149,12 +149,12 @@ public class MerchantService {
/** /**
* 更新商户的有效期 * 更新商户的有效期
* *
* @param merchantDetailRequest 入参 * @param merchantUpdateValRequest 入参
* @return * @return
*/ */
public void updateValPerByMerId(MerchantDetailRequest merchantDetailRequest) { public void updateValPerByMerId(MerchantUpdateValRequest merchantUpdateValRequest) {
merchantUserService.setUser(merchantDetailRequest); merchantUserService.setUser(merchantUpdateValRequest);
RpcResponse<Boolean> booleanRpcResponse = merchantRemote.saveMerchantRemote(ConvertRequest.convertRequest(merchantDetailRequest, new MerchantRequest())); RpcResponse<Boolean> booleanRpcResponse = merchantRemote.updateValPerByMerId(ConvertRequest.convertRequest(merchantUpdateValRequest, new MerchantRequest()));
if (booleanRpcResponse.isFailed()) { if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage()); throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!