forked from Gitlink/soft_bot
接口deleteInstallBot修改参数:传入多个repoOwners并处理
This commit is contained in:
parent
40836ee219
commit
93e1b74a1c
|
|
@ -844,7 +844,8 @@ public class UserService extends AbstractUserBot implements IUserService {
|
|||
public void deleteInstallBot(DeleteInstallBotRequest deleteInstallBotRequest) throws BotException{
|
||||
List<InstallBot> installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
|
||||
.eq(InstallBot::getBotId,deleteInstallBotRequest.getBotId())
|
||||
.eq(InstallBot::getStoreRepo,deleteInstallBotRequest.getStoreRepo()));
|
||||
.in(InstallBot::getStoreRepo, Arrays.stream(deleteInstallBotRequest.getStoreRepos().split(","))
|
||||
.map(Integer::valueOf).collect(Collectors.toList())));
|
||||
if (installBots==null||installBots.size()<=0){
|
||||
throw new BotException("该用户没有要删除的Bot");
|
||||
}
|
||||
|
|
@ -864,7 +865,9 @@ public class UserService extends AbstractUserBot implements IUserService {
|
|||
//删除install_bot
|
||||
installMapper.delete(Wrappers.<InstallBot>lambdaQuery()
|
||||
.eq(InstallBot::getBotId,deleteInstallBotRequest.getBotId())
|
||||
.eq(InstallBot::getStoreRepo,deleteInstallBotRequest.getStoreRepo()));
|
||||
.in(InstallBot::getStoreRepo, Arrays.stream(deleteInstallBotRequest.getStoreRepos().split(","))
|
||||
.map(Integer::valueOf).collect(Collectors.toList())));
|
||||
|
||||
//删除webhook
|
||||
for(InstallBot installBot:installBots){
|
||||
Object[] objects = new Object[]{installBot.getRepoOwner(),installBot.getStoreRepo()};
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ public class DeleteInstallBotRequest {
|
|||
private Integer botId;
|
||||
private String password;
|
||||
|
||||
@NotNull(message = "repo is required")
|
||||
private String storeRepo;
|
||||
@NotNull(message = "repos is required")
|
||||
private String storeRepos;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue