通用mapper 根据条件查询

Example example = new Example(User.class);
Criteria criteria = example.createCriteria();
criteria.andEqualTo("name", name);
criteria.andEqualTo("userId", userId);
List<UserRegister> lists = userReigsterMapper.selectExample(example);

等于
Select * from user where name = #{name} and userId = #{id}

猜你喜欢

转载自blog.csdn.net/qq_36213455/article/details/103557162