修改getTransferBotState处理多个
This commit is contained in:
parent
69462bf57a
commit
52e603af7e
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue