|
@@ -363,12 +363,20 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
|
|
|
mtOrder.setCouponId(orderDto.getCouponId());
|
|
|
mtOrder.setParam(orderDto.getParam());
|
|
|
mtOrder.setRemark(orderDto.getRemark());
|
|
|
- mtOrder.setStatus(OrderStatusEnum.CREATED.getKey());
|
|
|
+ if (orderDto.getStatus() != null) {
|
|
|
+ mtOrder.setStatus(orderDto.getStatus());
|
|
|
+ } else {
|
|
|
+ mtOrder.setStatus(OrderStatusEnum.CREATED.getKey());
|
|
|
+ }
|
|
|
mtOrder.setType(orderDto.getType());
|
|
|
mtOrder.setAmount(orderDto.getAmount());
|
|
|
mtOrder.setPayAmount(orderDto.getPayAmount());
|
|
|
mtOrder.setDiscount(orderDto.getDiscount());
|
|
|
- mtOrder.setPayStatus(PayStatusEnum.WAIT.getKey());
|
|
|
+ if (orderDto.getPayStatus() != null) {
|
|
|
+ mtOrder.setPayStatus(orderDto.getPayStatus());
|
|
|
+ } else {
|
|
|
+ mtOrder.setPayStatus(PayStatusEnum.WAIT.getKey());
|
|
|
+ }
|
|
|
mtOrder.setPlatform(orderDto.getPlatform());
|
|
|
mtOrder.setPointAmount(orderDto.getPointAmount());
|
|
|
mtOrder.setUsePoint(orderDto.getUsePoint());
|
|
@@ -531,7 +539,7 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
|
|
|
}
|
|
|
|
|
|
// 扣减积分
|
|
|
- if (orderDto.getUsePoint() > 0) {
|
|
|
+ if (orderDto.getUsePoint() != null && orderDto.getUsePoint() > 0) {
|
|
|
try {
|
|
|
MtPoint reqPointDto = new MtPoint();
|
|
|
reqPointDto.setUserId(orderDto.getUserId());
|