|
|
|
@ -23,10 +23,7 @@ import com.hai.enum_type.PayType; |
|
|
|
|
import com.hai.enum_type.RechargePayType; |
|
|
|
|
import com.hai.model.OrderRefundModel; |
|
|
|
|
import com.hai.model.ResponseData; |
|
|
|
|
import com.hai.service.HighRefundAuditService; |
|
|
|
|
import com.hai.service.HighUserService; |
|
|
|
|
import com.hai.service.OutRechargeOrderRecordService; |
|
|
|
|
import com.hai.service.OutRechargeOrderService; |
|
|
|
|
import com.hai.service.*; |
|
|
|
|
import com.hai.service.pay.impl.GoodsOrderServiceImpl; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@ -70,6 +67,12 @@ public class CzOrderController { |
|
|
|
|
@Resource |
|
|
|
|
private HighUserService highUserService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private HighDiscountUserRelService highDiscountUserRelService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private HighDiscountAgentCodeService highDiscountAgentCodeService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private OutRechargeOrderRecordService rechargeOrderRecordService; |
|
|
|
|
|
|
|
|
@ -256,6 +259,19 @@ public class CzOrderController { |
|
|
|
|
outRechargeOrderService.updateOrder(order); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (order.getMemDiscountId() != null) { |
|
|
|
|
HighDiscountUserRel rel = highDiscountUserRelService.getRelById(order.getMemDiscountId()); |
|
|
|
|
if (rel != null) { |
|
|
|
|
rel.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
|
|
|
|
|
rel.setUseTime(null); |
|
|
|
|
highDiscountUserRelService.updateDiscountUserRel(rel); |
|
|
|
|
|
|
|
|
|
HighDiscountAgentCode code = highDiscountAgentCodeService.getCodeById(rel.getDiscountAgentCodeId()); |
|
|
|
|
code.setStatus(2); |
|
|
|
|
highDiscountAgentCodeService.updateCode(code); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
|
HighUser highUser = highUserService.findByUserId(order.getUserId()); |
|
|
|
|
WxMsgConfig.rechargedFail( |
|
|
|
|