package com.bofeng.entity; import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Getter; import lombok.Setter; import java.io.UnsupportedEncodingException; @Getter @Setter @TableName("sys_user_open") public class UserOpen { @TableId("open_id") private String openId; @TableField("user_id") private Long userId; @TableField("be_active") private String beActive; @ExcelProperty(value = "昵称", index = 0) @TableField("nick_name") private String nickName; private String getNicName() throws UnsupportedEncodingException { byte[] utf8Bytes = nickName.getBytes("UTF-8"); String nickName = new String(utf8Bytes, "UTF-8"); return nickName; } @ExcelProperty(value = "性别", index = 1) @TableField("sex_desc") private String sexDesc; @TableField("sex") private Integer sex; @ExcelProperty(value = "城市", index = 2) @TableField("city") private String city; @ExcelProperty(value = "省", index = 3) @TableField("province") private String province; @ExcelProperty(value = "国家", index = 4) @TableField("country") private String country; @TableField("head_img_url") private String headImgUrl; }