|
|
|
@@ -11,6 +11,7 @@ import com.iformall.domain.vo.WxCouponCarVo; |
|
|
|
import com.iformall.enums.EnumCarVendor; |
|
|
|
import com.iformall.enums.EnumCouponStatus; |
|
|
|
import com.iformall.enums.EnumETCPCode; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.ETCPUtil; |
|
|
|
import com.iformall.utils.TJDCarUtil; |
|
|
|
@@ -148,7 +149,13 @@ public class WxCarController extends BaseController { |
|
|
|
// 1期只有一个虚拟商户,可以写在商场配置里 |
|
|
|
businessId = objParams.getString("businessId"); |
|
|
|
} |
|
|
|
String ret = etcp.getBCouponList(url, merchantNo, merchantKey, version, parkId, businessId); |
|
|
|
String ret = ""; |
|
|
|
try { |
|
|
|
ret = etcp.getBCouponList(url, merchantNo, merchantKey, version, parkId, businessId); |
|
|
|
} catch (MallinkException e) { |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
if (ret == null) { |
|
|
|
logger.error("quanTemplate failed, 优免券模板未发现"); |
|
|
|
return new ResultData(ErrorCode.ETCP_CMD_FAIL.getCode(), "获取优免券模板异常"); |
|
|
|
@@ -300,6 +307,7 @@ public class WxCarController extends BaseController { |
|
|
|
String version = objParams.getString("version"); |
|
|
|
if (park.getParkingId() == null) { |
|
|
|
// those code is not supported |
|
|
|
/* |
|
|
|
String lat = objParams.getString("lat"); |
|
|
|
String lon = objParams.getString("lon"); |
|
|
|
String radius = objParams.getString("radius"); |
|
|
|
@@ -323,10 +331,18 @@ public class WxCarController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
} |
|
|
|
|
|
|
|
if (park.getParkingId() != null) { |
|
|
|
String ret = etcp.parkingStatus(url, merchantNo, merchantKey, version, park.getParkingId()); |
|
|
|
String ret = ""; |
|
|
|
try { |
|
|
|
ret = etcp.parkingStatus(url, merchantNo, merchantKey, version, park.getParkingId()); |
|
|
|
} catch (MallinkException e) { |
|
|
|
logger.error("ETCP failed: " + e.getMessage()); |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
JSONObject retObj = JSON.parseObject(ret); |
|
|
|
if (retObj.getIntValue("code") == EnumETCPCode.SUCCESS.getCode()) { |
|
|
|
if (retObj.get("data") != null) { |
|
|
|
|