|
|
|
@@ -191,31 +191,37 @@ public class WxCarHaiKangWeiShiCallBackController extends WxParkCallBackBaseCont |
|
|
|
*/ |
|
|
|
@PostMapping(value = "/notify") |
|
|
|
public Map notify(@RequestBody Map<String, Object> paramMap) { |
|
|
|
log.info("["+getIpAddr()+"] hkwsCarCallback notify: " + paramMap.toString()); |
|
|
|
|
|
|
|
Map params = (Map)paramMap.get("params"); |
|
|
|
String eventType = params.get("eventType").toString(); |
|
|
|
Result result = null; |
|
|
|
if ("771760131".equals(eventType)) { |
|
|
|
//解析车易付参数 |
|
|
|
result = super.parkInCallBack(EnumCarVendor.CAR_HAIKANGWEISHI, EnumCarCmd.CAR_HAIKANGWEISHI_CALLBACK_PARK_IN, paramMap); |
|
|
|
}else if ("771760134".equals(eventType)) { |
|
|
|
result = super.parkOutCallBack(EnumCarVendor.CAR_HAIKANGWEISHI, EnumCarCmd.CAR_HAIKANGWEISHI_CALLBACK_PARK_OUT, paramMap); |
|
|
|
} |
|
|
|
Map retMap = new HashMap(); |
|
|
|
int errcode = 0; |
|
|
|
String msg = "success"; |
|
|
|
if (null != result) { |
|
|
|
if (result.code != Result.SUCCESS) { |
|
|
|
errcode = result.code; |
|
|
|
msg = result.message; |
|
|
|
} |
|
|
|
}else { |
|
|
|
errcode = Result.ERROR; |
|
|
|
msg = "no result.eventType["+eventType+"]"; |
|
|
|
} |
|
|
|
retMap.put("errcode", errcode); |
|
|
|
retMap.put("errmsg", msg); |
|
|
|
Map retMap = new HashMap(); |
|
|
|
try { |
|
|
|
log.info("["+getIpAddr()+"] hkwsCarCallback notify: " + paramMap.toString()); |
|
|
|
|
|
|
|
Map params = (Map)paramMap.get("params"); |
|
|
|
String eventType = params.get("eventType").toString(); |
|
|
|
Result result = null; |
|
|
|
if ("771760131".equals(eventType)) { |
|
|
|
//解析车易付参数 |
|
|
|
result = super.parkInCallBack(EnumCarVendor.CAR_HAIKANGWEISHI, EnumCarCmd.CAR_HAIKANGWEISHI_CALLBACK_PARK_IN, paramMap); |
|
|
|
}else if ("771760134".equals(eventType)) { |
|
|
|
result = super.parkOutCallBack(EnumCarVendor.CAR_HAIKANGWEISHI, EnumCarCmd.CAR_HAIKANGWEISHI_CALLBACK_PARK_OUT, paramMap); |
|
|
|
} |
|
|
|
|
|
|
|
int errcode = 0; |
|
|
|
String msg = "success"; |
|
|
|
if (null != result) { |
|
|
|
if (result.code != Result.SUCCESS) { |
|
|
|
errcode = result.code; |
|
|
|
msg = result.message; |
|
|
|
} |
|
|
|
}else { |
|
|
|
errcode = Result.ERROR; |
|
|
|
msg = "no result.eventType["+eventType+"]"; |
|
|
|
} |
|
|
|
retMap.put("errcode", errcode); |
|
|
|
retMap.put("errmsg", msg); |
|
|
|
} catch(Exception e) { |
|
|
|
retMap.put("errcode", Result.ERROR); |
|
|
|
retMap.put("errmsg", "notify error."+e.getLocalizedMessage()); |
|
|
|
} |
|
|
|
retMap.put("data", null); |
|
|
|
return retMap; |
|
|
|
} |
|
|
|
|