|
|
|
@@ -8,6 +8,7 @@ import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.vo.WxCouponOrderCarCVo; |
|
|
|
import com.iformall.domain.vo.WxMerchantVo; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.ETCPUtil; |
|
|
|
@@ -600,14 +601,8 @@ public class WxCarController extends BaseController { |
|
|
|
return new ResultData(ErrorCode.CAR_VENDOR_NOT_SUPPORT.getCode(), "停车费抵扣失败"); |
|
|
|
} |
|
|
|
|
|
|
|
private String getETCPBusinessID(String merchantIdStr) { |
|
|
|
private String getETCPBusinessID(Long merchantId) { |
|
|
|
String businessId; |
|
|
|
Long merchantId = 0L; |
|
|
|
try { |
|
|
|
merchantId = Long.valueOf(merchantIdStr); |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
logger.error(e.getMessage()); |
|
|
|
} |
|
|
|
WxMerchant wxMerchant = wxMerchantService.getById(merchantId); |
|
|
|
String carParams = wxMerchant.getCarParams(); |
|
|
|
JSONObject objParams1 = JSON.parseObject(carParams); |
|
|
|
@@ -665,8 +660,14 @@ public class WxCarController extends BaseController { |
|
|
|
String merchantKey = objParams.getString("merchantKey"); |
|
|
|
String version = objParams.getString("version"); |
|
|
|
String businessId = ""; |
|
|
|
// 获取merchantId |
|
|
|
WxMerchantVo merchantVo = null; |
|
|
|
if(userCar.getMerchantVoList().size() > 0) { |
|
|
|
merchantVo = userCar.getMerchantVoList().get(0); |
|
|
|
} |
|
|
|
|
|
|
|
// 优先从从商户表里取 |
|
|
|
businessId = getETCPBusinessID(String.valueOf(userCar.getMerchantId())); |
|
|
|
businessId = getETCPBusinessID(merchantVo.getId()); |
|
|
|
if (StringUtils.isBlank(businessId)) { |
|
|
|
// 1期只有一个虚拟商户,可以写在商场配置里 |
|
|
|
businessId = objParams.getString("businessId"); |
|
|
|
|