-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
82 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/9/13 | ||
* 2020/9/13 | ||
* 搭配 @Id(auto = false) | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/9/13 | ||
* 2020/9/13 | ||
* 需要实现 org.nutz.dao.enhance.audit.AuditingEntity | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/9/13 | ||
* 2020/9/13 | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(value = {ElementType.METHOD, ElementType.FIELD}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2021/6/14 | ||
* 2021/6/14 | ||
*/ | ||
@Documented | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
@@ -19,8 +19,6 @@ | |
/** | ||
* 指定实现 SQL 查询的静态类中的具体方法名. | ||
* 为空时和接口方法一致 | ||
* | ||
* @return | ||
*/ | ||
String methodName() default ""; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/7/30 | ||
* 2020/7/30 | ||
*/ | ||
@Target({ElementType.TYPE}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* 删除 | ||
* | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
*/ | ||
@Target({ElementType.METHOD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
* 1、指定返回的实体类型,默认读取注解优先,若没有注解,则默认通过反射去class类上获取实体类泛型 | ||
* 2、自动建表必须需要写在dao类上 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
* 忽略自动建表 | ||
*/ | ||
@Target({ElementType.METHOD, ElementType.TYPE}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
*/ | ||
@Target({ElementType.METHOD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/9/13 | ||
* 2020/9/13 | ||
* 需要实现 org.nutz.dao.enhance.audit.AuditingEntity | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/9/13 | ||
* 2020/9/13 | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(value = {ElementType.METHOD, ElementType.FIELD}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
*/ | ||
@Target({ElementType.METHOD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
*/ | ||
@Target({ElementType.METHOD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/7/31 | ||
* 2020/7/31 | ||
*/ | ||
@SuppressWarnings("all") | ||
public interface BaseDao<T> { | ||
|
@@ -25,7 +25,6 @@ public interface BaseDao<T> { | |
* 如果你的字段仅仅声明了 '@Id(auto=true)',没有声明 '@Next',则认为你还是想取回插入后最新的 ID 值,因为 自动为你添加类似 @Next(@SQL("SELECT MAX(id) FROM tableName")) 的设置 | ||
* | ||
* @param t | ||
* @return | ||
*/ | ||
@CustomProvider(type = BaseDaoProvider.class) | ||
T insert(T t); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
*/ | ||
public interface DaoFactory { | ||
/** | ||
|
@@ -21,16 +21,13 @@ public interface DaoFactory { | |
|
||
/** | ||
* 获取默认dao | ||
* | ||
* @return | ||
*/ | ||
Dao getDao(); | ||
|
||
/** | ||
* 获取dao | ||
* | ||
* @param dataSource | ||
* @return | ||
*/ | ||
Dao getDao(String dataSource); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/7/31 | ||
* 2020/7/31 | ||
*/ | ||
@Slf4j | ||
public class DaoMethodInvoke { | ||
|
@@ -117,7 +117,6 @@ private void initEntityInfo(Dao dao) { | |
* @param dataSource | ||
* @param methodTraget | ||
* @param args | ||
* @return | ||
*/ | ||
public Object execute(String dataSource, Method methodTraget, Object[] args) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException, InstantiationException { | ||
Stopwatch stopWatch = new Stopwatch(); | ||
|
@@ -149,7 +148,6 @@ public Object execute(String dataSource, Method methodTraget, Object[] args) thr | |
* | ||
* @param dao | ||
* @param args | ||
* @return | ||
*/ | ||
private Object invokeCustomProvider(Dao dao, Object[] args, Entity entity) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException { | ||
String executeSql = replaceConditionSql(args); | ||
|
@@ -180,7 +178,6 @@ private void parseAndTranslationSql() { | |
* 替换条件sql | ||
* | ||
* @param args | ||
* @return | ||
*/ | ||
private String replaceConditionSql(Object[] args) { | ||
String sql = this.sourceSql; | ||
|
@@ -232,7 +229,6 @@ private String replaceConditionSql(Object[] args) { | |
* | ||
* @param dao | ||
* @param args | ||
* @return | ||
*/ | ||
private Execute getCustomizeSqlExecute(Dao dao, Object[] args) { | ||
String executeSql = replaceConditionSql(args); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/7/31 | ||
* 2020/7/31 | ||
*/ | ||
public interface DaoMethodInvoker { | ||
/** | ||
|
@@ -14,7 +14,6 @@ public interface DaoMethodInvoker { | |
* @param method | ||
* @param args | ||
* @param dataSource | ||
* @return | ||
* @throws Throwable | ||
*/ | ||
Object invoke(Object proxy, Method method, Object[] args, String dataSource) throws Throwable; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
public interface Execute { | ||
/** | ||
* 真正执行操作 | ||
* | ||
* @return | ||
*/ | ||
Object invoke(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2020/12/12 | ||
* 2020/12/12 | ||
*/ | ||
@Getter | ||
public class MethodSignature { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
/** | ||
* @author 黄川 [email protected] | ||
* @date: 2023/3/15 | ||
* 2023/3/15 | ||
*/ | ||
@Data | ||
@AllArgsConstructor(staticName = "of") | ||
|
Oops, something went wrong.