getBotDetail接口:不存在botId处理

This commit is contained in:
wanjia 2023-04-03 14:11:20 +08:00
parent 3f1fccdb59
commit 9a11ade8bd
1 changed files with 3 additions and 0 deletions

View File

@ -217,6 +217,9 @@ public class MarketService implements IMarketService {
public GetBotDetailResponse getBotDetail(Integer userId, Integer botId) {
Bot bot = botMapper.selectOne(Wrappers.<Bot>lambdaQuery()
.eq(Bot::getId,botId));
if(bot == null) {
return new GetBotDetailResponse();
}
MarketBot marketBot = marketBotMapper.selectOne(Wrappers.<MarketBot>lambdaQuery()
.eq(MarketBot::getBotId,botId));
List<BotLimitEvent> botLimitEvents = botLimitMapper.selectList(new QueryWrapper<BotLimitEvent>()