Hentua
2023-06-10 72e7d01b5b249ae1a079d19cdc62ecd2782c325c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//package cc.mrbird.febs.common.converter;
//
//import cc.mrbird.febs.common.utils.DateUtil;
//import com.wuwenze.poi.convert.WriteConverter;
//import com.wuwenze.poi.exception.ExcelKitWriteConverterException;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.lang3.StringUtils;
//
//import java.text.ParseException;
//
///**
// * Execl导出时间类型字段格式化
// *
// * @author MrBird
// */
//@Slf4j
//public class TimeConverter implements WriteConverter {
//    @Override
//    public String convert(Object value) {
//        if (value == null) {
//            return StringUtils.EMPTY;
//        } else {
//            try {
//                return DateUtil.formatCstTime(value.toString(), DateUtil.FULL_TIME_SPLIT_PATTERN);
//            } catch (ParseException e) {
//                String message = "时间转换异常";
//                log.error(message, e);
//                throw new ExcelKitWriteConverterException(message);
//            }
//        }
//    }
//}