问答详情
源自:3-2 条件构造器查询(1)

lambdaQuery() .between 报错如下

List<User> userList= iUserService.lambdaQuery()
        .notBetween("age",25,30)
        .isNotNull("email");


Required type:

SFunction

<com.example.demo.parking.entity.User,

?>

Provided:

String


提问者:kevin19a 2021-07-08 20:47

个回答

  • 老猿
    2021-07-09 08:53:09

    你使用的是链式的Lambda条件构造器,应该这样写

    List<User> userList= iUserService.lambdaQuery()
            .notBetween(User::getAge,25,30)
            .isNotNull(User::getEmail);