修改updateBot中开发者自己安装可私有

This commit is contained in:
623756217 2023-03-15 16:06:28 +08:00
parent 6c4bae7a87
commit 3901eb1ad0
1 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,8 @@ public class UserService extends AbstractUserBot implements IUserService {
Bot bot = botMapper.selectById(botInputVO.getBotId());
if(bot.getIsPublic()==1){
List<InstallBot> installBots = installMapper.selectList(new QueryWrapper<InstallBot>()
.eq("bot_id",bot.getId()));
.eq("bot_id",bot.getId())
.ne("installer_id",bot.getOwnerId()));
if (installBots!=null && installBots.size()>0){
throw new BotException("已有用户安装该Bot不能将权限设置为私有");
}