修改话费订单导出

袁野 2 years ago
parent eff9736db2
commit cc7d71d29a
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  3. 25
      hai-service/src/main/java/com/hai/service/impl/ApiOpenServiceImpl.java

@ -64,8 +64,6 @@ public class HighOpenApiController {
@Resource
private HuiLianTongConfig huiLianTongConfig;
@Resource
private HighGasOrderPushMapper highGasOrderPushMapper;
@RequestMapping(value = "/getGuizhouSinopecList", method = RequestMethod.GET)
@ResponseBody

File diff suppressed because one or more lines are too long

@ -6,6 +6,7 @@ import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.DateUtil;
import com.hai.common.utils.IDGenerator;
import com.hai.config.CommonSysConst;
import com.hai.config.RechargeConfig;
import com.hai.dao.ApiAmountRecordMapper;
import com.hai.dao.OutRechargeOrderMapper;
@ -173,8 +174,26 @@ public class ApiOpenServiceImpl implements ApiOpenService {
outRechargeChildOrderService.updateOrder(childOrder);
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();
String orderNo = "CZ" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5);
@ -183,10 +202,11 @@ public class ApiOpenServiceImpl implements ApiOpenService {
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("amount", apiProduct.getRechargePrice());
object.put("mobile", outRechargeOrder.getRechargeContent());
object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl());
if (apiProduct.getRechargeType() == 1) {
object.put("is_fast", 1);
}
@ -200,10 +220,11 @@ public class ApiOpenServiceImpl implements ApiOpenService {
rechargePlatformType = 1;
break;
}
if (s.equals("2") && (type == 1 || type == 0)) {
if (s.equals("2") && type == 2) {
object.put("out_trade_num", orderNo);
object.put("product_id", apiProduct.getProductId());
object.put("mobile", outRechargeOrder.getRechargeContent());
object.put("notifyUrl", CommonSysConst.getSysConfig().getLyNotifyUrl());
JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object);
object.put("return_content", returnObject);
if (returnObject != null && returnObject.getLong("errno") == 0) {

Loading…
Cancel
Save