Browse Source

2023-12-15 修改代码生成器的bug

develop
zhousq 11 months ago
parent
commit
dc70d46e8a
  1. 6
      lzbi-generator/src/main/resources/vm/java/domain.java.vm
  2. 3
      lzbi-generator/src/main/resources/vm/java/service.java.vm
  3. 6
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiBillModelMaster.java

6
lzbi-generator/src/main/resources/vm/java/domain.java.vm

@ -6,6 +6,8 @@ import ${import};
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import com.lzbi.common.annotation.Excel;
#if($table.crud || $table.sub)
import com.lzbi.module.base.BaseModuleEntity;
@ -25,6 +27,7 @@ import com.lzbi.common.core.domain.TreeEntity;
#set($Entity="TreeEntity")
#end
@Data
@Accessors(chain = true)
public class ${ClassName} extends ${Entity}
{
private static final long serialVersionUID = 1L;
@ -41,11 +44,14 @@ public class ${ClassName} extends ${Entity}
#end
#if($parentheseIndex != -1)
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
@ApiModelProperty(name = "${comment}",notes = "")
#elseif($column.javaType == 'Date')
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "${comment}",notes = "")
#else
@Excel(name = "${comment}")
@ApiModelProperty(name = "${comment}",notes = "$column.javaField")
#end
#end
private $column.javaType $column.javaField;

3
lzbi-generator/src/main/resources/vm/java/service.java.vm

@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
#if($table.sub)
import java.util.ArrayList;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.StringUtils
import org.springframework.transaction.annotation.Transactional;
import ${packageName}.domain.${subClassName};
#end
@ -156,7 +157,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class
}
if (list.size() > 0)
{
baseMapper.batch${subClassName}list);
baseMapper.batch${subClassName}(list);
}
}
}

6
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiBillModelMaster.java

@ -1,15 +1,9 @@
package com.lzbi.draft.domain;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;

Loading…
Cancel
Save