当前使用版本(必填,否则不予处理)

3.4.3

该问题是如何引起的?(确定最新版也有问题再提!!!)

return this.baseMapper.selectPage(page, new LambdaQueryWrapper() .eq(StrUtil.isNotBlank(loginLogParams.getUsername()), LoginLog::getUsername, loginLogParams.getUsername()) .between(StrUtil.isNotBlank(loginLogParams.getLoginTime()), LoginLog::getLoginTime, loginLogParams.getLoginTime().split("#")[0] , loginLogParams.getLoginTime().split("#")[1]));

条件查询, between 中StrUtil.isNotBlank(loginLogParams.getLoginTime())是不成立的

重现步骤(如果有就写完整)

return this.baseMapper.selectPage(page, new LambdaQueryWrapper() .eq(StrUtil.isNotBlank(loginLogParams.getUsername()), LoginLog::getUsername, loginLogParams.getUsername()) .between(StrUtil.isNotBlank(loginLogParams.getLoginTime()), LoginLog::getLoginTime, loginLogParams.getLoginTime().split("#")[0] , loginLogParams.getLoginTime().split("#")[1]));

条件查询, between 中StrUtil.isNotBlank(loginLogParams.getLoginTime())是不成立的

报错信息

.between(StrUtil.isNotBlank(loginLogParams.getLoginTime()), LoginLog::getLoginTime, loginLogParams.getLoginTime().split("#")[0] 明明是为空,条件不成立,但是还是执行条件

Comment From: miemieYaho

执行那是java基本常识,看wrapper.func

Comment From: kenx-max

我知道了,会执行,但是sql条件不会有,我理解错了,我以为,前面条件不成立,后面语法就不执行了,和 if 判断一样