|
|
|
@@ -8,6 +8,7 @@ import com.simple.common.Result; |
|
|
|
import com.simple.common.ResultData; |
|
|
|
import com.simple.domain.po.*; |
|
|
|
import com.simple.enums.EnumCarVendor; |
|
|
|
import com.simple.enums.EnumETCPCode; |
|
|
|
import com.simple.service.WxCUserCarService; |
|
|
|
import com.simple.service.WxMerchantService; |
|
|
|
import com.simple.service.WxParkService; |
|
|
|
@@ -93,7 +94,7 @@ public class WxCarController extends BaseController |
|
|
|
|
|
|
|
String ret = etcp.userSignin(url, appId, merchantNo, merchantKey, version, phone); |
|
|
|
JSONObject retObj = JSON.parseObject(ret); |
|
|
|
if (retObj.getIntValue("code") == 0) { |
|
|
|
if (retObj.getIntValue("code") == EnumETCPCode.SUCCESS.getCode()) { |
|
|
|
// 获取绑定的车牌 |
|
|
|
JSONObject dataObj = retObj.getJSONObject("data"); |
|
|
|
String etcpToken = dataObj.getString("token"); |
|
|
|
@@ -114,6 +115,18 @@ public class WxCarController extends BaseController |
|
|
|
return new ResultData(ErrorCode.CAR_VENDOR_NOT_SUPPORT.getCode(), "登录失败"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 同步 |
|
|
|
* @param cUserId |
|
|
|
* @param tenantId |
|
|
|
* @param iVendorType |
|
|
|
* @param url |
|
|
|
* @param merchantNo |
|
|
|
* @param merchantKey |
|
|
|
* @param version |
|
|
|
* @param etcpToken |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private JSONObject syncCarNumbers(Long cUserId, String tenantId, int iVendorType, |
|
|
|
String url, String merchantNo, String merchantKey, String version, |
|
|
|
String etcpToken) { |
|
|
|
@@ -586,10 +599,10 @@ public class WxCarController extends BaseController |
|
|
|
String ret = etcp.bCouponRecord(url, merchantNo, merchantKey, version, |
|
|
|
etcpToken, parkId, businessId, carNumber, couponFreeId); |
|
|
|
JSONObject retObj = JSON.parseObject(ret); |
|
|
|
if (retObj.getIntValue("code") == 0) { |
|
|
|
if (retObj.getIntValue("code") == EnumETCPCode.SUCCESS.getCode()) { |
|
|
|
return new ResultData(); |
|
|
|
} else { |
|
|
|
return new ResultData(ErrorCode.ETCP_QUAN_SEND_FAIL.getCode(), "优免券领取失败"); |
|
|
|
return new ResultData(ErrorCode.ETCP_QUAN_SEND_FAIL.getCode(), retObj.getString("message")); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(ErrorCode.CAR_VENDOR_NOT_SUPPORT.getCode(), "优免券领取失败"); |
|
|
|
|