|
|
|
@@ -75,7 +75,7 @@ public class HaiKangWeiShiV3Util { |
|
|
|
return config; |
|
|
|
} |
|
|
|
|
|
|
|
public String callPostApi(ArtemisConfig config,String api,Map<String, String> paramMap) throws Exception { |
|
|
|
public String callPostApiWithMap(ArtemisConfig config,String api,Map<String, String> paramMap) throws Exception { |
|
|
|
final String getCamsApi = ARTEMIS_PATH + api; |
|
|
|
String body = null; |
|
|
|
if (null != paramMap) { |
|
|
|
@@ -124,7 +124,7 @@ public class HaiKangWeiShiV3Util { |
|
|
|
params.put("plateNo", carNumber); |
|
|
|
params.put("parkSyscode", wxPark.getParkingId()); |
|
|
|
try { |
|
|
|
String retCode = callPostApi(config,QUERY_PRICE, params); |
|
|
|
String retCode = callPostApiWithMap(config,QUERY_PRICE, params); |
|
|
|
if (StringUtils.isBlank(retCode)) { |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "haikangv3 getCarStopInfo error. has no result"); |
|
|
|
} |
|
|
|
@@ -179,6 +179,32 @@ public class HaiKangWeiShiV3Util { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//查询车场列表 |
|
|
|
public String queryParkList(ArtemisConfig config) { |
|
|
|
try { |
|
|
|
String retCode = callPostApi(config,"/api/resource/v1/park/parkList", null); |
|
|
|
return retCode; |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("haikangweishiv3 queryParkList error.",e); |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "haikangv3 queryParkList error."+e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//查询优惠规则列表 |
|
|
|
public String queryRuleList(ArtemisConfig config,String parkSyscode) { |
|
|
|
JSONObject ob = new JSONObject(); |
|
|
|
ob.put("pageNo", 1); |
|
|
|
ob.put("pageSize", 10); |
|
|
|
ob.put("parkSyscode", parkSyscode); |
|
|
|
try { |
|
|
|
String retCode = callPostApi(config,"/api/pms/v1/reductRule/search", JSON.toJSONString(ob)); |
|
|
|
return retCode; |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("haikangweishiv3 queryRuleList error.",e); |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "haikangv3 queryRuleList error."+e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 支付成功通知车场 |
|
|
|
* @param wxPark |
|
|
|
@@ -189,11 +215,11 @@ public class HaiKangWeiShiV3Util { |
|
|
|
public JSONObject notifyPaid(WxPark wxPark,String parkOrderNo,Integer fee,ArtemisConfig config) { |
|
|
|
String vendroParams = wxPark.getVendorParams(); |
|
|
|
JSONObject vp = JSON.parseObject(vendroParams); |
|
|
|
Map param = new HashMap(); |
|
|
|
Map<String,String> param = new HashMap<String,String>(); |
|
|
|
param.put("billSyscode", parkOrderNo);//商户编号 |
|
|
|
|
|
|
|
try { |
|
|
|
String retCode = callPostApi(config,NOTIFY_PAID, param); |
|
|
|
String retCode = callPostApiWithMap(config,NOTIFY_PAID, param); |
|
|
|
if (StringUtils.isBlank(retCode)) { |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "haikangv3 notifyPaid error. has no result"); |
|
|
|
} |
|
|
|
|