<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
說明
本文用範例介紹MyBatis-Plus如何解決邏輯刪除與唯一索引的問題。
物理刪除與邏輯刪除
資料是很重要的,資料庫裡的資料在刪除時一般不會用DELETE語句直接物理刪除。
通常的做法是使用邏輯刪除,也就是:新加一個標記是否刪除的欄位,在刪除時不是真的刪除,而是使用UPDATE語句將某個欄位設定為刪除狀態。例如:"deleted_flag",0表示未刪除,其他表示已刪除。
MyBatis-Plus預設的邏輯刪除
MyBatis-Plus裡可以將某個欄位標記為邏輯刪除欄位,方法是:在欄位上加@TableLogic註解:
@TableLogicprivate Long deletedFlag;
這樣一來,運算元據時會自動操作:
查詢時:自動加"AND deletedFlag = 0"
刪除時:UPDATE SET deletedFlag = 1 ... WHERE ... AND deleted_flag = 0
其對應的預設設定為:
mybatis-plus: global-config: db-config: logic-delete-value: 1 # 邏輯已刪除值(預設為 1) logic-not-delete-value: 0 # 邏輯未刪除值(預設為 0)
MyBatis-Plus預設邏輯刪除的問題
假設有一張使用者表,有user_name和deleted_flag欄位,想給user_name加唯一索引(提高查詢速度、確保使用者名稱不重複),這時有如下兩種方案:
將user_name設定為唯一索引
將user_name和deleted_flag設定為聯合唯一索引
這樣也是不行的,比如:
依賴
pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.1.RELEASE</version> <!-- <version>2.0.0.RELEASE</version>--> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>MyBatis-Plus_Simple</artifactId> <version>0.0.1-SNAPSHOT</version> <name>MyBatis-Plus_Simple</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.3.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-spring-boot-starter</artifactId> <version>3.0.3</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>
DROP DATABASE IF EXISTS mp; CREATE DATABASE mp DEFAULT CHARACTER SET utf8; USE mp; DROP TABLE IF EXISTS `t_user`; SET NAMES utf8mb4; CREATE TABLE `t_user` ( `id` BIGINT(0) NOT NULL AUTO_INCREMENT, `user_name` VARCHAR(64) NOT NULL COMMENT '使用者名稱(不能重複)', `nick_name` VARCHAR(64) NULL COMMENT '暱稱(可以重複)', `email` VARCHAR(64) COMMENT '郵箱', `create_time` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間', `update_time` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間', `deleted_flag` BIGINT(0) NOT NULL DEFAULT 0 COMMENT '0:未刪除 其他:已刪除', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `index_user_name_deleted_flag` (`user_name`, `deleted_flag`), KEY `index_create_time`(`create_time`) ) ENGINE = InnoDB COMMENT = '使用者'; INSERT INTO `t_user` VALUES (1, 'knife', '刀刃', 'abc@qq.com', '2021-01-23 09:33:36', '2021-01-23 09:33:36', 0); INSERT INTO `t_user` VALUES (2, 'sky', '天藍', '123@qq.com', '2021-01-24 18:12:21', '2021-01-24 18:12:21', 0);
Entity
package com.example.demo.user.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import java.time.LocalDateTime; @Data @TableName(value = "t_user") public class User { @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 使用者名稱(不能重複) */ private String userName; /** * 暱稱(可以重複) */ private String nickName; /** * 郵箱 */ private String email; /** * 建立時間 */ private LocalDateTime createTime; /** * 修改時間 */ private LocalDateTime updateTime; /** * 0:未刪除 其他:已刪除 */ @TableLogic private Long deletedFlag; }
Service
介面
package com.example.demo.user.service; import com.baomidou.mybatisplus.extension.service.IService; import com.example.demo.user.entity.User; public interface UserService extends IService<User> { }
實現類
package com.example.demo.user.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.example.demo.user.entity.User; import com.example.demo.user.mapper.UserMapper; import com.example.demo.user.service.UserService; import org.springframework.stereotype.Service; @Service public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService { }
Controller
package com.example.demo.user.controller; import com.example.demo.user.entity.User; import com.example.demo.user.service.UserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Api(tags = "測試") @RestController @RequestMapping("test") public class TestController { @Autowired private UserService userService; @ApiOperation("刪除") @PostMapping("delete") public String delete(Long id) { userService.removeById(id); return "remove success"; } @ApiOperation("新增") @PostMapping("add") public User add() { User user = new User(); user.setUserName("sky"); userService.save(user); return user; } }
開啟測試頁面:http://localhost:8080/doc.html
1. 檢視原始資料
2. 刪除user_name為“sky”的資料
資料庫結果(成功刪除)
後端結果
==> Preparing: UPDATE t_user SET deleted_flag=1 WHERE id=? AND deleted_flag=0
==> Parameters: 2(Long)
<== Updates: 1
3. 新增user_name為“sky”的資料
資料庫結果(新增成功)
後端結果(新增成功)
==> Preparing: INSERT INTO t_user ( user_name ) VALUES ( ? )
==> Parameters: sky(String)
<== Updates: 1
4. 刪除user_name為“sky”的資料
資料庫結果(刪除失敗)
後端結果(刪除失敗)
2022-03-20 16:46:09.895 ERROR 15904 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'sky-1' for key 't_user.index_user_name_deleted_flag'
### The error may exist in com/example/demo/user/mapper/UserMapper.java (best guess)
### The error may involve com.example.demo.user.mapper.UserMapper.deleteById-Inline
### The error occurred while setting parameters
### SQL: UPDATE t_user SET deleted_flag=1 WHERE id=? AND deleted_flag=0
### Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'sky-1' for key 't_user.index_user_name_deleted_flag'
; Duplicate entry 'sky-1' for key 't_user.index_user_name_deleted_flag'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'sky-1' for key 't_user.index_user_name_deleted_flag'] with root cause
java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'sky-1' for key 't_user.index_user_name_deleted_flag'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:370) ~[mysql-connector-java-8.0.20.jar:8.0.20]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-3.4.5.jar:na]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.4.jar:3.5.4]
at com.sun.proxy.$Proxy110.execute(Unknown Source) ~[na:na]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.4.jar:3.5.4]
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.4.jar:3.5.4]
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54) ~[mybatis-plus-core-3.3.2.jar:3.3.2]
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.4.jar:3.5.4]
at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.update(MybatisCachingExecutor.java:83) ~[mybatis-plus-core-3.3.2.jar:3.3.2]
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.4.jar:3.5.4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~[mybatis-spring-2.0.4.jar:2.0.4]
at com.sun.proxy.$Proxy72.update(Unknown Source) ~[na:na]
at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287) ~[mybatis-spring-2.0.4.jar:2.0.4]
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:65) ~[mybatis-plus-core-3.3.2.jar:3.3.2]
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:96) ~[mybatis-plus-core-3.3.2.jar:3.3.2]
at com.sun.proxy.$Proxy77.deleteById(Unknown Source) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at com.sun.proxy.$Proxy78.deleteById(Unknown Source) ~[na:na]
at com.baomidou.mybatisplus.extension.service.IService.removeById(IService.java:104) ~[mybatis-plus-extension-3.3.2.jar:3.3.2]
at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>) ~[mybatis-plus-extension-3.3.2.jar:3.3.2]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:687) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at com.example.demo.user.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$328c22ac.removeById(<generated>) ~[classes/:na]
at com.example.demo.user.controller.TestController.delete(TestController.java:26) ~[classes/:na]
...
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_201]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.36.jar:9.0.36]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_201]
@TableLogic註解的原始碼如下:
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package com.baomidou.mybatisplus.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE}) public @interface TableLogic { String value() default ""; String delval() default ""; }
所以方法就是:將delval設定為一個不會衝突的值就可以了,比如:
將delval設定為:“id”
將delval設定為:“NOW()”
說明
delval所指定的字串,將會直接作為UPDATE語句的SET值,例如,我將delval指定為“abc”,那麼刪除時的語句就是:UPDATE SET deleted_flag = abc WHERE ...
方案簡介
在刪除時會將邏輯刪除欄位設定為id的值。
建庫建表
DROP DATABASE IF EXISTS mp; CREATE DATABASE mp DEFAULT CHARACTER SET utf8; USE mp; DROP TABLE IF EXISTS `t_user`; SET NAMES utf8mb4; CREATE TABLE `t_user` ( `id` BIGINT(0) NOT NULL AUTO_INCREMENT, `user_name` VARCHAR(64) NOT NULL COMMENT '使用者名稱(不能重複)', `nick_name` VARCHAR(64) NULL COMMENT '暱稱(可以重複)', `email` VARCHAR(64) COMMENT '郵箱', `create_time` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間', `update_time` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間', `deleted_flag` BIGINT(0) NOT NULL DEFAULT 0 COMMENT '0:未刪除 其他:已刪除', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `index_user_name_deleted_flag` (`user_name`, `deleted_flag`), KEY `index_create_time`(`create_time`) ) ENGINE = InnoDB COMMENT = '使用者'; INSERT INTO `t_user` VALUES (1, 'knife', '刀刃', 'abc@qq.com', '2021-01-23 09:33:36', '2021-01-23 09:33:36', 0); INSERT INTO `t_user` VALUES (2, 'sky', '天藍', '123@qq.com', '2021-01-24 18:12:21', '2021-01-24 18:12:21', 0);
修改Entity
package com.example.demo.user.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import java.time.LocalDateTime; @Data @TableName(value = "t_user") public class User { @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 使用者名稱(不能重複) */ private String userName; /** * 暱稱(可以重複) */ private String nickName; /** * 郵箱 */ private String email; /** * 建立時間 */ private LocalDateTime createTime; /** * 修改時間 */ private LocalDateTime updateTime; /** * 0:未刪除 其他:已刪除 */ @TableLogic(delval = "id") private Long deletedFlag; }
測試
開啟測試頁面:http://localhost:8080/doc.html
1. 檢視原始資料
2. 刪除user_name為“sky”的資料
資料庫結果(成功刪除)
後端結果(成功刪除)
==> Preparing: UPDATE t_user SET deleted_flag=id WHERE id=? AND deleted_flag=0
==> Parameters: 2(Long)
<== Updates: 1
3. 新增user_name為“sky”的資料
資料庫結果(新增成功)
後端結果(新增成功)
==> Preparing: INSERT INTO t_user ( user_name ) VALUES ( ? )
==> Parameters: sky(String)
<== Updates: 1
4. 刪除user_name為“sky”的資料
資料庫結果(刪除成功)
後端結果(刪除成功)
==> Preparing: UPDATE t_user SET deleted_flag=id WHERE id=? AND deleted_flag=0
==> Parameters: 3(Long)
<== Updates: 1
方案簡介
在刪除時會將邏輯刪除欄位設定為NOW()函數的值。
建庫建表
DROP DATABASE IF EXISTS mp; CREATE DATABASE mp DEFAULT CHARACTER SET utf8; USE mp; DROP TABLE IF EXISTS `t_user`; SET NAMES utf8mb4; CREATE TABLE `t_user` ( `id` BIGINT(0) NOT NULL AUTO_INCREMENT, `user_name` VARCHAR(64) NOT NULL COMMENT '使用者名稱(不能重複)', `nick_name` VARCHAR(64) NULL COMMENT '暱稱(可以重複)', `email` VARCHAR(64) COMMENT '郵箱', `create_time` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間', `update_time` DATETIME(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間', `deleted_flag` DATETIME(0) NULL DEFAULT NULL COMMENT 'null:未刪除 其他:已刪除', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `index_user_name_deleted_flag` (`user_name`, `deleted_flag`), KEY `index_create_time`(`create_time`) ) ENGINE = InnoDB COMMENT = '使用者'; INSERT INTO `t_user` VALUES (1, 'knife', '刀刃', 'abc@qq.com', '2021-01-23 09:33:36', '2021-01-23 09:33:36', null); INSERT INTO `t_user` VALUES (2, 'sky', '天藍', '123@qq.com', '2021-01-24 18:12:21', '2021-01-24 18:12:21', null);
修改Entity
package com.example.demo.user.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import java.time.LocalDateTime; @Data @TableName(value = "t_user") public class User { @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 使用者名稱(不能重複) */ private String userName; /** * 暱稱(可以重複) */ private String nickName; /** * 郵箱 */ private String email; /** * 建立時間 */ private LocalDateTime createTime; /** * 修改時間 */ private LocalDateTime updateTime; /** * NULL:未刪除 其他:已刪除 */ @TableLogic(value = "NULL", delval = "NOW()") private LocalDateTime deletedFlag; }
測試
開啟測試頁面:http://localhost:8080/doc.html
1. 檢視原始資料
2. 刪除user_name為“sky”的資料
資料庫結果(成功刪除)
後端結果(成功刪除)
==> Preparing: UPDATE t_user SET deleted_flag=NOW() WHERE id=? AND deleted_flag IS NULL
==> Parameters: 2(Long)
<== Updates: 1
3. 新增user_name為“sky”的資料
資料庫結果(新增成功)
後端結果(新增成功)
==> Preparing: INSERT INTO t_user ( user_name ) VALUES ( ? )
==> Parameters: sky(String)
<== Updates: 1
4. 刪除user_name為“sky”的資料
資料庫結果(刪除成功)
後端結果(刪除成功)
==> Preparing: UPDATE t_user SET deleted_flag=NOW() WHERE id=? AND deleted_flag IS NULL
==> Parameters: 3(Long)
<== Updates: 1
到此這篇關於MyBatis-Plus解決邏輯刪除與唯一索引的問題的文章就介紹到這了,更多相關MyBatis-Plus 邏輯刪除與唯一索引內容請搜尋it145.com以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援it145.com!
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45