Skip to content

Commit

Permalink
feat-ICustomSelectSqlAbility-允许完全自定义查询sql
Browse files Browse the repository at this point in the history
  • Loading branch information
aruis committed Sep 21, 2024
1 parent 2a40566 commit dbab22c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package net.ximatai.muyun.ability.curd.std;

public interface ICustomSelectSqlAbility extends ISelectAbility {

String getCustomSql();

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ default String getSelectOneRowSql() {
}

default String getSelectSql() {
if (this instanceof ICustomSelectSqlAbility ability) {
return ability.getSelectSql();
}

StringBuilder starSql = new StringBuilder("%s.*".formatted(getMainTable()));
StringBuilder joinSql = new StringBuilder();
String softDeleteSql = "";
Expand Down

0 comments on commit dbab22c

Please sign in to comment.