feat(education): complete Flyway migration and atomic submit
This commit is contained in:
@@ -31,7 +31,7 @@ public interface DictTypeMapper extends BaseMapperX<DictTypeDO> {
|
||||
return selectOne(DictTypeDO::getName, name);
|
||||
}
|
||||
|
||||
@Update("UPDATE system_dict_type SET deleted = 1, deleted_time = #{deletedTime} WHERE id = #{id}")
|
||||
@Update("UPDATE system_dict_type SET deleted = TRUE, deleted_time = #{deletedTime} WHERE id = #{id}")
|
||||
void updateToDelete(@Param("id") Long id, @Param("deletedTime") LocalDateTime deletedTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ public interface OAuth2AccessTokenMapper extends BaseMapperX<OAuth2AccessTokenDO
|
||||
* @param limit 删除条数,防止一次删除太多
|
||||
* @return 删除条数
|
||||
*/
|
||||
@Delete("DELETE FROM system_oauth2_access_token WHERE expires_time < #{expiresTime} LIMIT #{limit}")
|
||||
@Delete("DELETE FROM system_oauth2_access_token WHERE id IN (" +
|
||||
"SELECT id FROM system_oauth2_access_token WHERE expires_time < #{expiresTime} ORDER BY id LIMIT #{limit})")
|
||||
Integer deleteByExpiresTimeLt(@Param("expiresTime") LocalDateTime expiresTime, @Param("limit") Integer limit);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ public interface OAuth2RefreshTokenMapper extends BaseMapperX<OAuth2RefreshToken
|
||||
* @param limit 删除条数,防止一次删除太多
|
||||
* @return 删除条数
|
||||
*/
|
||||
@Delete("DELETE FROM system_oauth2_refresh_token WHERE expires_time < #{expiresTime} LIMIT #{limit}")
|
||||
@Delete("DELETE FROM system_oauth2_refresh_token WHERE id IN (" +
|
||||
"SELECT id FROM system_oauth2_refresh_token WHERE expires_time < #{expiresTime} ORDER BY id LIMIT #{limit})")
|
||||
Integer deleteByExpiresTimeLt(@Param("expiresTime") LocalDateTime expiresTime, @Param("limit") Integer limit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user