消费退款记录修改
This commit is contained in:
parent
cff5de17f3
commit
046f6250a5
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.canteen.core.account.constants;
|
||||
|
||||
import com.bonus.canteen.core.pay.constants.PayTypeEnum;
|
||||
|
||||
public enum AccTradeTypeEnum {
|
||||
RECHARGE(10, "充值"),
|
||||
SUBSIDY(20, "补贴"),
|
||||
|
|
@ -23,4 +25,13 @@ public enum AccTradeTypeEnum {
|
|||
public String getDesc() {
|
||||
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 BigDecimal realAmount;
|
||||
private LocalDateTime payTime;
|
||||
private String payType;
|
||||
private Integer payType;
|
||||
private String payTypeName;
|
||||
@JsonIgnore
|
||||
private Long tradeId;
|
||||
private BigDecimal actualAmount;
|
||||
private String tradeType;
|
||||
private Integer tradeType;
|
||||
private String tradeTypeName;
|
||||
private LocalDateTime tradeTime;
|
||||
private String updateBy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,14 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
|||
|
|
@ -119,5 +119,13 @@ public enum PayTypeEnum {
|
|||
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