Commit 9f7867a7 authored by zhaobiyan's avatar zhaobiyan

兑换信息导入

parent 64378e69
......@@ -91,11 +91,11 @@ public class RedeemRewardController {
public void importTemplate(HttpServletResponse response) throws IOException {
// 手动创建导出 demo
List<RedeemInfoImportExcelVO> list = Arrays.asList(
RedeemInfoImportExcelVO.builder().id(1111L).redeemType("上门领取").courierCompany("顺丰空运").expenses(BigDecimal.valueOf(11.11))
.currency("人民币").expressDate(new Date()).expressNo("SDSD212212").remark("备注备注").expressSender("系统管理员")
RedeemInfoImportExcelVO.builder().id(String.valueOf(11111)).redeemType("上门领取").courierCompany("顺丰空运").expenses(BigDecimal.valueOf(11.11))
.currency("人民币").expressDate("2024-01-01 11:22:33").expressNo("SDSD212212").remark("备注备注").expressSender("系统管理员")
.build(),
RedeemInfoImportExcelVO.builder().id(2222L).redeemType("包邮到家").courierCompany("顺丰空运").expenses(BigDecimal.valueOf(11.11))
.currency("美元").expressDate(new Date()).expressNo("SDSD212212").remark("备注备注").expressSender("系统管理员")
RedeemInfoImportExcelVO.builder().id(String.valueOf(11111)).redeemType("包邮到家").courierCompany("顺丰空运").expenses(BigDecimal.valueOf(11.11))
.currency("美元").expressDate("2024-01-01 11:22:33").expressNo("SDSD212212").remark("备注备注").expressSender("系统管理员")
.build());
// 输出
ExcelUtils.write(response, "兑换信息导入模板.xls", "兑换信息", RedeemInfoImportExcelVO.class, list);
......
package cn.iocoder.yudao.module.reward.vo.reward;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......@@ -9,9 +8,6 @@ import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Data
@Builder
......@@ -20,7 +16,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Accessors(chain = false)
public class RedeemInfoImportExcelVO {
@ExcelProperty("兑换记录ID/Redeem ID")
private Long id;
private String id;
@ExcelProperty("兑换方式/Redeem Method")
private String redeemType;
@ExcelProperty("费用/fee")
......@@ -32,8 +28,7 @@ public class RedeemInfoImportExcelVO {
@ExcelProperty("快递单号/Express NO")
private String expressNo;
@ExcelProperty(value = "快递日期/Delivery Date")
@DateTimeFormat(value = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date expressDate;
private String expressDate;
@ExcelProperty("快递寄出人/Sender")
private String expressSender;
@ExcelProperty("备注/Remark")
......
......@@ -1019,4 +1019,5 @@ reward.redeem.verify.back.status = record status must be redeemed
redeem.import.max.count = allow maximum number of imports is {}
dict.unknown.error = Not in dict {0}: {1}
express.not.exist = express not exist
currency.not.exist = currency not exist
\ No newline at end of file
currency.not.exist = currency not exist
date.format.error = date format error, for example : 2024-01-01 12:11:11
\ No newline at end of file
......@@ -1023,4 +1023,5 @@ reward.redeem.verify.back.status = \u56DE\u9000\u8BB0\u5F55\u72B6\u6001\u5FC5\u9
redeem.import.max.count = \u5141\u8BB8\u7684\u6700\u5927\u5BFC\u5165\u6761\u6570\u4E3A{}
dict.unknown.error = \u4E0D\u5728{0}\u5B57\u5178\u4E2D: {1}
express.not.exist = \u5FEB\u9012\u516C\u53F8\u4E0D\u5B58\u5728
currency.not.exist = \u5E01\u79CD\u4E0D\u5B58\u5728
\ No newline at end of file
currency.not.exist = \u5E01\u79CD\u4E0D\u5B58\u5728
date.format.error = \u65E5\u671F\u683C\u5F0F\u4E0D\u6B63\u786E, \u6B63\u786E\u683C\u5F0F\u53C2\u8003: 2024-01-01 12:11:11
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment