提交2。0代码

dev-discount
袁野 2 years ago
parent 94569a95f0
commit 4a540ae44b
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 31
      hai-order/src/main/java/com/web/controller/business/OrderTelChargeCallbackController.java
  3. 48
      hai-order/src/main/java/com/web/controller/notify/MobileRechargeNotifyController.java
  4. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  5. 17
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

File diff suppressed because one or more lines are too long

@ -93,13 +93,7 @@ public class OrderTelChargeCallbackController {
}).start();
}
childOrder.setStatus(101);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
// api商户订单
if (rechargeOrder.getPayType() == 6) {
@ -156,14 +150,7 @@ public class OrderTelChargeCallbackController {
highUser.getOpenId());
}).start();
}
childOrder.setStatus(101);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
rechargeOrder.setFinishTime(new Date());
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
// todo 代理商话费回调
// if (rechargeOrder.getPayType() == 6) {
// apiOrderRecord(rechargeOrder);
@ -221,20 +208,6 @@ public class OrderTelChargeCallbackController {
}
// 订单完成操作
private void orderFinish(OutRechargeOrder rechargeOrder) {
HighOrder highOrder = highOrderService.getOrderByOrderNo(rechargeOrder.getOrderNo());
if (highOrder != null) {
highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setFinishTime(new Date());
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) {
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
highChildOrder.setFinishTime(new Date());
}
orderService.updateOrderData(highOrder);
}
}
private void apiOrderRecord(OutRechargeOrder rechargeOrder) {
Map<String, Object> orderMap = new HashMap<>();

@ -86,18 +86,7 @@ public class MobileRechargeNotifyController {
}).start();
}
childOrder.setStatus(101);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
// api商户订单
if (rechargeOrder.getPayType() == 6) {
apiOrderRecord(rechargeOrder);
}
outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
} else {
// 充值失败操作
@ -149,17 +138,7 @@ public class MobileRechargeNotifyController {
highUser.getOpenId());
}).start();
}
childOrder.setStatus(101);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
rechargeOrder.setFinishTime(new Date());
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
if (rechargeOrder.getPayType() == 6) {
apiOrderRecord(rechargeOrder);
}
outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
} else {
callbackResult(childOrder , rechargeOrder);
}
@ -234,13 +213,7 @@ public class MobileRechargeNotifyController {
}).start();
}
childOrder.setStatus(101);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);
orderFinish(rechargeOrder);
outRechargeOrderService.completeOrder(rechargeOrder , childOrder);
// api商户订单
// if (rechargeOrder.getPayType() == 6) {
@ -302,21 +275,6 @@ public class MobileRechargeNotifyController {
}
// 订单完成操作
private void orderFinish(OutRechargeOrder rechargeOrder) {
HighOrder highOrder = highOrderService.getOrderByOrderNo(rechargeOrder.getOrderNo());
if (highOrder != null) {
highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setFinishTime(new Date());
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) {
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
highChildOrder.setFinishTime(new Date());
}
orderService.updateOrderData(highOrder);
}
}
private void apiOrderRecord(OutRechargeOrder rechargeOrder) {
Map<String, Object> orderMap = new HashMap<>();
orderMap.put("orderId" , rechargeOrder.getId());

@ -865,7 +865,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE6.getNumber());
childOrder.setGoodsId(goodsId);
childOrder.setGoodsName(OperatorEnum.getNameByType(outRechargePrice.getOperatorType()) + "话费充值" + outRechargePrice.getRechargePrice() + "元");
childOrder.setGoodsName(rechargeContent + OperatorEnum.getNameByType(outRechargePrice.getOperatorType()) + "话费充值" + outRechargePrice.getRechargePrice() + "元");
childOrder.setGoodsSpecName(outRechargePrice.getRechargePrice() + "元");
childOrder.setGoodsPrice(outRechargePrice.getRechargePrice());
childOrder.setGoodsActualPrice(outRechargePrice.getPayPrice());

@ -17,12 +17,10 @@ import com.hai.dao.HighOrderMapper;
import com.hai.dao.OutRechargeOrderMapper;
import com.hai.dao.OutRechargeOrderMapperExt;
import com.hai.entity.*;
import com.hai.enum_type.DiscountUseScope;
import com.hai.enum_type.OperatorEnum;
import com.hai.enum_type.OrderPushType;
import com.hai.enum_type.RechargePayType;
import com.hai.enum_type.*;
import com.hai.model.*;
import com.hai.order.service.OrderService;
import com.hai.order.type.OrderChildStatus;
import com.hai.order.type.OrderRefundOpUserType;
import com.hai.service.*;
import com.hai.service.pay.impl.GoodsOrderServiceImpl;
@ -1044,6 +1042,17 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
order.setPayStatus(100);
order.setFinishTime(new Date());
HighOrder highOrder = highOrderService.getOrderByOrderNo(order.getOrderNo());
if (highOrder != null) {
highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setFinishTime(new Date());
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) {
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
highChildOrder.setFinishTime(new Date());
}
orderService.updateOrderData(highOrder);
}
outRechargeOrderService.updateOrder(order);
outRechargeChildOrderService.updateOrder(childOrder);
}

Loading…
Cancel
Save