Browse Source

集成 Jdbc Template,并简易封装通用 Dao 层

pull/1/head
Yangkai.Shen 6 years ago
parent
commit
9da75f90e9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      spring-boot-demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java

+ 1
- 1
spring-boot-demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java View File

@@ -46,7 +46,7 @@ public class BaseDao<T> {
* @param ignoreNull 是否忽略 null 值 * @param ignoreNull 是否忽略 null 值
* @return 操作的行数 * @return 操作的行数
*/ */
public Integer insert(T t, Boolean ignoreNull) {
protected Integer insert(T t, Boolean ignoreNull) {
Table tableAnnotation = t.getClass().getAnnotation(Table.class); Table tableAnnotation = t.getClass().getAnnotation(Table.class);
String table; String table;
if (ObjectUtil.isNotNull(tableAnnotation)) { if (ObjectUtil.isNotNull(tableAnnotation)) {


Loading…
Cancel
Save