Commit 58261a70 by fz

1.车钥匙修改自动感应接口,mac存在就更新蓝牙地址,不存在则新增

1 parent ca5829af
......@@ -227,15 +227,18 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
List<SmartVehicleBlueKey> blueKeys = smartVehicleBlueKeyService.selectByExample(getBlueKeyExampleByUserAndSn(userId, sn));
if (CollectionUtils.isEmpty(blueKeys))
return R.error("车钥匙不存在");
SmartVehicleBlueKey blueKey = blueKeys.get(0);
long carKeyId = blueKey.getId();
long carKeyId = blueKeys.get(0).getId();
//根据车钥匙id查询蓝牙信息
SmartKeyBlueSenseExample example = getBlueSenseExampleByCarKeyID(carKeyId);
//根据车钥匙id,蓝牙查询是否存在
SmartKeyBlueSenseExample example = new SmartKeyBlueSenseExample();
example.createCriteria()
.andCarKeyIdEqualTo(carKeyId)
.andMobileBlueMacEqualTo(mobileMac)
.andIsDeleteEqualTo(0);
List<SmartKeyBlueSense> blueSenseList = smartKeyBlueSenseService.selectByExample(example);
if (CollectionUtils.isEmpty(blueSenseList)) {
//不存在,新增手机蓝牙,感应状态数据
SmartKeyBlueSense blueSense = SmartKeyBlueSense.builder()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!