Merge branch 'pre' into dev

dev-discount
胡锐 3 years ago
commit fd447b24ea
  1. 26
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java

@ -125,19 +125,21 @@ public class CzOrderController {
rechargeOrderRecord = new OutRechargeOrderRecord();
// 查询订单
OutRechargeOrder order = outRechargeOrderService.findByOrderNo(dataObject.getString("out_order_id"));
if (order.getRechargeType() == 1) {
String orderNo = "CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5);
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , orderNo , order.getRechargeType());
if (object.getInteger("code") != 200) {
order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message"));
if (order.getStatus() == 2) {
if (order.getRechargeType() == 1) {
String orderNo = "CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5);
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , orderNo , order.getRechargeType());
if (object.getInteger("code") != 200) {
order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message"));
}
outRechargeOrderService.updateOrder(order);
rechargeOrderRecord.setRechargeOrderId(order.getId());
rechargeOrderRecord.setRechargeOrderNo(orderNo);
rechargeOrderRecord.setCreateTime(new Date());
rechargeOrderRecord.setStatus(1);
rechargeOrderRecordService.insertOrder(rechargeOrderRecord);
}
outRechargeOrderService.updateOrder(order);
rechargeOrderRecord.setRechargeOrderId(order.getId());
rechargeOrderRecord.setRechargeOrderNo(orderNo);
rechargeOrderRecord.setCreateTime(new Date());
rechargeOrderRecord.setStatus(1);
rechargeOrderRecordService.insertOrder(rechargeOrderRecord);
}
} else {
// 查询订单

Loading…
Cancel
Save