Merge branch 'master' of codeup.aliyun.com:6428039c708c83a3fd907211/hzwmiot/hzwmiot24_java

This commit is contained in:
wyw 2024-08-16 14:12:01 +08:00
commit 87d2232fcd
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ public class HaiWeiController {
/** /**
* 获取所有水肥设备 * 获取所有海为设备
*/ */
@GetMapping("/devices") @GetMapping("/devices")
@ApiOperation("获取所有海为设备") @ApiOperation("获取所有海为设备")
@ -39,7 +39,7 @@ public class HaiWeiController {
} }
/** /**
* 获取农作物产量统计 * 获取海为设备缓存信息
*/ */
@GetMapping("/cache/{deviceId}") @GetMapping("/cache/{deviceId}")
@ApiOperation("获取海为设备缓存信息") @ApiOperation("获取海为设备缓存信息")
@ -48,7 +48,7 @@ public class HaiWeiController {
} }
/** /**
* grm设备下发指令 * 海为设备下发指令
*/ */
@ApiOperation("向海为设备下发指令") @ApiOperation("向海为设备下发指令")
@PostMapping("/cmd") @PostMapping("/cmd")

View File

@ -225,9 +225,9 @@ public class QxtrTask {
if (deviceLogEntityList.size() > 0) { if (deviceLogEntityList.size() > 0) {
String key = DeviceCacheConstants.getDeviceInsertDb(deviceEntity.getDeviceId()); String key = DeviceCacheConstants.getDeviceInsertDb(deviceEntity.getDeviceId());
Object cacheObject = redisCache.getCacheObject(key); Object cacheObject = redisCache.getCacheObject(key);
//10分钟插入数据库一次 //1分钟插入数据库一次
if (null == cacheObject) { if (null == cacheObject) {
redisCache.setCacheObject(key, 0, 10, TimeUnit.MINUTES); redisCache.setCacheObject(key, 0, 1, TimeUnit.MINUTES);
TdLogDto dto = new TdLogDto(); TdLogDto dto = new TdLogDto();
dto.setSerialNumber(deviceEntity.getSerialNumber()); dto.setSerialNumber(deviceEntity.getSerialNumber());
dto.setList(deviceLogEntityList); dto.setList(deviceLogEntityList);