Skip to content

Commit 074faf7

Browse files
committed
dev-1.2.0
1 parent 2343dc1 commit 074faf7

File tree

5 files changed

+10
-34
lines changed

5 files changed

+10
-34
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.codingapi</groupId>
77
<artifactId>simple-mybatis</artifactId>
8-
<version>1.1.1</version>
8+
<version>1.2.0</version>
99
<name>simple-mybatis</name>
1010
<url>https://github.com/codingapi/simple-mybatis</url>
1111
<description>simple mybatis project for Spring Boot</description>

readme.md

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class Demo implements ITree<Long>{ //ITree根据业务需要可不实现
5858
int save(T t);
5959

6060
//批量保存
61-
int saveAll(@Param("list") List<T> list);
61+
int saveAll(List<T> list);
6262

6363
//修改数据,修改数据只会替换非null对象
6464
int update(T t);
@@ -67,29 +67,29 @@ public class Demo implements ITree<Long>{ //ITree根据业务需要可不实现
6767
int delete(T t);
6868

6969
//批量删除,删除条件为Id
70-
int deleteAll(@Param("list") List<T> list);
70+
int deleteAll(List<T> list);
7171

7272
//通过Id直接删除
73-
int deleteById(@Param("id") Object id);
73+
int deleteById(Object id);
7474

7575
//通过Id批量删除
76-
int deleteAllById(@Param("list") List id);
76+
int deleteAllById(List id);
7777
```
7878

7979
* `QueryMapper`提供常用的查询操作
8080
```java
8181

8282
//通过Id查询
83-
T getById(@Param("id") Object id);
83+
T getById(Object id);
8484

8585
//查询属于数据
8686
List<T> findAll();
8787

8888
//通过Query查询数据
89-
List<T> query(@Param("query") Query query);
89+
List<T> query(Query query);
9090

9191
//通过Query查询试图数据,返回List Map对象
92-
List<Map<String,Object>> queryMap(@Param("query") Query query);
92+
List<Map<String,Object>> queryMap(Query query);
9393

9494
//通过Query查询试图数据,返回List Bean对象
9595
<V> List<V> queryView(Class<V> clazz, Query query);
@@ -117,28 +117,6 @@ public class Demo implements ITree<Long>{ //ITree根据业务需要可不实现
117117
log.info("treeLists:{}",treeLists);
118118
```
119119

120-
* 用户根据自己的Mapper来选择集成对应的功能接口
121-
122-
```java
123-
@Mapper
124-
public interface DemoMapper extends QueryMapper<Demo>,IPageQuery<Demo>,ITreeQuery<Demo,Long> {
125-
126-
127-
}
128-
129-
@Mapper
130-
public interface DemoMapper extends SimpleMapper<Demo> {
131-
132-
133-
}
134-
@Mapper
135-
public interface DemoMapper extends CommandMapper<Demo> {
136-
137-
138-
}
139-
140-
```
141-
142120

143121
* query使用说明
144122
query 通过QueryBuilder来创建,当查询返回的是表的数据,则不需要写select语句,直接拼接where()查询条件。

src/main/java/com/codingapi/simplemybatis/mapper/ViewMapper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
/**
1919
* @author lorne
2020
* @date 2020/4/27
21-
* @description
2221
*/
2322
public interface ViewMapper {
2423

src/main/java/com/codingapi/simplemybatis/tree/ITreeQuery.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
public interface ITreeQuery<T extends ITree<ID>, ID> {
99

10-
1110
default List<TreeList<T>> tree(Supplier<List<T>> supplier, ID rootId) {
1211
List<T> list = supplier.get();
1312
List<TreeList<T>> trees = new ArrayList<>();

src/main/java/com/codingapi/simplemybatis/tree/TreeList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
public class TreeList<T> {
77

8-
T node;
8+
private T node;
99

10-
List<TreeList<T>> children;
10+
private List<TreeList<T>> children;
1111

1212
public TreeList(T node) {
1313
this.node = node;

0 commit comments

Comments
 (0)