|
|
@ -6,6 +6,7 @@ import com.hai.common.exception.ErrorHelp; |
|
|
|
import com.hai.common.exception.SysCode; |
|
|
|
import com.hai.common.exception.SysCode; |
|
|
|
import com.hai.common.utils.DateUtil; |
|
|
|
import com.hai.common.utils.DateUtil; |
|
|
|
import com.hai.common.utils.IDGenerator; |
|
|
|
import com.hai.common.utils.IDGenerator; |
|
|
|
|
|
|
|
import com.hai.config.CommonSysConst; |
|
|
|
import com.hai.config.RechargeConfig; |
|
|
|
import com.hai.config.RechargeConfig; |
|
|
|
import com.hai.dao.ApiAmountRecordMapper; |
|
|
|
import com.hai.dao.ApiAmountRecordMapper; |
|
|
|
import com.hai.dao.OutRechargeOrderMapper; |
|
|
|
import com.hai.dao.OutRechargeOrderMapper; |
|
|
@ -173,8 +174,26 @@ public class ApiOpenServiceImpl implements ApiOpenService { |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
type = childOrder.getRechargePlatform(); |
|
|
|
type = childOrder.getRechargePlatform(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 查询充值子订单
|
|
|
|
|
|
|
|
Map<String, Object> childOrderMap103 = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
childOrderMap.put("parent_order_id", outRechargeOrder.getId()); |
|
|
|
|
|
|
|
childOrderMap.put("status", 103); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<OutRechargeChildOrder> childOrderList103 = outRechargeChildOrderService.getListRechargeChildOrder(childOrderMap103); |
|
|
|
|
|
|
|
if (childOrderList103.size() > 0) { |
|
|
|
|
|
|
|
type = childOrderList103.get(0).getRechargePlatform(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == 2) { |
|
|
|
|
|
|
|
type = 1; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
type++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject object = new JSONObject(); |
|
|
|
JSONObject object = new JSONObject(); |
|
|
|
|
|
|
|
|
|
|
|
String orderNo = "CZ" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5); |
|
|
|
String orderNo = "CZ" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5); |
|
|
@ -183,10 +202,11 @@ public class ApiOpenServiceImpl implements ApiOpenService { |
|
|
|
|
|
|
|
|
|
|
|
for (String s : rechargePlatform) { |
|
|
|
for (String s : rechargePlatform) { |
|
|
|
// 尖椒充值
|
|
|
|
// 尖椒充值
|
|
|
|
if (s.equals("1") && (type == 2 || type == 0)) { |
|
|
|
if (s.equals("1") && type == 1) { |
|
|
|
object.put("out_order_id", orderNo); |
|
|
|
object.put("out_order_id", orderNo); |
|
|
|
object.put("amount", apiProduct.getRechargePrice()); |
|
|
|
object.put("amount", apiProduct.getRechargePrice()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
|
|
|
|
object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); |
|
|
|
if (apiProduct.getRechargeType() == 1) { |
|
|
|
if (apiProduct.getRechargeType() == 1) { |
|
|
|
object.put("is_fast", 1); |
|
|
|
object.put("is_fast", 1); |
|
|
|
} |
|
|
|
} |
|
|
@ -200,10 +220,11 @@ public class ApiOpenServiceImpl implements ApiOpenService { |
|
|
|
rechargePlatformType = 1; |
|
|
|
rechargePlatformType = 1; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if (s.equals("2") && (type == 1 || type == 0)) { |
|
|
|
if (s.equals("2") && type == 2) { |
|
|
|
object.put("out_trade_num", orderNo); |
|
|
|
object.put("out_trade_num", orderNo); |
|
|
|
object.put("product_id", apiProduct.getProductId()); |
|
|
|
object.put("product_id", apiProduct.getProductId()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
object.put("mobile", outRechargeOrder.getRechargeContent()); |
|
|
|
|
|
|
|
object.put("notifyUrl", CommonSysConst.getSysConfig().getLyNotifyUrl()); |
|
|
|
JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); |
|
|
|
JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); |
|
|
|
object.put("return_content", returnObject); |
|
|
|
object.put("return_content", returnObject); |
|
|
|
if (returnObject != null && returnObject.getLong("errno") == 0) { |
|
|
|
if (returnObject != null && returnObject.getLong("errno") == 0) { |
|
|
|