条件に応じた一般的なマッパークエリ

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