mybatis-plus

https://www.jianshu.com/p/12ec123d20e8

https://www.jianshu.com/p/5c9e6acf9a70

 

官方视频: 

https://mp.baomidou.com/guide/#%E6%A1%86%E6%9E%B6%E7%BB%93%E6%9E%84

 

mybatis-plus 时间字段比较

https://blog.csdn.net/rocrunwang/article/details/111305431

mybatis-plus 时间字段比较,默认lt/gt/ge时间比较时无效:

LambdaQueryWrapper<?> queryWrapper = Wrappers.<ConstantsRetention>query().lambda();
        
String strEnd= DateFormatUtils.format(dto.getEndTime(),"yyyy-MM-dd HH:mm:ss");
 
String start = DateFormatUtils.format(dto.getStartTime(),"yyyy-MM-dd HH:mm:ss");
 
queryWrapper.apply("UNIX_TIMESTAMP(tabulation_time) >= UNIX_TIMESTAMP('" + start + "')");
 
queryWrapper.apply("UNIX_TIMESTAMP(tabulation_time) < UNIX_TIMESTAMP('" + strEnd + "')");

 

posted @ 2021-01-22 09:56  Peter.Jones  阅读(110)  评论(0编辑  收藏  举报