forked from Gitlink/soft_bot
not count install number during uninstallation
This commit is contained in:
parent
8b7ebd9de7
commit
f3f340f1e8
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue