1、当使用mybatis plus时,可用@TableField(exist = false)
@Data
@TableName("comp_sta_scale_t")
public class Scale implements Serializable {/*** 唯一主键*/@TableIdprivate String id;/*** 资源id*/@Excel(name = "资源id", mergeVertical = true)private String resourceId;/*** 策略名称*/@TableField(exist = false)@Excel(name = "策略名称", mergeVertical = true)private String strategyName;}
2、当没使用mybatis-plus时,其他如jpa、mybatis,可用@Transient