消费退款记录修改
This commit is contained in:
parent
cff5de17f3
commit
046f6250a5
|
|
@ -1,5 +1,7 @@
|
||||||
package com.bonus.canteen.core.account.constants;
|
package com.bonus.canteen.core.account.constants;
|
||||||
|
|
||||||
|
import com.bonus.canteen.core.pay.constants.PayTypeEnum;
|
||||||
|
|
||||||
public enum AccTradeTypeEnum {
|
public enum AccTradeTypeEnum {
|
||||||
RECHARGE(10, "充值"),
|
RECHARGE(10, "充值"),
|
||||||
SUBSIDY(20, "补贴"),
|
SUBSIDY(20, "补贴"),
|
||||||
|
|
@ -23,4 +25,13 @@ public enum AccTradeTypeEnum {
|
||||||
public String getDesc() {
|
public String getDesc() {
|
||||||
return this.desc;
|
return this.desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getDescByKey(Integer targetKey) {
|
||||||
|
for (AccTradeTypeEnum tradeType : AccTradeTypeEnum.values()) {
|
||||||
|
if (tradeType.getKey().equals(targetKey)) {
|
||||||
|
return tradeType.getDesc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,13 @@ public class OrderRefundHistoryVO implements Serializable {
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
private BigDecimal realAmount;
|
private BigDecimal realAmount;
|
||||||
private LocalDateTime payTime;
|
private LocalDateTime payTime;
|
||||||
private String payType;
|
private Integer payType;
|
||||||
|
private String payTypeName;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private Long tradeId;
|
private Long tradeId;
|
||||||
private BigDecimal actualAmount;
|
private BigDecimal actualAmount;
|
||||||
private String tradeType;
|
private Integer tradeType;
|
||||||
|
private String tradeTypeName;
|
||||||
private LocalDateTime tradeTime;
|
private LocalDateTime tradeTime;
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,14 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OrderRefundHistoryVO> orderRefundHistory(OrderRefundHistoryParam param) {
|
public List<OrderRefundHistoryVO> orderRefundHistory(OrderRefundHistoryParam param) {
|
||||||
return orderInfoMapper.orderRefundHistory(param);
|
List<OrderRefundHistoryVO> list = orderInfoMapper.orderRefundHistory(param);
|
||||||
|
if(CollUtil.isNotEmpty(list)) {
|
||||||
|
list.forEach(orderRefundHistoryVO -> {
|
||||||
|
orderRefundHistoryVO.setPayTypeName(PayTypeEnum.getDescByKey(orderRefundHistoryVO.getPayType()));
|
||||||
|
orderRefundHistoryVO.setTradeTypeName(AccTradeTypeEnum.getDescByKey(orderRefundHistoryVO.getTradeType()));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -119,5 +119,13 @@ public enum PayTypeEnum {
|
||||||
return this.desc;
|
return this.desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getDescByKey(Integer targetKey) {
|
||||||
|
for (PayTypeEnum payType : PayTypeEnum.values()) {
|
||||||
|
if (payType.getKey().equals(targetKey)) {
|
||||||
|
return payType.getDesc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue