返回顶部

随笔分类 -  mybatisplus

摘要:1、根据sql的select查询语句字段来在VO包中创建对应的VO类 例如sql语句: SELECT SUBSTRING_INDEX(CONCAT(SUBSTRING_INDEX(city,'市',1),'市'),'省',-1)as 'city',bod51 as 'inBod5',bod52 as 阅读全文
posted @ 2020-08-26 15:10 meng2113 阅读(9012) 评论(0) 推荐(1)
摘要:要查询的mysql语句: SELECT DISTINCT a.pool_name,a.equipment_name,a.commissioning_time from equipment a,sewage_pool b where a.pool_name=b.pool_name 1、添加VO类:Eq 阅读全文
posted @ 2020-08-24 14:43 meng2113 阅读(3704) 评论(1) 推荐(1)
摘要:前提:wrapper方法汇总 1、wrapper方法:isNotNull(不为空)、ge(大于) 2、wrapper方法: 3、wrapper方法: 4、模糊查询 5、 6、排序 阅读全文
posted @ 2020-08-23 14:49 meng2113 阅读(642) 评论(0) 推荐(0)
摘要:1、添加字段,设置默认值 2、实体类添加属性和注解 3、配置类中添加配置 4、properties文件中添加配置 阅读全文
posted @ 2020-08-23 14:13 meng2113 阅读(839) 评论(0) 推荐(0)
摘要:一、首先是mybatis-plus自带的分页 注意:下面的分页的页数和页面大小语句一定一定要写在select查询语句之前才能分页生效!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ① ② PageHelper.startPage(pNum,10); 第一种自带分页方式:配置类添 阅读全文
posted @ 2020-08-23 14:05 meng2113 阅读(2000) 评论(0) 推荐(0)
摘要:1、数据库添加逻辑删除字段 deleted,类型int,默认0,0为未删除。 2、实体类添加属性 deleted,并用注解@TableLogin @TableLogic private Integer deleted; 3、配置yml文件(一定要在mybatis-plus下) mybatis-plu 阅读全文
posted @ 2020-08-19 23:51 meng2113 阅读(729) 评论(0) 推荐(0)
摘要:1、com.meng.mybatisplus.enums路径下创建枚举类StatusEnum package com.meng.mybatisplus.enums; import com.baomidou.mybatisplus.annotation.EnumValue; public enum S 阅读全文
posted @ 2020-08-19 23:21 meng2113 阅读(2170) 评论(0) 推荐(0)