|
@@ -66,7 +66,8 @@ public class ParkingRecordController {
|
|
|
*/
|
|
|
@PostMapping("receiveDeviceInfo")
|
|
|
public JSONObject receiveDeviceInfo(String device_name, String ipaddr, String port, String user_name, String pass_wd, String serialno, String channel_num) {
|
|
|
-
|
|
|
+ long start = System.currentTimeMillis();
|
|
|
+ log.warn("设备轮询开始时间:{}", start);
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
try {
|
|
|
if (valueOperations.setIfAbsent("comet_" + serialno, true, 2, TimeUnit.MINUTES)) {
|
|
@@ -90,7 +91,9 @@ public class ParkingRecordController {
|
|
|
} catch (Exception ex) {
|
|
|
log.error(ex.getMessage(), ex);
|
|
|
}
|
|
|
-
|
|
|
+ long end = System.currentTimeMillis();
|
|
|
+ log.warn("设备轮询结束时间:{}", end);
|
|
|
+ log.warn("设备轮询耗时:{}", end-start);
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|