记得上下班打卡 | git大法好,push需谨慎

Commit c94e9de4 authored by jiangxiulong's avatar jiangxiulong

显示问题 增加退款中状态和自定义金额后 退款中 部分退款都可操作 有退款中的订单 也能继续发起

parent d760705d
......@@ -114,6 +114,9 @@
case 3:
isPayment = "已退款";
break;
case 4:
isPayment = "部分退款";
break;
}
return isPayment;
}
......
......@@ -206,13 +206,9 @@
title: '退款编号'
},
{
field: 'RefundCode',
field: 'refundCode',
title: '退款中心退款编号'
},
{
field: 'RefundId',
title: '第三方退款编号'
},
{
field: 'price',
title: '退款总金额'
......@@ -226,7 +222,7 @@
title: '申请时间'
},
{
field: 'RefundAt',
field: 'refundAt',
title: '成功退款时间'
},
{
......
......@@ -94,8 +94,8 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
// todo 转增是否能退
// 订单状态需已付款
if (thisOrderStatus != KylinTableStatusConst.ORDER_STATUS1) {
return ResponseDto.failure("订单不是已付款状态");
if (thisOrderStatus != KylinTableStatusConst.ORDER_STATUS1 && thisOrderStatus != KylinTableStatusConst.ORDER_STATUS3 && thisOrderStatus != KylinTableStatusConst.ORDER_STATUS6) {
return ResponseDto.failure("当前订单状态不支持退款申请");
}
// 订单支付状态需为已支付
if (thisPayStatus != KylinTableStatusConst.ORDER_PAY_STATUS1) {
......@@ -120,24 +120,17 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
// todo 出票未出票
// 选择退款的入场人是否正确
Integer[] entitiesStatus = new Integer[]{KylinTableStatusConst.ENTITIES_IS_PAYMENT1, KylinTableStatusConst.ENTITIES_IS_PAYMENT2};
int choiceCount = kylinOrderTicketEntitiesMapper.selectCount(
new QueryWrapper<KylinOrderTicketEntities>()
.eq("order_id", orderTicketsId)
.eq("is_payment", KylinTableStatusConst.ENTITIES_IS_PAYMENT1)
.in("is_payment", entitiesStatus)
.in("order_ticket_entities_id", ticketEntityIds)
);
if (choiceCount < 0 || choiceCount != ticketEntityIds.size()) {
return ResponseDto.failure("入场人订单有误");
}
// 该订单正在退款或已有退款
int refundingCount = kylinOrderRefundsMapper.selectRefundingCount(
orderTicketsId,
KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL,
ticketEntityIds
);
if (refundingCount > 0) {
return ResponseDto.failure("该订单正在退款或已有退款");
}
// 该订单正在退款或已有退款 因支持填入价格所有取消判断
// 各个入场人订单填写的退款金额是否正确
double priceActual = orderInfo.getPriceActual().doubleValue();
int allEntitiesCount = kylinOrderTicketEntitiesMapper.selectCount(// 总入场人数量 排出未付款的 用来计算单入场人的价格
......
......@@ -19,7 +19,7 @@ public class OrderRefundDao implements Serializable {
private String refundCode;
private LocalDateTime refundAt;
private String refundAt;
private String refundId;
......
......@@ -23,6 +23,7 @@
<where>
a.order_id = #{orderTicketsId}
AND a.is_payment != 0
AND a.is_payment != 3
</where>
</select>
<select id="getRefundEntitiesPrice" resultType="java.lang.Double">
......
......@@ -141,9 +141,10 @@ public class KylinRefundsStatusServiceImpl {
entitiesTable.setIsPayment(isPayment);
entitiesTable.setUpdatedAt(LocalDateTime.now());
entitiesTable.setRefundPrice(BigDecimal.valueOf(priceNew));
Integer[] entitiesTableIsPayment = {KylinTableStatusConst.ENTITIES_IS_PAYMENT2, KylinTableStatusConst.ENTITIES_IS_PAYMENT4};
kylinOrderTicketEntitiesMapper.update(entitiesTable, new UpdateWrapper<KylinOrderTicketEntities>()
.eq("order_ticket_entities_id", entitiesId)
.eq("is_payment", KylinTableStatusConst.ENTITIES_IS_PAYMENT2)
.in("is_payment", entitiesTableIsPayment)
);
HashMap<String, Object> EntitiesVo = new HashMap<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment