|
|
@@ -94,6 +94,7 @@ public class DbBluetoothGatewayController extends BaseController {
|
|
|
@Log(title = "蓝牙网关", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public ResultData<Boolean> edit(@RequestBody DbBluetoothGateway dbBluetoothGateway) {
|
|
|
+ DbBluetoothGateway oldGateway = dbBluetoothGatewayService.selectDbBluetoothGatewayById(dbBluetoothGateway.getId());
|
|
|
dbBluetoothGateway.setGatewayOnline(0);
|
|
|
int flag = dbBluetoothGatewayService.updateDbBluetoothGateway(dbBluetoothGateway);
|
|
|
LambdaQueryWrapper<DbStock> queryWrapper = new LambdaQueryWrapper();
|
|
|
@@ -102,7 +103,7 @@ public class DbBluetoothGatewayController extends BaseController {
|
|
|
for(DbStock stock : list){
|
|
|
redisService.setCacheObject(BaseConstants.BEACON_MATE_DET + "~" + stock.getBeaconTag() + "~" + stock.getSubjectId() + "~" + stock.getGasName(), stock.getBeaconTag(), 120L, TimeUnit.SECONDS);
|
|
|
}
|
|
|
- redisService.deleteObject(BaseConstants.BEACON_MAC+"~"+ dbBluetoothGateway.getGatewayMac());
|
|
|
+ redisService.deleteObject(BaseConstants.BEACON_MAC+"~"+ oldGateway.getGatewayMac());
|
|
|
redisService.deleteObject(BaseConstants.BEACON_SUBMAC);
|
|
|
return ResultData.result(flag);
|
|
|
}
|