提交 ec2c4ba0 authored 作者: liuhaiquan's avatar liuhaiquan

修改支付通道枚举值重复的问题

上级 99bafec2
......@@ -33,26 +33,6 @@ public enum OwnerRePaymentEnum {
}
}
//支付渠道 10 订单支付 20 转账支付
@Getter
@AllArgsConstructor
public enum Channel {
ORDER(10, "订单支付"),
TRANSFER(20, "转账支付"),
;
private final Integer code;
private final String msg;
public static Optional<OwnerRePaymentEnum.Channel> getByCode(Integer code) {
return Arrays.stream(values()).filter(e -> Objects.equals(e.code , code)).findFirst();
}
public static String getMsgByCode(Integer code) {
return getByCode(code).map(OwnerRePaymentEnum.Channel::getMsg).orElse(null);
}
}
//10 未逾期 20 已逾期
@Getter
......
......@@ -22,7 +22,7 @@ public class ExportPaymentApplicationFormParam {
private Integer id;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
@NotNull(message = "支付渠道不能为空")
private Integer payWay;
}
......@@ -124,14 +124,14 @@ public class ExportOwnerLoanRecordVO {
private String loanRepaymentTime;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private Integer payChannel;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private String payChannelMsg;
public String getPayChannelMsg(){
return OwnerRePaymentEnum.Channel.getMsgByCode(payChannel);
return OwnerLoanRecordEnum.PayChannel.getMsgByCode(payChannel);
}
......
......@@ -120,14 +120,14 @@ public class OwnerLoanRecordVO {
private String loanRepaymentTime;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private Integer payChannel;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private String payChannelMsg;
public String getPayChannelMsg(){
return OwnerRePaymentEnum.Channel.getMsgByCode(payChannel);
return OwnerLoanRecordEnum.PayChannel.getMsgByCode(payChannel);
}
......
package com.clx.performance.vo.pc.loan.carrier;
import com.clx.performance.enums.loan.OwnerLoanRecordEnum;
import com.clx.performance.enums.loan.OwnerRePaymentEnum;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
......@@ -92,14 +93,14 @@ public class OwnerRepaymentVO {
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private Integer payChannel;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private String payChannelMsg;
public String getPayChannelMsg(){
return OwnerRePaymentEnum.Channel.getMsgByCode(payChannel);
return OwnerLoanRecordEnum.PayChannel.getMsgByCode(payChannel);
}
......
package com.clx.performance.vo.pc.loan.owner;
import com.clx.performance.enums.loan.OwnerLoanRecordEnum;
import com.clx.performance.enums.loan.OwnerRePaymentEnum;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
......@@ -96,14 +97,14 @@ public class ExportOwnerRepaymentVO {
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private Integer payChannel;
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private String payChannelMsg;
public String getPayChannelMsg(){
return OwnerRePaymentEnum.Channel.getMsgByCode(payChannel);
return OwnerLoanRecordEnum.PayChannel.getMsgByCode(payChannel);
}
......
......@@ -103,7 +103,7 @@ public class OwnerRepayment implements HasKey<Integer> {
private Integer status;
@TableField("pay_channel")
@ApiModelProperty("支付渠道 10 订单支付 20 转账支付")
@ApiModelProperty("支付渠道 1 订单支付 2 转账支付")
private Integer payChannel;
@TableField("be_overdue")
......
......@@ -445,7 +445,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
});
// 创建合同
GenerateContractParam feignParam = new GenerateContractParam();
if (Objects.equals(OwnerRePaymentEnum.Channel.ORDER.getCode(), param.getPayWay())) {
if (Objects.equals(OwnerLoanRecordEnum.PayChannel.ORDER_DIRECT_PAY.getCode(), param.getPayWay())) {
feignParam.setTemplateNo(Long.valueOf(paymentFromConfig.getLoanOrderTemplateNo()));
} else {
feignParam.setTemplateNo(Long.valueOf(paymentFromConfig.getLoanTransferTemplateNo()));
......
......@@ -176,7 +176,7 @@ public class OwnerRepaymentServiceImpl implements OwnerRepaymentService {
Map<String,String> map = JSON.parseObject(JSON.toJSONString(exportOwnerRepaymentVO), new TypeReference<Map<String,String>>(){});
// 创建合同
GenerateContractParam feignParam = new GenerateContractParam();
if(Objects.equals(OwnerRePaymentEnum.Channel.ORDER.getCode(),param.getPayWay())){
if(Objects.equals(OwnerLoanRecordEnum.PayChannel.ORDER_DIRECT_PAY.getCode(),param.getPayWay())){
feignParam.setTemplateNo(Long.valueOf(paymentFromConfig.getRepaymentOrderTemplateNo()));
}else{
feignParam.setTemplateNo(Long.valueOf(paymentFromConfig.getRepaymentTransferTemplateNo()));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论