//这样判断避免空指针 if(Objects.nonNull(createTimes)) { hkRegionTreeLambdaQueryWrapper .between( Objects.nonNull(createTimes) && ObjectUtils.isEmpty(createTimes) ,HkRegionTree::getCreateTime, createTimes[0],createTimes[1]); }
//这样写会报空指针错误
.between( Objects.nonNull(createTimes) && ObjectUtils.isEmpty(createTimes) ,HkRegionTree::getCreateTime,
本文来自博客园,作者:狂躁的键盘,转载请注明原文链接:https://www.cnblogs.com/wangweiip/p/16932692.html
浙公网安备 33010602011771号