Browse Source

修改注释,代码缩进调整

pull/2591/head
xiajiafu 3 years ago
parent
commit
a8d2934775
  1. 6
      easyexcel-core/src/main/java/com/alibaba/excel/annotation/format/KeyValueFormat.java
  2. 6
      easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/kvformat/KeyValueData.java

6
easyexcel-core/src/main/java/com/alibaba/excel/annotation/format/KeyValueFormat.java

@ -7,12 +7,12 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
/** /**
* Convert key value format. * Convert key&value format.
* *
* <p> * <p>
* write: It can be used on classes {@link String} or {@link Integer} * write: It can be used on classes {@link String} or {@link Integer}
* <p> * <p>
* read: It can be used on classes {@link String} * read: It can be used on classes {@link String} or {@link Integer}
* *
* @author xiajiafu * @author xiajiafu
* @since 2022/7/13 * @since 2022/7/13
@ -23,7 +23,7 @@ import java.lang.annotation.Target;
public @interface KeyValueFormat { public @interface KeyValueFormat {
/** /**
* the class which converts java data or excel data.It may be a enum class. * the class which converts java data or excel data.
* *
* @return class * @return class
*/ */

6
easyexcel-test/src/test/java/com/alibaba/easyexcel/test/core/kvformat/KeyValueData.java

@ -19,13 +19,11 @@ public class KeyValueData {
private String name; private String name;
@ExcelProperty(value = "单位类型") @ExcelProperty(value = "单位类型")
@KeyValueFormat(targetClass = DepartmentEnum.class, javaify = "getKeyByDesc", @KeyValueFormat(targetClass = DepartmentEnum.class, javaify = "getKeyByDesc", excelify = "getDescByKey")
excelify = "getDescByKey")
private Integer ouType; private Integer ouType;
@ExcelProperty(value = "性别") @ExcelProperty(value = "性别")
@KeyValueFormat(targetClass = SexTypeEnum.class, javaify = "getKeyByDesc", @KeyValueFormat(targetClass = SexTypeEnum.class, javaify = "getKeyByDesc", excelify = "getDescByKey")
excelify = "getDescByKey")
private String sexType; private String sexType;
} }

Loading…
Cancel
Save