You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.4 KiB
Plaintext
92 lines
2.4 KiB
Plaintext
1 week ago
|
package ${packageName}.mapper;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
import ${packageName}.domain.${ClassName};
|
||
|
#if($table.sub)
|
||
|
import ${packageName}.domain .${subClassName};
|
||
|
#end
|
||
|
|
||
|
/**
|
||
|
* ${functionName}Mapper接口
|
||
|
*
|
||
|
* @author ${author}
|
||
|
* @date ${datetime}
|
||
|
*/
|
||
|
public interface ${ClassName}Mapper {
|
||
|
/**
|
||
|
* 查询${functionName}
|
||
|
*
|
||
|
* @param ${pkColumn.javaField} ${functionName}主键
|
||
|
* @return ${functionName}
|
||
|
*/
|
||
|
${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||
|
|
||
|
/**
|
||
|
* 查询${functionName}列表
|
||
|
*
|
||
|
* @param ${className} ${functionName}
|
||
|
* @return ${functionName}集合
|
||
|
*/
|
||
|
List<${ClassName}> select${ClassName}List(${ClassName} ${className});
|
||
|
|
||
|
/**
|
||
|
* 新增${functionName}
|
||
|
*
|
||
|
* @param ${className} ${functionName}
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int insert${ClassName}(${ClassName} ${className});
|
||
|
|
||
|
/**
|
||
|
* 修改${functionName}
|
||
|
*
|
||
|
* @param ${className} ${functionName}
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int update${ClassName}(${ClassName} ${className});
|
||
|
|
||
|
/**
|
||
|
* 删除${functionName}
|
||
|
*
|
||
|
* @param ${pkColumn.javaField} ${functionName}主键
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
|
||
|
|
||
|
/**
|
||
|
* 批量删除${functionName}
|
||
|
*
|
||
|
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||
|
#if($table.sub)
|
||
|
|
||
|
/**
|
||
|
* 批量删除${subTable.functionName}
|
||
|
*
|
||
|
* @param ${pkColumn.javaField}s 需要删除的数据主键集合
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
|
||
|
|
||
|
/**
|
||
|
* 批量新增${subTable.functionName}
|
||
|
*
|
||
|
* @param ${subclassName}List ${subTable.functionName}列表
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int batch${subClassName}(List<${subClassName}> ${subclassName}List);
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 通过${functionName}主键删除${subTable.functionName}信息
|
||
|
*
|
||
|
* @param ${pkColumn.javaField} ${functionName}ID
|
||
|
* @return 结果
|
||
|
*/
|
||
|
int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
|
||
|
#end
|
||
|
}
|