Skip to content

Commit

Permalink
Merge pull request #210 from SonicCloudOrg/dev
Browse files Browse the repository at this point in the history
修复旧版本数据冲突
  • Loading branch information
ZhouYixun authored Jun 7, 2022
2 parents db74323 + c076321 commit 807e157
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,22 @@ public List<Devices> findByIdIn(List<Integer> ids) {

@Override
public Devices findByAgentIdAndUdId(int agentId, String udId) {
return lambdaQuery().eq(Devices::getAgentId, agentId).eq(Devices::getUdId, udId).one();
List<Devices> devicesList = lambdaQuery().eq(Devices::getAgentId, agentId).eq(Devices::getUdId, udId).list();
if (devicesList.size() > 0) {
return devicesList.get(0);
} else {
return null;
}
}

@Override
public Devices findByUdId(String udId) {
return lambdaQuery().eq(Devices::getUdId, udId).one();
List<Devices> devicesList = lambdaQuery().eq(Devices::getUdId, udId).list();
if (devicesList.size() > 0) {
return devicesList.get(0);
} else {
return null;
}
}

@Override
Expand Down

0 comments on commit 807e157

Please sign in to comment.