diff --git a/lzbi-generator/src/main/resources/vm/java/mapper.java.vm b/lzbi-generator/src/main/resources/vm/java/mapper.java.vm index 7042b2e..83ffffc 100644 --- a/lzbi-generator/src/main/resources/vm/java/mapper.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/mapper.java.vm @@ -4,7 +4,7 @@ import java.util.List; import ${packageName}.domain.${ClassName}Dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; #if($table.sub) -import ${packageName}.domain.${subClassName}; +import ${packageName}.domain.${subClassName}Dao; #end /** @@ -79,7 +79,7 @@ public interface ${ClassName}Mapper extends BaseMapper<${ClassName}Dao> * @param ${subclassName}DaoList ${subTable.functionName}列表 * @return 结果 */ - public int batch${subClassNameDao}(List<${subClassName}Dao> ${subclassName}DaoList); + public int batch${subClassName}Dao(List<${subClassName}Dao> ${subclassName}DaoList); /** diff --git a/lzbi-generator/src/main/resources/vm/java/service.java.vm b/lzbi-generator/src/main/resources/vm/java/service.java.vm index 3e5df42..d526785 100644 --- a/lzbi-generator/src/main/resources/vm/java/service.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/service.java.vm @@ -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); } } } diff --git a/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm b/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm index 3f71180..14e9001 100644 --- a/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm +++ b/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm @@ -11,11 +11,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #if($table.sub) - + - + #foreach ($column in $subTable.columns) #end @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName} - #foreach($column in $columns) @@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - #if($table.crud || $table.tree) where ${pkColumn.columnName} = #{${pkColumn.javaField}} diff --git a/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java b/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java index e77587e..d9752e7 100644 --- a/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java +++ b/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java @@ -91,7 +91,7 @@ public class CodeRuleSerialController extends BaseController { public AjaxResult getBillNo(@PathVariable String node) { String billNo = ""; long serialsize = 4; - //查询订单头 + // CodeRuleDefine codeRuleDefine = codeRuleDefineService.selectCodeRuleDefineByDefineId(0L); if (codeRuleDefine.getDefHeader().isEmpty()) { return AjaxResult.error("没有定义过ID为" + String.valueOf(0) + "的编号规则类型!");