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