Excel导出子对象支持多个字段

This commit is contained in:
RuoYi
2019-06-12 16:48:23 +08:00
parent 90de1067d8
commit d76c57a691
5 changed files with 235 additions and 141 deletions

View File

@ -17,7 +17,7 @@ public @interface Excel
/**
* 导出到Excel中的名字.
*/
public String name();
public String name() default "";
/**
* 日期格式, 如: yyyy-MM-dd

View File

@ -0,0 +1,18 @@
package com.ruoyi.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Excel注解集
*
* @author ruoyi
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Excels
{
Excel[] value();
}