|
|
|
@ -179,6 +179,26 @@ public class YltControllerForWx {
|
|
|
|
|
//记录到数据库中闸机的流水记录
|
|
|
|
|
ym.recordDzLog(order_no, charge_plate_no, jo.toString(), result);
|
|
|
|
|
return ResultVO.success(JSONObject.parseObject(result));
|
|
|
|
|
} else if ("安快I".equals(name)) {
|
|
|
|
|
JSONObject jo = new JSONObject();
|
|
|
|
|
jo.put("parkNo", parkId);
|
|
|
|
|
jo.put("plate", charge_plate_no);//车牌号
|
|
|
|
|
jo.put("plate_color", 5);//车牌颜色,绿色
|
|
|
|
|
jo.put("coupon_type", 1);//1固定时长券
|
|
|
|
|
jo.put("couponName", "充电减免");
|
|
|
|
|
jo.put("coupon_value", freeTime);//卷面值 分钟 | 分
|
|
|
|
|
jo.put("appid", appId);//应用编号
|
|
|
|
|
jo.put("ts", System.currentTimeMillis() / 1000);//时间戳
|
|
|
|
|
jo.put("sign", SignUtils.paramsAnKuaiSign(jo, appSecret));//签名
|
|
|
|
|
// 发送 POST 请求并获取响应
|
|
|
|
|
String result = HttpUtil.createPost(url)
|
|
|
|
|
.body(jo.toString()) // 将 JSON 对象转换为字符串作为请求正文
|
|
|
|
|
.header("version", "1.0.0")
|
|
|
|
|
.header("Content-Type", "application/json") // 设置请求头,指明内容类型为 JSON
|
|
|
|
|
.execute().body(); // 发送请求并获取响应体
|
|
|
|
|
//记录到数据库中闸机的流水记录
|
|
|
|
|
ym.recordDzLog(order_no, charge_plate_no, jo.toString(), result);
|
|
|
|
|
return ResultVO.success(JSONObject.parseObject(result));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|