TienChin 渠道管理-渠道导出
原创
©著作权归作者所有:来自51CTO博客作者一个爱听音乐的程序员的原创作品,请联系作者获取转载授权,否则将追究法律责任
ChannelController
/**
* 导出渠道列表
*/
@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
/**
* 渠道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;