![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Mybatis
airuoflora
愿你所愿,终能实现。
展开
-
mybatis中日期的筛选
因为datetime类型的数据,mysql自动处理为00:00:00 所以如果要搜索7月11日-7月11日的数据会默认查找7月11日00:00:00-7月11日00:00:00的数据,那么自然是没有的 <if test=" date1 != null"> and nexttime >= DATE_FORMAT(#{date1},'%Y-%m-%d 00:00:00') </if>原创 2020-07-17 23:53:39 · 2062 阅读 · 0 评论 -
MyBatis逆向工程关联查询表信息
1、写一个扩展类,不要用原来的,可能会影响别的代码 public class Goods2 extends Goods{ private Type type; private Goods2 goods2; public Type getType() { return type; } public void setType(Type t...原创 2020-03-14 23:03:29 · 1027 阅读 · 0 评论 -
mybatis逆向工程遇到的问题!!!
mybatis逆向工程生成类千万不能运行两次!!!!!!!!!不会覆盖原来生成的代码!而是追加!!!!!!!!导致mapper.xml文件代码重复!!!!原创 2020-02-22 23:42:17 · 356 阅读 · 0 评论 -
Spring boot中的mybatis逆向工程
1.在resource报下创建generatorConfig.xml文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http:/...原创 2020-02-22 22:32:43 · 98 阅读 · 0 评论