导入问题(添加XX类型)
1.xxxDTO
@Excel(name = "XXX类型")
private String xxxTypeName;
2.ExcelImportService
// xxxType 0 xxxType1 1 xxxType2
String xxxType = DictUtil.getKey(DictUtil.xxxTypeMap,target.getxxxTypeName(),1);
if(xxxType != null) {
target.setxxxType(Integer.valueOf(xxxType));
}
3.DictUtil
public static final Map<String,String> xxxTypeMap = new HashMap<String, String>(){{
put("0","type1(对应名称)");
put("1","type2(对应名称)");
}};

浙公网安备 33010602011771号