From 52e603af7e8faa10fa8b6a24dc1cfca9866a6c4a Mon Sep 17 00:00:00 2001 From: 623756217 <623756217@qq.com> Date: Wed, 8 Mar 2023 16:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9getTransferBotState=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gitlink/softbot/service/user/impl/UserService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java b/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java index f01b2f2..cdd0a0f 100644 --- a/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java +++ b/src/main/java/com/gitlink/softbot/service/user/impl/UserService.java @@ -891,9 +891,11 @@ public class UserService extends AbstractUserBot implements IUserService { @Override public GetTransferFromBotResponse getTransferBotState(GetTransferFromBotRequest getTransferFromBotRequest) { - TransferBot transferBot = transferBotMapper.selectOne(new QueryWrapper() - .eq("bot_id",getTransferFromBotRequest.getBotId()) - .eq("transfer_from_id",getTransferFromBotRequest.getUserId())); + List transferBots = transferBotMapper.selectList(Wrappers.lambdaQuery() + .eq(TransferBot::getBotId,getTransferFromBotRequest.getBotId()) + .eq(TransferBot::getTransferFromId,getTransferFromBotRequest.getUserId()) + .orderByDesc(TransferBot::getId)); + TransferBot transferBot = transferBots.get(0); GetTransferFromBotResponse getTransferFromBotResponse = new GetTransferFromBotResponse(); getTransferFromBotResponse.setBotId(getTransferFromBotRequest.getBotId()); getTransferFromBotResponse.setUserId(getTransferFromBotRequest.getUserId());