提交 | 用户 | 时间
|
fd2207
|
1 |
package ${packageName}.mapper; |
懒 |
2 |
|
|
3 |
import java.util.List; |
|
4 |
import ${packageName}.domain.${ClassName}; |
|
5 |
#if($table.sub) |
|
6 |
import ${packageName}.domain.${subClassName}; |
|
7 |
#end |
|
8 |
|
|
9 |
/** |
|
10 |
* ${functionName}Mapper接口 |
|
11 |
* |
|
12 |
* @author ${author} |
|
13 |
* @date ${datetime} |
|
14 |
*/ |
|
15 |
public interface ${ClassName}Mapper |
|
16 |
{ |
|
17 |
/** |
|
18 |
* 查询${functionName} |
|
19 |
* |
|
20 |
* @param ${pkColumn.javaField} ${functionName}主键 |
|
21 |
* @return ${functionName} |
|
22 |
*/ |
|
23 |
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); |
|
24 |
|
|
25 |
/** |
|
26 |
* 查询${functionName}列表 |
|
27 |
* |
|
28 |
* @param ${className} ${functionName} |
|
29 |
* @return ${functionName}集合 |
|
30 |
*/ |
|
31 |
public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); |
|
32 |
|
|
33 |
/** |
|
34 |
* 新增${functionName} |
|
35 |
* |
|
36 |
* @param ${className} ${functionName} |
|
37 |
* @return 结果 |
|
38 |
*/ |
|
39 |
public int insert${ClassName}(${ClassName} ${className}); |
|
40 |
|
|
41 |
/** |
|
42 |
* 修改${functionName} |
|
43 |
* |
|
44 |
* @param ${className} ${functionName} |
|
45 |
* @return 结果 |
|
46 |
*/ |
|
47 |
public int update${ClassName}(${ClassName} ${className}); |
|
48 |
|
|
49 |
/** |
|
50 |
* 删除${functionName} |
|
51 |
* |
|
52 |
* @param ${pkColumn.javaField} ${functionName}主键 |
|
53 |
* @return 结果 |
|
54 |
*/ |
|
55 |
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); |
|
56 |
|
|
57 |
/** |
|
58 |
* 批量删除${functionName} |
|
59 |
* |
|
60 |
* @param ${pkColumn.javaField}s 需要删除的数据主键集合 |
|
61 |
* @return 结果 |
|
62 |
*/ |
|
63 |
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); |
|
64 |
#if($table.sub) |
|
65 |
|
|
66 |
/** |
|
67 |
* 批量删除${subTable.functionName} |
|
68 |
* |
|
69 |
* @param ${pkColumn.javaField}s 需要删除的数据主键集合 |
|
70 |
* @return 结果 |
|
71 |
*/ |
|
72 |
public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); |
|
73 |
|
|
74 |
/** |
|
75 |
* 批量新增${subTable.functionName} |
|
76 |
* |
|
77 |
* @param ${subclassName}List ${subTable.functionName}列表 |
|
78 |
* @return 结果 |
|
79 |
*/ |
|
80 |
public int batch${subClassName}(List<${subClassName}> ${subclassName}List); |
|
81 |
|
|
82 |
|
|
83 |
/** |
|
84 |
* 通过${functionName}主键删除${subTable.functionName}信息 |
|
85 |
* |
|
86 |
* @param ${pkColumn.javaField} ${functionName}ID |
|
87 |
* @return 结果 |
|
88 |
*/ |
|
89 |
public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); |
|
90 |
#end |
|
91 |
} |