getAllInstallBots接口参数空值处理
This commit is contained in:
parent
6c9e0d260b
commit
ad93af9686
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue