getAllInstallBots接口参数空值处理

This commit is contained in:
wanjia 2023-03-31 12:00:30 +08:00
parent 6c9e0d260b
commit ad93af9686
1 changed files with 3 additions and 2 deletions

View File

@ -1198,12 +1198,13 @@ public class UserService extends AbstractUserBot implements IUserService {
public GetAllInstallBotsResponse getAllInstallBots(Integer userId, String repos) {
List<InstallBot> installBots = new ArrayList<>();
List<String> repoList = Arrays.asList(repos.split(","));
if(userId != null) {
installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
.eq(InstallBot::getInstallerId,userId));
}
if(repos != null && repoList.size() > 0) {
if(repos != null) {
List<String> repoList = Arrays.asList(repos.split(","));
installBots = installMapper.selectList(Wrappers.<InstallBot>lambdaQuery()
.in(InstallBot::getStoreRepo, repoList));
}