修改getTransferBotState处理多个

This commit is contained in:
623756217 2023-03-08 16:22:09 +08:00
parent 69462bf57a
commit 52e603af7e
1 changed files with 5 additions and 3 deletions

View File

@ -891,9 +891,11 @@ public class UserService extends AbstractUserBot implements IUserService {
@Override
public GetTransferFromBotResponse getTransferBotState(GetTransferFromBotRequest getTransferFromBotRequest) {
TransferBot transferBot = transferBotMapper.selectOne(new QueryWrapper<TransferBot>()
.eq("bot_id",getTransferFromBotRequest.getBotId())
.eq("transfer_from_id",getTransferFromBotRequest.getUserId()));
List<TransferBot> transferBots = transferBotMapper.selectList(Wrappers.<TransferBot>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());