|
|
@ -69,7 +69,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
|
#end |
|
|
|
#end |
|
|
|
#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); |
|
|
|
return rows; |
|
|
|
#else |
|
|
@ -95,7 +95,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class |
|
|
|
#end |
|
|
|
#end |
|
|
|
#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); |
|
|
|
#end |
|
|
|
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) |
|
|
|
{ |
|
|
|
#if($table.sub) |
|
|
|
baseMapper.delete${subClassName}DaoBy${subTableFkClassName}s(${pkColumn.javaField}s); |
|
|
|
baseMapper.delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaField}s); |
|
|
|
#end |
|
|
|
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}) |
|
|
|
{ |
|
|
|
#if($table.sub) |
|
|
|
baseMapper.delete${subClassName}DaoBy${subTableFkClassName}(${pkColumn.javaField}); |
|
|
|
baseMapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField}); |
|
|
|
#end |
|
|
|
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) |
|
|
|
{ |
|
|
|
baseMapper.batch${subClassName}Dao(list); |
|
|
|
baseMapper.batch${subClassName}list); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|