Commit da43ca7d by wuwenlong

order status opt;

parent 397361d5
......@@ -7,7 +7,11 @@ package share.common.enums;
public enum OrderStatusEnum {
UNUSED(0,"待使用/已预约"),
INUSE(1,"使用中"),
USED(2,"已使用");
USED(2,"已使用"),
CANCEL(3,"已取消"),
AUDIT(4,"审核中"),
REFUNDED(5,"已退款");
private Integer code;
private String name;
......
......@@ -13,6 +13,7 @@ import org.springframework.transaction.support.TransactionTemplate;
import share.common.constant.Constants;
import share.common.core.redis.RedisUtil;
import share.common.enums.CouponStatusEnum;
import share.common.enums.OrderStatusEnum;
import share.common.enums.RefundStatusEnum;
import share.common.enums.YesNoEnum;
import share.common.exception.base.BaseException;
......@@ -171,6 +172,7 @@ public class OrderTask {
SOrder tempOrder = new SOrder();
tempOrder.setId(sOrder.getId());
tempOrder.setStatus(OrderStatusEnum.REFUNDED.getCode());
tempOrder.setRefundStatus(RefundStatusEnum.REFUNDED.getCode());
Boolean execute = Boolean.FALSE;
......
......@@ -109,8 +109,8 @@ public class SOrder extends BaseEntity
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
private Date endDate;
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用) */
@Excel(name = "订单状态(0:待使用/已预约,1:使用中,2:已使用)")
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
@Excel(name = "订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费)")
private Integer status;
@ApiModelProperty(value = "0 未退款 1 申请中 2 退款中 3 已退款 4 拒绝退款")
......
......@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
import share.common.config.WeChatConfig;
import share.common.constant.Constants;
import share.common.core.redis.RedisUtil;
import share.common.enums.OrderStatusEnum;
import share.common.enums.OrderTypeEnum;
import share.common.enums.RefundStatusEnum;
import share.common.enums.YesNoEnum;
......@@ -234,6 +235,7 @@ public class CallbackServiceImpl implements CallbackService {
logger.warn("微信退款订单已确认成功==>" + refundRecord.getColumns() + ", rawData==>" + xmlInfo + ", data==>" + notifyRecord);
return refundRecord.getStr("returnXml");
}
sOrder.setStatus(OrderStatusEnum.AUDIT.getCode());
sOrder.setRefundStatus(RefundStatusEnum.INREFUND.getCode());
boolean update = sOrderService.updateById(sOrder);
if (update) {
......
......@@ -312,6 +312,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
}
}
//修改订单退款状态,为退款中
sOrder.setStatus(OrderStatusEnum.AUDIT.getCode());
sOrder.setRefundStatus(RefundStatusEnum.INREFUND.getCode());
sOrder.setRefundPrice(request.getAmount());
break;
......
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