Skip to content

Commit

Permalink
✨ excel-spring-boot-starter v3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
twelvet-s committed Dec 11, 2024
1 parent 72bf15c commit 7ae3898
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion data/twelvet_gen.sql
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ VALUES (7, 'SQL', '${backendPath}/${className}.sql', 'SQL',
'2023-11-09 14:33:56', '2023-11-10 11:13:07', '0', 'admin', 'admin');
INSERT INTO `gen_template`
VALUES (8, '实体', '${backendPath}/src/main/java/${packagePath}/domain/${ClassName}.java', '实体',
'package ${packageName}.domain;\n\n#foreach ($import in $importList)\nimport ${import};\n#end\nimport com.alibaba.excel.annotation.ExcelProperty;\nimport com.twelvet.framework.core.application.domain.BaseEntity;\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3.builder.ToStringStyle;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n#if($table.crud || $table.sub)\n#elseif($table.tree)\nimport com.twelvet.framework.jdbc.web.domain.TreeEntity;\n#end\n\n/**\n * ${functionName}对象 ${tableName}\n *\n * @author ${author}\n * @WebSite twelvet.cn\n * @date ${datetime}\n */\n#if($table.crud || $table.sub)\n#set($Entity=\"BaseEntity\")\n#elseif($table.tree)\n#set($Entity=\"TreeEntity\")\n#end\n@Schema(description =\"${functionName}对象\")\npublic class ${ClassName} extends ${Entity} {\n\n private static final long serialVersionUID = 1L;\n\n#foreach ($column in $columns)\n #if(!$table.isSuperColumn($column.javaField))\n /** $column.columnComment */\n @Schema(description = \"$column.columnComment\")\n #if($column.list)\n #set($parentheseIndex=$column.columnComment.indexOf(\"(\"))\n #if($parentheseIndex != -1)\n #set($comment=$column.columnComment.substring(0, $parentheseIndex))\n #else\n #set($comment=$column.columnComment)\n #end\n #if($parentheseIndex != -1)\n @ExcelProperty(value =\"${comment}($column.readConverterExp())\")\n #elseif($column.javaType == \'Date\')\n @JsonFormat(pattern = \"yyyy-MM-dd\")\n @ExcelProperty(value =\"${comment}\", width = 30, dateFormat = \"yyyy-MM-dd\")\n #else\n @ExcelProperty(value =\"${comment}\")\n #end\n #end\n private $column.javaType $column.javaField;\n\n #end\n#end\n#if($table.sub)\n /** $table.subTable.functionName信息 */\n private List<${subClassName}> ${subclassName}List;\n\n#end\n#foreach ($column in $columns)\n#if(!$table.isSuperColumn($column.javaField))\n#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches(\"[A-Z]\"))\n#set($AttrName=$column.javaField)\n#else\n#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})\n#end\n public void set${AttrName}($column.javaType $column.javaField)\n {\n this.$column.javaField = $column.javaField;\n }\n\n public $column.javaType get${AttrName}()\n {\n return $column.javaField;\n }\n#end\n#end\n\n#if($table.sub)\n public List<${subClassName}> get${subClassName}List()\n {\n return ${subclassName}List;\n }\n\n public void set${subClassName}List(List<${subClassName}> ${subclassName}List)\n {\n this.${subclassName}List = ${subclassName}List;\n }\n\n#end\n @Override\n public String toString() {\n return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)\n#foreach ($column in $columns)\n#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches(\"[A-Z]\"))\n#set($AttrName=$column.javaField)\n#else\n#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})\n#end\n .append(\"${column.javaField}\", get${AttrName}())\n#end\n#if($table.sub)\n .append(\"${subclassName}List\", get${subClassName}List())\n#end\n .toString();\n }\n}\n',
'package ${packageName}.domain;\n\n#foreach ($import in $importList)\nimport ${import};\n#end\nimport cn.idev.excel.annotation.ExcelProperty;\nimport com.twelvet.framework.core.application.domain.BaseEntity;\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3.builder.ToStringStyle;\n\nimport io.swagger.v3.oas.annotations.media.Schema;\n#if($table.crud || $table.sub)\n#elseif($table.tree)\nimport com.twelvet.framework.jdbc.web.domain.TreeEntity;\n#end\n\n/**\n * ${functionName}对象 ${tableName}\n *\n * @author ${author}\n * @WebSite twelvet.cn\n * @date ${datetime}\n */\n#if($table.crud || $table.sub)\n#set($Entity=\"BaseEntity\")\n#elseif($table.tree)\n#set($Entity=\"TreeEntity\")\n#end\n@Schema(description =\"${functionName}对象\")\npublic class ${ClassName} extends ${Entity} {\n\n private static final long serialVersionUID = 1L;\n\n#foreach ($column in $columns)\n #if(!$table.isSuperColumn($column.javaField))\n /** $column.columnComment */\n @Schema(description = \"$column.columnComment\")\n #if($column.list)\n #set($parentheseIndex=$column.columnComment.indexOf(\"(\"))\n #if($parentheseIndex != -1)\n #set($comment=$column.columnComment.substring(0, $parentheseIndex))\n #else\n #set($comment=$column.columnComment)\n #end\n #if($parentheseIndex != -1)\n @ExcelProperty(value =\"${comment}($column.readConverterExp())\")\n #elseif($column.javaType == \'Date\')\n @JsonFormat(pattern = \"yyyy-MM-dd\")\n @ExcelProperty(value =\"${comment}\", width = 30, dateFormat = \"yyyy-MM-dd\")\n #else\n @ExcelProperty(value =\"${comment}\")\n #end\n #end\n private $column.javaType $column.javaField;\n\n #end\n#end\n#if($table.sub)\n /** $table.subTable.functionName信息 */\n private List<${subClassName}> ${subclassName}List;\n\n#end\n#foreach ($column in $columns)\n#if(!$table.isSuperColumn($column.javaField))\n#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches(\"[A-Z]\"))\n#set($AttrName=$column.javaField)\n#else\n#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})\n#end\n public void set${AttrName}($column.javaType $column.javaField)\n {\n this.$column.javaField = $column.javaField;\n }\n\n public $column.javaType get${AttrName}()\n {\n return $column.javaField;\n }\n#end\n#end\n\n#if($table.sub)\n public List<${subClassName}> get${subClassName}List()\n {\n return ${subclassName}List;\n }\n\n public void set${subClassName}List(List<${subClassName}> ${subclassName}List)\n {\n this.${subclassName}List = ${subclassName}List;\n }\n\n#end\n @Override\n public String toString() {\n return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)\n#foreach ($column in $columns)\n#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches(\"[A-Z]\"))\n#set($AttrName=$column.javaField)\n#else\n#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})\n#end\n .append(\"${column.javaField}\", get${AttrName}())\n#end\n#if($table.sub)\n .append(\"${subclassName}List\", get${subClassName}List())\n#end\n .toString();\n }\n}\n',
'2023-11-09 14:52:04', '2023-11-10 16:18:52', '0', 'admin', 'admin');
INSERT INTO `gen_template`
VALUES (9, 'React页面', '${frontendPath}/react/pages/${moduleName}/${businessName}/index.tsx', 'React页面',
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<jasypt.version>3.0.5</jasypt.version>

<xss-spring-boot-starter.version>3.1.5.1</xss-spring-boot-starter.version>
<excel-spring-boot-starter.version>3.3.1</excel-spring-boot-starter.version>
<excel-spring-boot-starter.version>3.4.0</excel-spring-boot-starter.version>
<oss-spring-boot-starter.version>3.0.0</oss-spring-boot-starter.version>
<idempotent-spring-boot-starter.version>0.4.0</idempotent-spring-boot-starter.version>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.twelvet.framework.core.application.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import cn.idev.excel.annotation.ExcelIgnore;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import com.twelvet.framework.core.constants.UserConstants;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.gen.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.gen.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.gen.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.gen.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.gen.api.domain.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.gen.api.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.quartz.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.twelvet.framework.core.application.domain.BaseEntity;
import com.twelvet.framework.utils.CronUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.twelvet.quartz.api.domain;

import com.twelvet.framework.core.application.domain.BaseEntity;
import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.twelvet.system.api.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelIgnore;
import cn.idev.excel.annotation.ExcelProperty;
import com.twelvet.framework.core.application.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
Expand Down

0 comments on commit 7ae3898

Please sign in to comment.