修改getTransferBotState处理多个
This commit is contained in:
parent
69462bf57a
commit
52e603af7e
|
@ -891,9 +891,11 @@ public class UserService extends AbstractUserBot implements IUserService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GetTransferFromBotResponse getTransferBotState(GetTransferFromBotRequest getTransferFromBotRequest) {
|
public GetTransferFromBotResponse getTransferBotState(GetTransferFromBotRequest getTransferFromBotRequest) {
|
||||||
TransferBot transferBot = transferBotMapper.selectOne(new QueryWrapper<TransferBot>()
|
List<TransferBot> transferBots = transferBotMapper.selectList(Wrappers.<TransferBot>lambdaQuery()
|
||||||
.eq("bot_id",getTransferFromBotRequest.getBotId())
|
.eq(TransferBot::getBotId,getTransferFromBotRequest.getBotId())
|
||||||
.eq("transfer_from_id",getTransferFromBotRequest.getUserId()));
|
.eq(TransferBot::getTransferFromId,getTransferFromBotRequest.getUserId())
|
||||||
|
.orderByDesc(TransferBot::getId));
|
||||||
|
TransferBot transferBot = transferBots.get(0);
|
||||||
GetTransferFromBotResponse getTransferFromBotResponse = new GetTransferFromBotResponse();
|
GetTransferFromBotResponse getTransferFromBotResponse = new GetTransferFromBotResponse();
|
||||||
getTransferFromBotResponse.setBotId(getTransferFromBotRequest.getBotId());
|
getTransferFromBotResponse.setBotId(getTransferFromBotRequest.getBotId());
|
||||||
getTransferFromBotResponse.setUserId(getTransferFromBotRequest.getUserId());
|
getTransferFromBotResponse.setUserId(getTransferFromBotRequest.getUserId());
|
||||||
|
|
Loading…
Reference in New Issue