Browse Source

Merge remote-tracking branch 'origin/master'

yangxiaokun 3 years ago
parent
commit
27ec631949

+ 3 - 3
src/main/java/com/zy/bms/controller/UbiLpWxController.java

@@ -129,7 +129,7 @@ public class UbiLpWxController extends BaseController {
                 .eq("user_id", userId())) == null) {
             userPrivilegeService.save(new UserPrivilege(userId(), device.getGroupId()));
         }
-        return ServerResponse.success(deviceBaseService.getDetailWx(openNum));
+        return ServerResponse.success(device.getType());
     }
 
     /**
@@ -143,8 +143,8 @@ public class UbiLpWxController extends BaseController {
     /**
      * 更新唤醒时间和阈值
      */
-    @PostMapping("update.do")
-    public ServerResponse update(LpInfoState entity) {
+    @PostMapping("updateLp.do")
+    public ServerResponse updateLp(LpInfoState entity) {
         return ServerResponse.success(lpInfoStateService.updateWakeAndThresh(entity));
     }
 

+ 1 - 0
src/main/java/com/zy/bms/service/impl/DeviceBaseServiceImpl.java

@@ -41,6 +41,7 @@ public class DeviceBaseServiceImpl extends ServiceImpl<DeviceBaseMapper, DeviceB
     @Override
     public List listByGroupIdWx(String groupId) {
         String type = baseMapper.getTypeByGroupId(groupId);
+        if (type == null) return null;
         //普适型设备
         if (type.equals(Constant.DEVICE_TYPE.UBI)) {
             return ubiInfoStateService.listByGroupId(groupId);