TienChin 渠道管理-渠道导出

2023-10-12 14:47:54 浏览数 (1)

ChannelController

代码语言:javascript复制
/**
 * 导出渠道列表
 */
@PreAuthorize("hasPermission('tienchin:channel:export')")
@Log(title = "渠道管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ChannelVO channelVO) {
    List<Channel> channelList = iChannelService.selectChannelList(channelVO);
    ExcelUtil<Channel> util = new ExcelUtil<>(Channel.class);
    util.exportExcel(response, channelList, "渠道数据");
}

Channel.java

代码语言:javascript复制
/**
 * 渠道id
 */
@TableId(value = "channel_id", type = IdType.AUTO)
@Excel(name = "渠道编号", cellType = Excel.ColumnType.NUMERIC)
private Integer channelId;

/**
 * 渠道名称
 */
@Excel(name = "渠道名称")
private String channelName;

/**
 * 渠道状态
 * 1 正常,0 禁用
 */
@Excel(name = "渠道状态", readConverterExp = "1=正常,0=禁用")
private Byte status;

/**
 * 备注信息
 */
@Excel(name = "备注信息")
private String remark;

/**
 * 渠道类型:1 线上渠道 2 线下渠道
 */
@Excel(name = "渠道类型", readConverterExp = "1=线上渠道,2=线下渠道")
private Integer type;

0 人点赞