提交 | 用户 | 时间
|
71e81e
|
1 |
package ${apiPackage}; |
懒 |
2 |
|
|
3 |
import org.springframework.web.bind.annotation.RequestBody; |
|
4 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
5 |
import cn.stylefeng.roses.kernel.model.page.PageResult; |
|
6 |
import ${package.EntitySpecParams}.${entity}Param; |
|
7 |
import ${package.EntitySpecResult}.${entity}Result; |
|
8 |
|
|
9 |
import java.util.List; |
|
10 |
|
|
11 |
<% var lowerEntity = tool.lowerFirst(entity); %> |
|
12 |
<% var lowerEntityService = lowerEntity + 'Service'; %> |
|
13 |
|
|
14 |
/** |
|
15 |
* ${tool.cleanWhite(table.comment)}远程接口 |
|
16 |
* |
|
17 |
* @author ${author} |
|
18 |
* @Date ${tool.currentTime()} |
|
19 |
*/ |
|
20 |
@RequestMapping("/api/${lowerEntity}") |
|
21 |
public interface ${entity}Api { |
|
22 |
|
|
23 |
/** |
|
24 |
* 新增 |
|
25 |
* |
|
26 |
* @author ${author} |
|
27 |
* @Date ${date} |
|
28 |
*/ |
|
29 |
@RequestMapping("/add") |
|
30 |
void add(@RequestBody ${entity}Param param); |
|
31 |
|
|
32 |
/** |
|
33 |
* 删除 |
|
34 |
* |
|
35 |
* @author ${author} |
|
36 |
* @Date ${date} |
|
37 |
*/ |
|
38 |
@RequestMapping("/delete") |
|
39 |
void delete(@RequestBody ${entity}Param param); |
|
40 |
|
|
41 |
/** |
|
42 |
* 更新 |
|
43 |
* |
|
44 |
* @author ${author} |
|
45 |
* @Date ${date} |
|
46 |
*/ |
|
47 |
@RequestMapping("/update") |
|
48 |
void update(@RequestBody ${entity}Param param); |
|
49 |
|
|
50 |
/** |
|
51 |
* 查询单条数据,Specification模式 |
|
52 |
* |
|
53 |
* @author ${author} |
|
54 |
* @Date ${date} |
|
55 |
*/ |
|
56 |
@RequestMapping("/findBySpec") |
|
57 |
${entity}Result findBySpec(@RequestBody ${entity}Param param); |
|
58 |
|
|
59 |
/** |
|
60 |
* 查询列表,Specification模式 |
|
61 |
* |
|
62 |
* @author ${author} |
|
63 |
* @Date ${date} |
|
64 |
*/ |
|
65 |
@RequestMapping("/findListBySpec") |
|
66 |
List<${entity}Result> findListBySpec(@RequestBody ${entity}Param param); |
|
67 |
|
|
68 |
/** |
|
69 |
* 查询分页数据,Specification模式 |
|
70 |
* |
|
71 |
* @author ${author} |
|
72 |
* @Date ${date} |
|
73 |
*/ |
|
74 |
@RequestMapping("/findPageBySpec") |
|
75 |
PageResult<${entity}Result> findPageBySpec(@RequestBody ${entity}Param param); |
|
76 |
|
|
77 |
} |