【update】null值处理

This commit is contained in:
nixj 2024-06-27 14:35:57 +08:00
parent 7db999404b
commit d83f96c601
1 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Objects;
/**
* 基础方法工具类
@ -28,7 +29,7 @@ public class BaseUtil {
}
public List<Long> getRouteIds(){
List<String> list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList();
List<String> list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList().stream().filter(Objects::nonNull).toList();
List<RouteOrderExtensionFieldBasic> result= jdbcRouteOrderExtensionFieldBasicRepository.findAllByBelongDeptCodeIn(list);
return result.stream().map(RouteOrderExtensionFieldBasic::getRouteId).toList();
}