随笔分类 -  mybatis

摘要:官网文档: https://mp.baomidou.com/guide/typehandler.html 必须在实体里面加上 @TableName(autoResultMap = true),不然无效 只要在对应字段加上注解就可以: @TableName(autoResultMap = true) 阅读全文
posted @ 2020-05-23 16:01 侯小厨 阅读(10913) 评论(0) 推荐(1) 编辑
摘要://代码自动生成public class CodeGenerator { /** * <p> * 读取控制台内容 * </p> */ public static String scanner(String tip) { Scanner scanner = new Scanner(System.in) 阅读全文
posted @ 2019-07-11 16:13 侯小厨 阅读(4924) 评论(0) 推荐(0) 编辑
摘要:最近在工作中遇到一个mybatis参数问题,主要是列表查询按照状态进行过滤,其中已完成状态值是0,被退回是1.如图所示 , 然后Mapper里面是和平常一样的写法<if test="status != null and status != ''>AND t1.status =#{status}</i 阅读全文
posted @ 2018-04-08 15:47 侯小厨 阅读(936) 评论(0) 推荐(1) 编辑

Fork me on Gitee
点击右上角即可分享
微信分享提示