挂账 后续
This commit is contained in:
@@ -20,6 +20,7 @@ import com.czg.order.entity.OrderDetail;
|
|||||||
import com.czg.order.entity.OrderInfo;
|
import com.czg.order.entity.OrderInfo;
|
||||||
import com.czg.order.entity.OrderPayment;
|
import com.czg.order.entity.OrderPayment;
|
||||||
import com.czg.order.enums.PayEnums;
|
import com.czg.order.enums.PayEnums;
|
||||||
|
import com.czg.order.service.CreditBuyerOrderService;
|
||||||
import com.czg.order.service.OrderDetailService;
|
import com.czg.order.service.OrderDetailService;
|
||||||
import com.czg.order.service.OrderInfoService;
|
import com.czg.order.service.OrderInfoService;
|
||||||
import com.czg.order.service.OrderPaymentService;
|
import com.czg.order.service.OrderPaymentService;
|
||||||
@@ -84,6 +85,8 @@ public class PayServiceImpl implements PayService {
|
|||||||
@Resource
|
@Resource
|
||||||
private OrderPaymentService paymentService;
|
private OrderPaymentService paymentService;
|
||||||
@Resource
|
@Resource
|
||||||
|
private CreditBuyerOrderService buyerOrderService;
|
||||||
|
@Resource
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
@Resource
|
@Resource
|
||||||
private RabbitPublisher rabbitPublisher;
|
private RabbitPublisher rabbitPublisher;
|
||||||
@@ -131,13 +134,14 @@ public class PayServiceImpl implements PayService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public CzgResult<Object> creditPayOrder(OrderPayParamDTO payParam) {
|
public CzgResult<Object> creditPayOrder(OrderPayParamDTO payParam) {
|
||||||
AssertUtil.isNull(payParam.getCreditBuyerId(),"挂账人不可为空");
|
AssertUtil.isNull(payParam.getCreditBuyerId(), "挂账人不可为空");
|
||||||
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
|
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
|
||||||
orderInfo.setCreditBuyerId(payParam.getCreditBuyerId());
|
orderInfo.setCreditBuyerId(payParam.getCreditBuyerId());
|
||||||
orderInfoService.upOrderInfo(orderInfo, orderInfo.getOrderAmount(),
|
orderInfoService.upOrderInfo(orderInfo, orderInfo.getOrderAmount(),
|
||||||
LocalDateTime.now(), null, PayEnums.CREDIT_PAY);
|
LocalDateTime.now(), null, PayEnums.CREDIT_PAY);
|
||||||
|
//挂账后续逻辑
|
||||||
|
buyerOrderService.save(payParam.getCreditBuyerId().toString(), orderInfo.getId());
|
||||||
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
|
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
|
||||||
//TODO 挂账后续逻辑
|
|
||||||
return CzgResult.success();
|
return CzgResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user