|
@@ -207,7 +207,7 @@ public class MercMiniDeviceController {
|
|
Long deviceId = dto.getDeviceId();
|
|
Long deviceId = dto.getDeviceId();
|
|
List<Long> myDevices = getMyDevices();
|
|
List<Long> myDevices = getMyDevices();
|
|
if (!myDevices.contains(deviceId)) {
|
|
if (!myDevices.contains(deviceId)) {
|
|
- R.fail("抱歉!您无权对此设备进行授权!");
|
|
|
|
|
|
+ return R.fail("抱歉!您无权对此设备进行授权!");
|
|
}
|
|
}
|
|
Long mercId = MercAuthUtils.getMercId();
|
|
Long mercId = MercAuthUtils.getMercId();
|
|
DeviceBluetoothAuth deviceBluetoothAuth = deviceBluetoothAuthService.getOne(Wrappers.<DeviceBluetoothAuth>lambdaQuery()
|
|
DeviceBluetoothAuth deviceBluetoothAuth = deviceBluetoothAuthService.getOne(Wrappers.<DeviceBluetoothAuth>lambdaQuery()
|
|
@@ -218,7 +218,7 @@ public class MercMiniDeviceController {
|
|
String cacheAuthCode = getCacheAuthCode(deviceId);
|
|
String cacheAuthCode = getCacheAuthCode(deviceId);
|
|
if (deviceBluetoothAuth != null) {
|
|
if (deviceBluetoothAuth != null) {
|
|
if (StrUtil.isNotEmpty(cacheAuthCode)) {
|
|
if (StrUtil.isNotEmpty(cacheAuthCode)) {
|
|
- R.fail("此设备尚有未使用的授权码:【" + cacheAuthCode + "】,请使用后再来生成!");
|
|
|
|
|
|
+ return R.fail("此设备尚有未使用的授权码:【" + cacheAuthCode + "】,请使用后再来生成!");
|
|
} else {
|
|
} else {
|
|
//已失效了
|
|
//已失效了
|
|
deviceBluetoothAuthService.saveOrUpdate(deviceBluetoothAuth.setUseStatus(DeviceAuthCodeUseStatus.TIME_OUT.getCode()));
|
|
deviceBluetoothAuthService.saveOrUpdate(deviceBluetoothAuth.setUseStatus(DeviceAuthCodeUseStatus.TIME_OUT.getCode()));
|