List<T_ieo_playing> t_ieo_playings = tIeoPlayingService.exportExcel1(conditionStr);
File f = Files.createFileIfNoExists2("~/打币列表.xls");
ServletOutputStream ouputStream = response.getOutputStream();
try (OutputStream out = new FileOutputStream(f)) {
J4E.toExcel(out, t_ieo_playings, null);\
}
catch (Exception e){
e.printStackTrace();
}
return f;
问答
使用J4E导出Excel,导出的excel显示的内容是json 不是我想要的怎么处理
标签:
nutzwk
7 回复
{"id":"81da64a5a1204701b1f443d9ad84ec05","project_id":"1858e41517834ed583c897a3c082bdcb","project_name":"王磊测试01","buy_fee":2.000000000,"purchase_fee":20000.000000000,"uid":100059,"coin_name":"BTC","coin_id":"2","currency":"CCC","currency_id":"13","fee_per":10.000000000,"fee":0.200000000,"playing_coins":9.800000000,"status":2,"remarks":null,"opby":"a5265a9b16a049efab926266474da49e","opat":1535706350,"delflag":false,"create_time":null,"app_time":null,"submit_time":null,"platform_uid":191625,"price":10000.000000000,"statusstr":"已审核"} ["id", "project_id", "project_name", "buy_fee", "purchase_fee", "uid", "coin_name", "coin_id", "currency", "currency_id", "fee_per", "fee", "playing_coins", "status", "remarks", "opby", "opat", "delflag", "create_time", "app_time", "submit_time", "platform_uid", "price", "statusstr"]
{"id":"4cce0938880f41b69fe8002d8c0112fd","project_id":"b4a041cd74084113b36c4760464a1b90","project_name":"兑换usdt","buy_fee":800.000000000,"purchase_fee":0.800000000,"uid":100059,"coin_name":"USDT","coin_id":"15","currency":"BTC","currency_id":"2","fee_per":10.000000000,"fee":80.000000000,"playing_coins":720.000000000,"status":1,"remarks":"111","opby":"a5265a9b16a049efab926266474da49e","opat":1536212330,"delflag":false,"create_time":null,"app_time":"2018-09-01 16:39:54","submit_time":"2018-09-01 16:39:36","platform_uid":191625,"price":0.001000000,"statusstr":"待审核"} ["id", "project_id", "project_name", "buy_fee", "purchase_fee", "uid", "coin_name", "coin_id", "currency", "currency_id", "fee_per", "fee", "playing_coins", "status", "remarks", "opby", "opat", "delflag", "create_time", "app_time", "submit_time", "platform_uid", "price", "statusstr"]
{"id":"8e55bb5a863e472b846dc2e84654ac2c","project_id":"afc44cc7182d44f3bdefe29e568b57f0","project_name":"兑换111","buy_fee":2.000000000,"purchase_fee":200.000000000,"uid":100059,"coin_name":"USDT","coin_id":"15","currency":"CCC","currency_id":"13","fee_per":1.000000000,"fee":0.020000000,"playing_coins":1.980000000,"status":2,"remarks":null,"opby":"a5265a9b16a049efab926266474da49e","opat":1535959423,"delflag":false,"create_time":"2018-09-01 17:18:06","app_time":"2018-09-03 15:24:05","submit_time":"2018-09-03 15:24:11","platform_uid":191625,"price":100.000000000,"statusstr":"已审核"} ["id", "project_id", "project_name", "buy_fee", "purchase_fee", "uid", "coin_name", "coin_id", "currency", "currency_id", "fee_per", "fee", "playing_coins", "status", "remarks", "opby", "opat", "delflag", "create_time", "app_time", "submit_time", "platform_uid", "price", "statusstr"]
{"id":"4d1300a855cd475b8c51a011b22123d2","project_id":"a900d7e99d5e42178fc378937e09a35f","project_name":"兑换BTC","buy_fee":2.000000000,"purchase_fee":2000.000000000,"uid":100059,"coin_name":"BTC","coin_id":"2","currency":"CCC","currency_id":"13","fee_per":10.000000000,"fee":0.200000000,"playing_coins":1.800000000,"status":0,"remarks":null,"opby":"","opat":1536217291,"delflag":false,"create_time":"2018-09-06 15:01:31","app_time":null,"submit_time":null,"platform_uid":191625,"price":1000.000000000,"statusstr":"新建"} ["id", "project_id", "project_name", "buy_fee", "purchase_fee", "uid", "coin_name", "coin_id", "currency", "currency_id", "fee_per", "fee", "playing_coins", "status", "remarks", "opby", "opat", "delflag", "create_time", "app_time", "submit_time", "platform_uid", "price", "statusstr"]
{"id":"dfb84194b06349f9835e4757244adba1","project_id":"bf0a24475dca45b198cfc880fcbdcb06","project_name":"兑换专用2","buy_fee":200.000000000,"purchase_fee":20000.000000000,"uid":100059,"coin_name":"ETH","coin_id":"4","currency":"CCC","currency_id":"13","fee_per":20.000000000,"fee":40.000000000,"playing_coins":160.000000000,"status":2,"remarks":null,"opby":"a5265a9b16a049efab926266474da49e","opat":1535790988,"delflag":false,"create_time":null,"app_time":"2018-09-01 16:37:26","submit_time":"2018-09-01 17:28:47","platform_uid":191625,"price":100.000000000,"statusstr":"已审核"} ["id", "project_id", "project_name", "buy_fee", "purchase_fee", "uid", "coin_name", "coin_id", "currency", "currency_id", "fee_per", "fee", "playing_coins", "status", "remarks", "opby", "opat", "delflag", "create_time", "app_time", "submit_time", "platform_uid", "price", "statusstr"]
表格内容这样的
@J4EName("打币列表")
@Table("t_ieo_playing")
public class T_ieo_playing extends BaseModel implements Serializable {
private static final long serialVersionUID = 1L;
@J4EIgnore
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@J4EIgnore
@Column
@Comment("项目编号")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String project_id;
@J4EName("项目名称")
@Column
@Comment("项目名称")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String project_name;
@J4EName("兑换数量(用户)")
@Column
@Comment("兑换数量(用户)")
@ColDefine(customType = "DECIMAL(64,9)")
@Default("0")
private BigDecimal buy_fee;
@J4EName("兑换数量(项目方)")
@Column
@Comment("兑换数量(项目方)")
@ColDefine(customType = "DECIMAL(64,9)")
@Default("0")
private BigDecimal purchase_fee;
@J4EIgnore
@Column
@Comment("用户编号")
@ColDefine(type = ColType.INT, width = 11)
private int uid;
@J4EName("用户使用币名")
@Column
@Comment("用户使用币名")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String coin_name;
@J4EIgnore
@Column
@Comment("用户使用币编号")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String coin_id;
@J4EName("项目方币别")
@Column
@Comment("项目方币别")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String currency;
@J4EIgnore
@Column
@Comment("项目方币别编号")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String currency_id;
@J4EName("手续费百分比")
@Column
@Comment("手续费百分比")
@ColDefine(customType = "DECIMAL(64,9)")
@Default("0")
private BigDecimal fee_per;
@J4EName("手续费")
@Column
@Comment("手续费")
@ColDefine(customType = "DECIMAL(64,9)")
@Default("0")
private BigDecimal fee;
@J4EName("打币数量")
@Column
@Comment("打币数量")
@ColDefine(customType = "DECIMAL(64,9)")
@Default("0")
private BigDecimal playing_coins;
@J4EIgnore
@Column
@Comment("状态,0新建,1待审核,2已审核,3审核失败")
@ColDefine(type = ColType.INT, width = 11)
@Default("0")
private int status;
@J4EName("备注")
@Column
@Comment("备注")
@ColDefine(type = ColType.VARCHAR, width = 256)
private String remarks;
@J4EName("创建时间")
@Column
@Comment("创建时间(活动结束时间)")
@ColDefine(type = ColType.DATETIME)
private Date create_time;
@J4EName("申请时间")
@Column
@Comment("申请打币时间")
@ColDefine(type = ColType.DATETIME)
private Date app_time;
@J4EName("审核时间")
@Column
@Comment("审核时间")
@ColDefine(type = ColType.DATETIME)
private Date submit_time;
//兑换比例
@J4EName("兑换比例")
private BigDecimal price;
//状态字符
@J4EName("状态")
private String statusStr;
@wendal 是不是自定义sql 不能用这个实现
@wendal 我自定义sql 采用的这种方式
sql.setCallback(Sqls.callback.records());
添加回复
请先登陆