mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-11-13 15:02:22 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4786af5104 | |||
| 6693cd49b9 |
@@ -1,3 +1,9 @@
|
|||||||
|
## [v2.5.1](https://github.com/continew-org/continew-starter/compare/v2.5.0...v2.5.1) (2024-08-12)
|
||||||
|
|
||||||
|
### 🐛 问题修复
|
||||||
|
|
||||||
|
- 【data】移除 SQL 函数接口中的 SQL 拼接 ([6693cd4](https://github.com/continew-org/continew-starter/commit/6693cd49b93244b42dfadd4f4be28e526d764425))
|
||||||
|
|
||||||
## [v2.5.0](https://github.com/continew-org/continew-starter/compare/v2.4.0...v2.5.0) (2024-08-07)
|
## [v2.5.0](https://github.com/continew-org/continew-starter/compare/v2.4.0...v2.5.0) (2024-08-07)
|
||||||
|
|
||||||
### ✨ 新特性
|
### ✨ 新特性
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ package top.continew.starter.data.core.enums;
|
|||||||
|
|
||||||
import top.continew.starter.data.core.function.ISqlFunction;
|
import top.continew.starter.data.core.function.ISqlFunction;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据库类型枚举
|
* 数据库类型枚举
|
||||||
*
|
*
|
||||||
@@ -33,8 +31,8 @@ public enum DatabaseType implements ISqlFunction {
|
|||||||
*/
|
*/
|
||||||
MYSQL("MySQL") {
|
MYSQL("MySQL") {
|
||||||
@Override
|
@Override
|
||||||
public String findInSet(Serializable value, String set) {
|
public String findInSet() {
|
||||||
return "find_in_set('%s', %s) <> 0".formatted(value, set);
|
return "find_in_set({0}, {1}) <> 0";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -43,8 +41,8 @@ public enum DatabaseType implements ISqlFunction {
|
|||||||
*/
|
*/
|
||||||
POSTGRE_SQL("PostgreSQL") {
|
POSTGRE_SQL("PostgreSQL") {
|
||||||
@Override
|
@Override
|
||||||
public String findInSet(Serializable value, String set) {
|
public String findInSet() {
|
||||||
return "(select position(',%s,' in ','||%s||',')) <> 0".formatted(value, set);
|
return "(select position(',{0},' in ','||{1}||',')) <> 0";
|
||||||
}
|
}
|
||||||
},;
|
},;
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package top.continew.starter.data.core.function;
|
package top.continew.starter.data.core.function;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SQL 函数接口
|
* SQL 函数接口
|
||||||
*
|
*
|
||||||
@@ -29,9 +27,7 @@ public interface ISqlFunction {
|
|||||||
/**
|
/**
|
||||||
* find_in_set 函数
|
* find_in_set 函数
|
||||||
*
|
*
|
||||||
* @param value 值
|
|
||||||
* @param set 集合
|
|
||||||
* @return 函数实现
|
* @return 函数实现
|
||||||
*/
|
*/
|
||||||
String findInSet(Serializable value, String set);
|
String findInSet();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- 项目版本号 -->
|
<!-- 项目版本号 -->
|
||||||
<revision>2.5.0</revision>
|
<revision>2.5.1</revision>
|
||||||
<snail-job.version>1.1.0</snail-job.version>
|
<snail-job.version>1.1.0</snail-job.version>
|
||||||
<sa-token.version>1.38.0</sa-token.version>
|
<sa-token.version>1.38.0</sa-token.version>
|
||||||
<just-auth.version>1.16.6</just-auth.version>
|
<just-auth.version>1.16.6</just-auth.version>
|
||||||
|
|||||||
Reference in New Issue
Block a user