Commit d90b8c5a by wubh

包活干V2.3.0-修改设备校验方式

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@30390 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 6222aa19
......@@ -63,11 +63,10 @@ public class MsDeviceServiceImpl implements MsDeviceService {
String checkMessage;
JSONObject msResp = MsSignUtil.postForObject(api, data);
Integer respCode = msResp.getInteger("code");
Integer respStatus = msResp.getInteger("status");
String respMsg = msResp.getString("message");
JSONObject respData = msResp.getJSONObject("data");
if (respCode == ResultCodeEnum.SUCCESS.getCode() && respStatus == 200) {
if (respCode == ResultCodeEnum.SUCCESS.getCode()) {
// 定位正常,判断是否在时效内
boolean locationValid = this.isDeviceLocationValid(respData);
checkMessage = locationValid ? "" : ResultCodeEnum.DEVICE_GPS_VERIFY_FAIL.getMsg();
......@@ -89,7 +88,7 @@ public class MsDeviceServiceImpl implements MsDeviceService {
boolean locationValid;
try {
JSONObject innerData = respData.getJSONObject("data");
JSONObject innerData = respData.getJSONObject("data").getJSONObject("data");
Long gpsTime = innerData.getLong("gpsTime");
Integer type = innerData.getInteger("type");
long currentMs = new Date().getTime();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!