| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- package com.cyksj.model.excel;
- import cn.hutool.core.util.URLUtil;
- import com.alibaba.excel.annotation.ExcelIgnore;
- import com.alibaba.excel.annotation.ExcelProperty;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.ejlchina.searcher.bean.DbField;
- import com.ejlchina.searcher.bean.DbIgnore;
- import com.ejlchina.searcher.bean.SearchBean;
- import lombok.Getter;
- import lombok.Setter;
- import java.util.Date;
- /*
- *项目名: netflix
- *文件名: ExcelExchangeCodeData
- *创建者: JavaZou
- *创建时间:2022/11/7 16:44
- */
- @Getter
- @Setter
- @SearchBean(tables = "exchange_code ec left join user u on u.id = ec.user_id",
- where = "ec.type = 0 :condition:")
- public class ExcelExchangeCodeData {
- /**
- * 生成日期
- */
- @ExcelProperty("生成日期")
- @DbField("ec.created_time")
- private Date createdTime;
- @ExcelProperty("兑换码/链接")
- @DbField("ec.code")
- private String code;
- /**
- * 平台规格
- */
- @ExcelProperty("平台规格")
- @DbIgnore
- private String title;
- /**
- * 使用状态str
- */
- @ExcelProperty("使用状态")
- @DbField("if(ec.use_status,'已使用','未使用')")
- @TableField(exist = false)
- private String useStatusStr;
- /**
- * 使用状态
- */
- @DbField("ec.use_status")
- @ExcelIgnore
- private Boolean useStatus;
- /**
- * 使用时间
- */
- @ExcelProperty("使用时间")
- @DbField("ec.use_time")
- private Date useTime;
- /**
- * 使用用户
- */
- @ExcelProperty("使用用户")
- @DbField("u.nickname")
- private String nickName;
- /**
- * 用户id
- */
- @ExcelProperty("用户id")
- @DbField("u.id")
- private Long userId;
- @DbField("ec.operator")
- @ExcelIgnore
- private String operator;
- @ExcelIgnore
- @DbField("ec.code_type")
- private Integer codeType;
- public String getCode() {
- if (codeType == 2) {
- return "https://nf.video/exchange?code=" + URLUtil.encode(code);
- }
- return code;
- }
- }
|