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

Commit 91c29758 authored by jiangxiulong's avatar jiangxiulong

转增 0and5可退款

parent 373e7970
......@@ -81,9 +81,8 @@ public class KylinOrderRefundAdminController extends BaseController {
@Log(title = "订单退款列表", businessType = BusinessType.DETAIL)
@PostMapping("applyOrder")
@ResponseBody
public RefundOrderDetailsVo applyOrder(RefundApplyParam refundApplyParam) {
RefundOrderDetailsVo orderInfo = kylinOrderRefundsServiceImpl.orderDetails(refundApplyParam.getOrderCode());
return orderInfo;
public AjaxResult applyOrder(RefundApplyParam refundApplyParam) {
return kylinOrderRefundsServiceImpl.orderDetails(refundApplyParam.getOrderCode());
}
@Log(title = "订单退款列表", businessType = BusinessType.INSERT)
......
......@@ -63,17 +63,17 @@
$.modal.loading("正在查询订单,请稍后...");
},
success: function (result) {
if (result.msg) {
if (result.status > 0) {
$.modal.closeLoading();
layer.msg("未找到该订单信息");
layer.msg(result.msg);
return false;
} else {
$("#orderTicketsId").val(result.orderTicketVo.orderTicketsId);
$('input[name="RefundPriceExpress"]').val(result.orderTicketVo.priceExpress);
$('input[name="RefundPriceExpress"]').attr("max", result.orderTicketVo.priceExpress);
$("#performanceTitle").text(result.kylinPerformanceVo.title);
$("#orderTicketsId").val(result.data.orderTicketVo.orderTicketsId);
$('input[name="RefundPriceExpress"]').val(result.data.orderTicketVo.priceExpress);
$('input[name="RefundPriceExpress"]').attr("max", result.data.orderTicketVo.priceExpress);
$("#performanceTitle").text(result.data.kylinPerformanceVo.title);
var options = {
data: result.kylinOrderTicketEntitiesDao,
data: result.data.kylinOrderTicketEntitiesDao,
pagination: false,
columns: [{
checkbox: true
......
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.type.TypeReference;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.utils.DateUtils;
import com.liquidnet.client.admin.common.utils.ShiroUtils;
import com.liquidnet.commons.lang.util.BeanUtil;
......@@ -113,6 +114,9 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
if (thisOrderStatus != KylinTableStatusConst.ORDER_STATUS1 && thisOrderStatus != KylinTableStatusConst.ORDER_STATUS3 && thisOrderStatus != KylinTableStatusConst.ORDER_STATUS6) {
return ResponseDto.failure("当前订单状态不支持退款申请");
}
if (orderStatus.getTransferStatus() != 0 || orderStatus.getTransferStatus() != 5) {
return ResponseDto.failure("当前转增状态不可退款");
}
// 订单支付状态需为已支付
if (thisPayStatus != KylinTableStatusConst.ORDER_PAY_STATUS1) {
return ResponseDto.failure("订单支付状态需为已支付");
......@@ -409,11 +413,18 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
return pageInfoTmp;
}
public RefundOrderDetailsVo orderDetails(String orderCode) {
public AjaxResult orderDetails(String orderCode) {
try {
// 订单
KylinOrderTickets kylinOrderTickets = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>().eq("order_code", orderCode)
);
KylinOrderTicketStatus kylinOrderTicketStatus = kylinOrderTicketStatusMapper.selectOne(
Wrappers.lambdaQuery(KylinOrderTicketStatus.class).eq(KylinOrderTicketStatus::getOrderId, kylinOrderTickets.getOrderTicketsId())
);
if (kylinOrderTicketStatus.getTransferStatus() != 0 || kylinOrderTicketStatus.getTransferStatus() != 5) {
return AjaxResult.error("当前转增状态不可退款");
}
BigDecimal oldPriceExpress = kylinOrderTickets.getPriceExpress();
// 传的快递费不能大于实际的快递费=(支付的快递费-已退的快递费)
BigDecimal refundPriceExpressSum = kylinOrderRefundsMapper.RefundPriceExpressSum(// 已退快递费
......@@ -477,7 +488,10 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
refundOrderDetailsVo.setKylinPerformanceVo(performanceVo);
refundOrderDetailsVo.setKylinOrderTicketEntitiesDao(entitiesList);
return refundOrderDetailsVo;
return AjaxResult.success(refundOrderDetailsVo);
} catch (Exception e) {
return AjaxResult.error("未找到该订单信息");
}
}
@Override
......@@ -499,7 +513,7 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
orderCode = data.getOrderCode();
}
}
}catch (Exception e){
} catch (Exception e) {
}
return orderCode;
......
......@@ -64,6 +64,7 @@
<where>
r.performance_id=#{targetId}
AND s.status IN (1, 3, 6)
AND s.transfer_status IN (0, 5)
AND s.pay_status=1
AND o.coupon_type='no'
AND o.payment_type IN
......@@ -82,6 +83,7 @@
<where>
r.performance_id=${targetId}
AND s.status IN (1, 3, 6)
AND s.transfer_status IN (0, 5)
AND s.pay_status=1
AND o.coupon_type='no'
AND o.mid>${mid}
......
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