| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 | | package com.ruoyi.integration.mongodb.base; |  |   |  |   |  | import java.util.List; |  |   |  | public interface BaseService<T> { |  |   |  |     /** |  |      * 添加 |  |      * @param t 实体类 |  |      * @return 添加结果 1=成功 0=失败 |  |      */ |  |     int create(T t); |  |   |  |     /** |  |      * 根据id查询 |  |      * @param id 实体id |  |      * @return 实体对象 |  |      */ |  |     T findById(String id); |  |   |  |     /** |  |      * 查询列表 |  |      * @return 实体列表 |  |      */ |  |     List<T> findAll(); |  |   |  | } | 
 |