Skip to content

Commit

Permalink
修复旧版本数据冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Jun 7, 2022
1 parent 7ada5f0 commit c076321
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 c076321

Please sign in to comment.