|
@ -69,7 +69,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
#end |
|
|
#end |
|
|
#end |
|
|
#end |
|
|
#if($table.sub) |
|
|
#if($table.sub) |
|
|
int rows = ${className}Mapper.insert${ClassName}Dao(${className}Dao); |
|
|
int rows = baseMapper.insert${ClassName}Dao(${className}Dao); |
|
|
insert${subClassName}Dao(${className}Dao); |
|
|
insert${subClassName}Dao(${className}Dao); |
|
|
return rows; |
|
|
return rows; |
|
|
#else |
|
|
#else |
|
@ -95,7 +95,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
#end |
|
|
#end |
|
|
#end |
|
|
#end |
|
|
#if($table.sub) |
|
|
#if($table.sub) |
|
|
${className}Mapper.delete${subClassName}DaoBy${subTableFkClassName}(${className}Dao.get${pkColumn.capJavaField}()); |
|
|
baseMapper.delete${subClassName}By${subTableFkClassName}(${className}Dao.get${pkColumn.capJavaField}()); |
|
|
insert${subClassName}Dao(${className}Dao); |
|
|
insert${subClassName}Dao(${className}Dao); |
|
|
#end |
|
|
#end |
|
|
return baseMapper.update${ClassName}Dao(${className}Dao); |
|
|
return baseMapper.update${ClassName}Dao(${className}Dao); |
|
@ -114,7 +114,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
public int delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s) |
|
|
public int delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s) |
|
|
{ |
|
|
{ |
|
|
#if($table.sub) |
|
|
#if($table.sub) |
|
|
baseMapper.delete${subClassName}DaoBy${subTableFkClassName}s(${pkColumn.javaField}s); |
|
|
baseMapper.delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaField}s); |
|
|
#end |
|
|
#end |
|
|
return baseMapper.delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaField}s); |
|
|
return baseMapper.delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaField}s); |
|
|
} |
|
|
} |
|
@ -132,7 +132,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
public int delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) |
|
|
public int delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) |
|
|
{ |
|
|
{ |
|
|
#if($table.sub) |
|
|
#if($table.sub) |
|
|
baseMapper.delete${subClassName}DaoBy${subTableFkClassName}(${pkColumn.javaField}); |
|
|
baseMapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField}); |
|
|
#end |
|
|
#end |
|
|
return baseMapper.delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaField}); |
|
|
return baseMapper.delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaField}); |
|
|
} |
|
|
} |
|
@ -157,7 +157,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
} |
|
|
} |
|
|
if (list.size() > 0) |
|
|
if (list.size() > 0) |
|
|
{ |
|
|
{ |
|
|
baseMapper.batch${subClassName}Dao(list); |
|
|
baseMapper.batch${subClassName}list); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|