not count install number during uninstallation

This commit is contained in:
wanjia 2023-04-27 10:21:58 +08:00
parent 8b7ebd9de7
commit f3f340f1e8
1 changed files with 0 additions and 11 deletions

View File

@ -905,17 +905,6 @@ public class UserService extends AbstractUserBot implements IUserService {
throw new BotException("该用户没有要删除的Bot");
}
//TODO 删除要验证密码
//1.Bot中install_num数量减1
Bot bot = botMapper.selectById(deleteInstallBotRequest.getBotId());
bot.setInstallNum(bot.getInstallNum()-1);
botMapper.updateById(bot);
//2.Market_Bot中install_num减1
MarketBot marketBot = marketBotMapper.selectOne(new QueryWrapper<MarketBot>()
.eq("bot_id",deleteInstallBotRequest.getBotId()));
if(!Objects.isNull(marketBot)){
marketBot.setInstallNum(marketBot.getInstallNum()-1);
marketBotMapper.updateById(marketBot);
}
//删除install_bot
installMapper.delete(Wrappers.<InstallBot>lambdaQuery()