概要:Mybatis plus 官网链接 :https://mp.baomidou.com/guide/
一、依赖配置:
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://.example.demo.entity.User"> <id column="id" property="id" /> <result column="name" property="name" /> <result column="phone" property="phone" /> <result column="create_time" property="createTime" /> <result column="enable" property="enable" /> <result column="version" property="version" /> </resultMap> <select id="selectPageByEnable" resultMap="BaseResultMap"> SELECT * FROM user WHERE enable=#{enable} order by create_time desc </select></mapper>- DDL
CREATE TABLE `user` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, `phone` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `enable` tinyint NOT NULL, `create_time` datetime NOT NULL, `version` bigint NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;到此这篇关于MyBatis Plus之逻辑删除和分页插件使用的文章就介绍到这了,更多相关MyBatis Plus逻辑删除内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!