Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Latest commit

 

History

History
18 lines (13 loc) · 579 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 579 Bytes

weekend

基于 https://github.com/abel533/Mapper 做的增强

可以在Example.Criteria的条件方法里传lambada。(再也不用担心改数据库了......)

栗子:

代码已经打包在通用Mapper里,不需要额外引入,确认通用Mapper是较新版本即可。

  UserMapper    userMapper = sqlSession.getMapper(UserMapper.class);
  Weekend<User> weekend    = Weekend.of(User.class);
  weekend.weekendCriteria()
          .andIsNull(User::getId)
          .andBetween(User::getId,0,10)
          .andIn(User::getUserName, Arrays.asList("a","b","c"));