|
|
@@ -155,8 +155,8 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public Boolean deviceUnBind(Long userId, String clientId) {
|
|
|
- List<DevInfo> devInfos = devInfoService.queryDevices(userId, deviceId);
|
|
|
+ public Boolean deviceUnBind(Long userId, String devId) {
|
|
|
+ List<DevInfo> devInfos = devInfoService.queryDevices(userId, devId);
|
|
|
boolean updateFlag;
|
|
|
// 绑定人解绑
|
|
|
if (CollectionUtils.isNotEmpty(devInfos) && !devInfos.isEmpty()) {
|
|
|
@@ -164,13 +164,13 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
boolean flag = devInfoService.update(null,
|
|
|
Wrappers.<DevInfo>lambdaUpdate()
|
|
|
.set(DevInfo::getUserId, null)
|
|
|
- .eq(DevInfo::getDevId, clientId));
|
|
|
+ .eq(DevInfo::getDevId, devId));
|
|
|
//更新设备分享表
|
|
|
boolean flagV2 = devShareService.update(null,
|
|
|
Wrappers.<DevShare>lambdaUpdate()
|
|
|
.set(DevShare::getState, 0)
|
|
|
.set(DevShare::getIsDeleted, 1)
|
|
|
- .eq(DevShare::getClientId, clientId));
|
|
|
+ .eq(DevShare::getDevId,devId));
|
|
|
updateFlag = flag && flagV2;
|
|
|
} else {
|
|
|
// 被分享者解绑
|
|
|
@@ -178,7 +178,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
Wrappers.<DevShare>lambdaUpdate()
|
|
|
.set(DevShare::getState, 0)
|
|
|
.set(DevShare::getIsDeleted, 1)
|
|
|
- .eq(DevShare::getClientId, clientId)
|
|
|
+ .eq(DevShare::getDevId, devId)
|
|
|
.eq(DevShare::getSharedUserId, userId));
|
|
|
}
|
|
|
|