反馈修改

This commit is contained in:
huangzj
2023-08-22 13:34:13 +08:00
parent c77ab6ee3e
commit 4477c2e8c8
4 changed files with 33 additions and 8 deletions

View File

@@ -202,8 +202,8 @@ public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper,
@Override
public String isPrimaryUser(String deviceId) {
String userIndex = RequestUtil.getUserIndex();
CsDeviceUserPO one = this.lambdaQuery().eq(CsDeviceUserPO::getDeviceId, deviceId).eq(CsDeviceUserPO::getStatus,"1" ).eq(CsDeviceUserPO::getPrimaryUserId, userIndex).one();
String number = Objects.isNull(one) ? "0" : "1";
List<CsDeviceUserPO> list = this.lambdaQuery().eq(CsDeviceUserPO::getDeviceId, deviceId).eq(CsDeviceUserPO::getStatus, "1").eq(CsDeviceUserPO::getPrimaryUserId, userIndex).list();
String number = CollectionUtils.isEmpty(list) ? "0" : "1";
return number;
}