谭斌 2 роки тому
батько
коміт
f1baa1b972

+ 2 - 2
device-api-service-merc-mini/src/main/java/com/xy/controller/MercMiniDeviceController.java

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