|
|
|
@@ -1,7 +1,8 @@ |
|
|
|
package com.iformall.utils; |
|
|
|
package com.iformall.utils.car; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.iformall.utils.MapUtil; |
|
|
|
import org.apache.http.Consts; |
|
|
|
import org.apache.http.HttpEntity; |
|
|
|
import org.apache.http.HttpResponse; |
|
|
|
@@ -267,6 +268,62 @@ public class TJDCarUtil { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
//// TODO |
|
|
|
/** |
|
|
|
* deductionNotSettle 停车费批量抵扣接口 |
|
|
|
* @param url |
|
|
|
* @param partner |
|
|
|
* @param key // 密钥 |
|
|
|
* @param version |
|
|
|
* { |
|
|
|
"service": "parkhub.order.deductionForDetail", |
|
|
|
"partner": "120a565de377427184de35ca0f320764", |
|
|
|
"sign": "3347b109a1e44f3fd5baa78b74a84948", |
|
|
|
"signType": "md5", |
|
|
|
"charset": "utf-8", |
|
|
|
"version": "1.0", |
|
|
|
"timestamp": "2016-05-26 11:30:10", |
|
|
|
"tradeId": "c39d3aac49d04e12a187681e6189f841", |
|
|
|
"accountId": "a9b2963c98344bb292e0fa3f7dd70946", |
|
|
|
"prePayType": "3", |
|
|
|
"giveFreeTimeOut": "false", |
|
|
|
"detailList":"[{ |
|
|
|
},{ |
|
|
|
},{ |
|
|
|
\"outTradeNo\":\"PLDKY01\", \"identityType\":\"01\", \"identityId\":\"17710111111\", \"membershipGrade\":\"LV1\", \"amount\":\"12.50\", \"type\":\"0\", \"channel\":\"5013\", \"memo\":\"批量抵扣-金额-微信\" |
|
|
|
\"outTradeNo\":\"PLDKY02\", \"identityType\":\"01\", \"identityId\":\"17710111111\", \"membershipGrade\":\"LV1\", \"couponType\":\"1\", \"minutes\":\"60\", \"type\":\"1\", \"channel\":\"2204\", \"memo\":\"批量抵扣-时长-会员卡券\" |
|
|
|
\"outTradeNo\":\"PLDKY03\", \"identityType\":\"01\", \"identityId\":\"17710111111\", \"membershipGrade\":\"LV1\", \"couponType\":\"3\", \"startDt\":\"20180901110000\", \"endDt\":\"20180901170000\", \"integral\":\"500\", |
|
|
|
\"type\":\"1\", |
|
|
|
\"channel\":\"2205\", \"memo\":\"批量抵扣-区间-积分-会员补贴\" |
|
|
|
}]" |
|
|
|
} |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
public static String deductionForDetail(String url, String partner, String key, String version, |
|
|
|
String tradeId, String outTradeNo, String accountId, String deductionAmount) { |
|
|
|
// 为指定订单抵扣停车费,如果此时车辆已经出场,返回isSuccess错误码为3,停简单系统不再接收此笔抵扣信息,对方系统 需要给用户发起退款。 |
|
|
|
String service = "parkhub.order.deductionNotSettle"; |
|
|
|
Map<String, String> paramMap = MapUtil.getOrderMap(); |
|
|
|
paramMap.put("tradeId", tradeId); |
|
|
|
paramMap.put("deductionAmount", deductionAmount); |
|
|
|
paramMap.put("outTradeNo", outTradeNo); |
|
|
|
paramMap.put("accountId", accountId); |
|
|
|
paramMap.put("charset", "utf-8"); |
|
|
|
paramMap.put("partner", partner); |
|
|
|
paramMap.put("version", version); |
|
|
|
|
|
|
|
String result = Proc(url, key, service, paramMap); |
|
|
|
/* |
|
|
|
"{\"timestamp\":\"1528534986636\", |
|
|
|
\"returnCode\":\"T\", |
|
|
|
\"prePayId\":\"7a1d52aa77ca487db4e61130394285bd\", |
|
|
|
\"errorMSG\":\"\", |
|
|
|
\"returnMsg\":\"OK\", |
|
|
|
\"isSuccess\":\"0\"}[\\r][\\n]" |
|
|
|
*/ |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* deductionNotSettle 停车费无结算抵扣 |
|
|
|
* @param url |