使用easypoi导出excel设置表头样式

使用easypoi导出excel设置表头属性

之前使用easypoi导出excel的时候,没太关注这个表头的样式设置,直到前几天看到个需求,需要表头设置蓝底白字,懵了。嘿嘿,不过百度了一下,懂了一点点。

导入easypoi

			<easypoi.version>4.0.0</easypoi.version>
			<!--easyPOI工具类 -->
			<dependency>
				<groupId>cn.afterturn</groupId>
				<artifactId>easypoi-base</artifactId>
				<version>${easypoi.version}</version>
			</dependency>
			<dependency>
				<groupId>cn.afterturn</groupId>
				<artifactId>easypoi-web</artifactId>
				<version>${easypoi.version}</version>
			</dependency>
			<dependency>
				<groupId>cn.afterturn</groupId>
				<artifactId>easypoi-annotation</artifactId>
				<version>${easypoi.version}</version>
			</dependency>

ExcelUtil

package com.aqara.project.utils;

import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Title: excel导出工具类
 * @Author: jackson
 * @Date: 2018-09-24 17:44
 */
@Slf4j
public class ExcelUtil {
    static ServletOutputStream out = null;

    private ExcelUtil() {
    }

    /**
     * 获取总页数
     */
    public static Long getTotalPage(Long totalCount, Long pageSize) {
        if (totalCount % pageSize == 0) {
            return totalCount / pageSize;
        } else {
            return (totalCount / pageSize) + 1;
        }
    }

    /**
     * 获取导出表格参数
     */
    public static ExportParams getExportParams(String title, String sheetName) {
        return new ExportParams(title, sheetName, ExcelType.XSSF);
    }

    /**
     * 适配集合+实体类方式导出
     */
    public static void exportExcel(String fileName, String title, String sheetName, List<?> list,
                                   Class<?> pojoClass,
                                   HttpServletResponse response) {
        ExportParams exportParams = new ExportParams(title, sheetName);
        exportParams.setType(ExcelType.XSSF); //此处格式对应下文文件名后缀xlsx
        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
        defaultExport(workbook, fileName, response);
    }

    public static void exportExcel(String fileName, String title, String sheetName, List<?> list,
                                   Class<?> pojoClass,
                                   HttpServletResponse response, boolean flag) {
        ExportParams exportParams = new ExportParams(title, sheetName);
        exportParams.setType(ExcelType.XSSF); //此处格式对应下文文件名后缀xlsx
        if (flag) {
            exportParams.setStyle(ExcelExportTitleStyle.class);
        }
        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
        defaultExport(workbook, fileName, response);
    }

    /**
     * 适配集合+实体类方式导出 专用于返回列表下还有统计总数、等
     */
    public static Workbook exportExcel(String fileName, String title, String sheetName, List<?> list,
                                       Class<?> pojoClass) {
        ExportParams exportParams = new ExportParams(title, sheetName);
        //此处格式对应下文文件名后缀xlsx
        exportParams.setType(ExcelType.XSSF);
        return ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
    }


    /**
     * 适配动态列的导出方式
     *
     * @param colList 动态列
     */
    public static void exportExcel(String fileName, String title, String sheetName,
                                   List<ExcelExportEntity> colList, List<Map<String, Object>> dataList,
                                   HttpServletResponse response) {
        ExportParams exportParams = new ExportParams(title, sheetName);
        exportParams.setType(ExcelType.XSSF); // 此处格式对应下文文件名后缀xlsx
        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, colList, dataList);
        defaultExport(workbook, fileName, response);
    }

    public static void defaultExport(Workbook workbook, String fileName, HttpServletResponse response) {
        defaultExport(workbook, fileName, response, "application/msexcel; charset=UTF-8");
    }

    public static void defaultBigDataExport(Workbook workbook, String fileName, HttpServletResponse response) {
        defaultExport(workbook, fileName, response, "application/vnd.openxmlformats-officedocument.drawing+xml; charset=UTF-8");
    }

    private static void defaultExport(Workbook workbook, String fileName, HttpServletResponse response
            , String contentType) {
        if (workbook == null) {
            log.warn("导出workbook对象(文件名:{})为空!请检查", fileName);
            return;
        }
        try {
            response.setCharacterEncoding("UTF-8");
            response.setHeader("Content-Disposition", "attachment;filename=" +
                    new String(fileName.getBytes("gbk"), "iso8859-1") + ".xlsx");
            response.setContentType(contentType);
            workbook.write(response.getOutputStream());
        } catch (IOException e) {
            log.error(e.getMessage(), e);
        }
    }


    /**
     * 导入excel,此种方式支持校验,但是无校验的信息
     */
    public static <T> List<T> importExcel(MultipartFile file, Integer titleRows, Integer headerRows, Integer sheetIndex,
                                          Class<T> pojoClass) throws Exception {
        ImportParams params = getParams(file, titleRows, headerRows);
        if (params == null) {
            return Collections.emptyList();
        }
        //要读取的 sheet数目
        params.setSheetNum(1);
        params.setStartSheetIndex(sheetIndex);
        return ExcelImportUtil.importExcel(file.getInputStream(), pojoClass, params);
    }

    /**
     * 导入excel,此种方式支持校验,也可获取校验的信息
     */
    public static <T> ExcelImportResult<T> importExcelMore(MultipartFile file, Integer titleRows
            , Integer headerRows, Class<T> pojoClass) throws Exception {
        ImportParams params = getParams(file, titleRows, headerRows);
        if (params == null) {
            return null;
        }
        return ExcelImportUtil.importExcelMore(file.getInputStream(), pojoClass, params);
    }


    private static ImportParams getParams(MultipartFile file, Integer titleRows, Integer headerRows) {
        if (file == null) {
            return null;
        }
        ImportParams params = new ImportParams();
        params.setTitleRows(titleRows);
        params.setHeadRows(headerRows);
        params.setNeedVerify(true);
        return params;
    }


    /**
     * 收集excel校验失败的信息
     */
    public static Boolean collectExcelVerifyFailMsg(StringBuilder rowMsg,
                                                    ExcelImportResult<? extends BaseImportExcelDto> importResult) {
        List<? extends BaseImportExcelDto> failList = importResult.getFailList();
        //无错误信息返回 true
        if (failList == null || failList.isEmpty()) {
            return true;
        }
        for (BaseImportExcelDto baseImportExcelDto : failList) {
            rowMsg.append("[excel第" + (baseImportExcelDto.getRowNum() + 1) + "行" +
                    baseImportExcelDto.getErrorMsg() + "];");
        }
        return false;
    }

    /**
     * 导出模板
     *
     * @param fileName  文件名
     * @param filePath  模板位置
     */
    public static void exportTemplateExcel(String fileName, String filePath,
                                           HttpServletResponse response) {
        try (InputStream inputStream = ExcelUtil.class.getResourceAsStream(filePath);
             XSSFWorkbook excelTemplate = new XSSFWorkbook(inputStream);
             OutputStream outputStream = response.getOutputStream()) {
            response.reset();
            response.setHeader("Content-Disposition",
                    "attachment;filename=" + new String(fileName.getBytes("gbk"), "iso8859-1")
                            + ".xlsx");
            response.setContentType("application/msexcel; charset=UTF-8");

            // 解决跨域问题
            response.addHeader("Access-Control-Allow-Origin", "*");

            excelTemplate.write(outputStream);
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            exportWarnMsg(response, "导出模板失败!,路径:" + filePath);
        }
    }

    /**
     * 通过response输出响应信息
     */
    public static void exportWarnMsg(HttpServletResponse response, String msg) {
        try {
            response.setContentType("application/json;charset-utf-8");
            ServletOutputStream outputStream = response.getOutputStream();
            outputStream.write(msg.getBytes(StandardCharsets.UTF_8));
            outputStream.flush();
            outputStream.close();
        } catch (IOException e) {
            log.error(e.getMessage(), e);
        }
    }


    public static void exportDesign(String fileName, String title, String sheetName, List<?> list, Class<?> pojoClass,
                                    HttpServletResponse response) {

        ExportParams exportParams = new ExportParams(title, sheetName);
        exportParams.setType(ExcelType.XSSF);
        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
        Sheet sheet = workbook.getSheet(sheetName);

        // 隐藏最后一列
        sheet.setColumnHidden(sheet.getRow(0).getPhysicalNumberOfCells() - 1, true);

        defaultExport(workbook, fileName, response);
    }

    /**
     * 导入excel,此种方式支持校验,也可获取校验的信息
     */
    public static <T> ExcelImportResult<T> importExcelWithVerifyMessages(
            MultipartFile file, Integer titleRows, Integer headerRows, Class<T> pojoClass)
            throws Exception {
        ImportParams params = getParams(file, titleRows, headerRows);
        if (params == null) {
            return null;
        }
        return ExcelImportUtil.importExcelMore(file.getInputStream(), pojoClass, params);
    }

    public static class BaseImportExcelDto implements IExcelModel, IExcelDataModel, Serializable {
        /**
         * 实现IExcelDataModel接口,返回行号
         */
        private int rowNum;

        /**
         * 实现IExcelModel接口,返回不符合的信息
         */
        private String errorMsg;

        @Override
        public int getRowNum() {
            return rowNum;
        }

        @Override
        public void setRowNum(int rowNum) {
            this.rowNum = rowNum;
        }

        @Override
        public String getErrorMsg() {
            return errorMsg;
        }

        @Override
        public void setErrorMsg(String errorMsg) {
            this.errorMsg = errorMsg;
        }
    }


    /**
     * @Description:创建一个sheet页的数据
     * @Author: weiwu
     * @Date: 2021-02-03
     **/
    public static Map<String, Object> createOneSheet(String sheetName, String title, Class<?> clazz, List<?> data) {
        ExportParams exportParams = new ExportParams(title, sheetName, ExcelType.XSSF);
        Map<String, Object> map = new HashMap<>();
        map.put("title", exportParams);//new ExportParams("title"+i, "sheetName"+i, ExcelType.XSSF)
        map.put("entity", clazz);
        map.put("data", data);
        return map;
    }

    /**
     * @Description:生成多个sheet页的Workbook
     * @Author: weiwu
     * @Date: 2021-02-03
     **/
    public static void exportExcelMultipleSheet(String fileName, List<Map<String, Object>> mapListList, HttpServletResponse response) {
        Workbook workbook = ExcelExportUtil.exportExcel(mapListList, ExcelType.XSSF);
        defaultExport(workbook, fileName, response);
    }

    public static final boolean checkExtensions(String extension) {
        return Lists.newArrayList("xls", "xlsx", "XLS", "XLSX").contains(extension);
    }


    public static void init(String fileName, HttpServletResponse response) throws IOException {
        out = response.getOutputStream();
        response.setHeader("Content-Disposition", "attachment;filename=" + new String((fileName).getBytes("gb2312"), StandardCharsets.ISO_8859_1) + ".xlsx");
        response.setContentType("multipart/form-data");
        response.setCharacterEncoding("utf-8");
    }
}

一切准备就绪

我们把一个list准备导出(注意实体类的字段加上@Excel的注解哦),一切准备好了发现可以导出来了。但是我们现在要修改样式问题。
ExportParams这个是easypoi,我们点进去发现,他的style属性使用了默认的ExcelExportStylerDefaultImpl这个类的属性,茅塞顿开,我决定自定义一个class,然后set他的style属性,这样不就可以使用我们自定义的属性了?

    /**
     * Excel 导出style
     */
    private Class<?> style = ExcelExportStylerDefaultImpl.class;

开始 (很重要)

我们新增一个类:ExcelExportTitleStyle,通过修改他的getTitleStyle方法进行我们的自定义颜色。

package com.aqara.agreement.utils;

import cn.afterturn.easypoi.excel.export.styler.AbstractExcelExportStyler;
import cn.afterturn.easypoi.excel.export.styler.IExcelExportStyler;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;

/**
 * 导出自定义title的工具类
 *
 * @author changjiang.liu
 * @date 2022/5/23 16:44
 */
public class ExcelExportTitleStyle extends AbstractExcelExportStyler
        implements IExcelExportStyler {
    public ExcelExportTitleStyle(Workbook workbook) {
        super.createStyles(workbook);
    }

    @Override
    public CellStyle getTitleStyle(short color) {
        CellStyle titleStyle = workbook.createCellStyle();
        // 自定义字体
        Font font = workbook.createFont();
        font.setColor(IndexedColors.WHITE1.getIndex());
        font.setBold(true);
        font.setFontName("宋体");
        titleStyle.setFont(font);

		// 自定义背景色
        titleStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex());
        titleStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);

        titleStyle.setBorderBottom(BorderStyle.THIN);
        titleStyle.setBorderTop(BorderStyle.THIN);
        titleStyle.setBorderLeft(BorderStyle.THIN);
        titleStyle.setBorderRight(BorderStyle.THIN);

        titleStyle.setAlignment(HorizontalAlignment.CENTER);
        titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
        titleStyle.setWrapText(true);
        return titleStyle;
    }

    @Override
    public CellStyle stringSeptailStyle(Workbook workbook, boolean isWarp) {
        CellStyle style = workbook.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        style.setDataFormat(STRING_FORMAT);
        if (isWarp) {
            style.setWrapText(true);
        }
        return style;
    }

    @Override
    public CellStyle getHeaderStyle(short color) {
        CellStyle titleStyle = workbook.createCellStyle();
        Font font = workbook.createFont();
        font.setFontHeightInPoints((short) 12);
        titleStyle.setFont(font);
        titleStyle.setAlignment(HorizontalAlignment.CENTER);
        titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
        return titleStyle;
    }

    @Override
    public CellStyle stringNoneStyle(Workbook workbook, boolean isWarp) {
        CellStyle style = workbook.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        style.setDataFormat(STRING_FORMAT);
        if (isWarp) {
            style.setWrapText(true);
        }
        return style;
    }

}

## 效果
在这里插入图片描述

  • 5
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: easypoi是一款JavaExcel导入导出工具,支持多级表头导出。在使用easypoi导出Excel时,可以通过设置表头的行数和列数来实现多级表头导出。具体实现方法可以参考easypoi的官方文档或者相关的教程。需要注意的是,在设置多级表头时,需要根据实际情况设置每个单元格的合并行数和列数,以确保表头的显示效果正确。 ### 回答2: Easypoi是一个JavaExcel处理框架,它可以方便快捷地导入和导出Excel文档。在使用Easypoi进行Excel导出时,实现多级表头的方法是非常简单的。 首先,需要在Java类中定义表头的结构。在Easypoi中,可以使用实体类的注解来定义表头,例如 @Excel(name = "学生信息", width = 20) 代表一个表头的名称为“学生信息”,宽度为20个字符。对于多级表头的情况,可以在实体类中嵌套另一个实体类来表示多级表头的结构。 接着,使用excel导出工具类进行导出。在使用Easypoi进行Excel导出时,可以使用ExcelExportUtil.exportExcel方法来实现。该方法需要传入一个Excel导出参数的包装类,其中包括Excel文档的标题、表头、表数据等信息。 对于多级表头的情况,可以通过设置ExcelExportParams的headMap参数来实现。该参数是一个Map<String, Integer>对象,其中key为表头的文本,value为该表头所占据的列数。例如,要实现一个两层表头,第一层表头为“学生信息”,占据4列;第二层表头为“基本信息”和“成绩信息”,分别占据2列,则可以定义headMap参数为: Map<String, Integer> headMap = new LinkedHashMap<>(); headMap.put("学生信息", 4); headMap.put("基本信息", 2); headMap.put("成绩信息", 2); 最后,调用ExcelExportUtil.exportExcel方法进行导出即可。完整的导出代码如下: ```java List<Student> students = new ArrayList<>(); // TODO: 设置学生列表数据 // 定义 Excel 导出参数 ExcelExportParams exportParams = new ExcelExportParams(); exportParams.setTitle("学生信息表"); exportParams.setHead(StudentExcelExportModel.class, headMap); // 导出 Excel Workbook workbook = ExcelExportUtil.exportExcel(exportParams, StudentExcelExportModel.class, students); workbook.write(outputStream); ``` 需要注意的是,ExcelExportParams的setHead方法需要传入一个Class类型的参数,用于指定表头的字段。这个Class可以和数据实体类不一致,因为其只关心表头信息。 综上所述,使用Easypoi导出Excel多级表头非常方便。只需在数据实体类中定义表头结构,然后设置Excel导出参数的headMap参数并调用ExcelExportUtil.exportExcel方法即可。 ### 回答3: Easypoi是一个开源的Java工具库,用于生成Excel、Word和Pdf等文档格式,它提供了简单易用的API,可以帮助我们快速导出Excel数据。在使用Easypoi导出Excel时,往往遇到多级表头的情况,本文将详细介绍Easypoi导出Excel多级表头的实现方法。 Easypoi支持导出Excel表头分为两种:固定表头和动态表头。因为不同类型的表头实现方式不同,所以我们需要分开讲解。 1. 固定表头导出 固定表头就是表头中包含多个级别,其中每个级别都是已经确定的,不会随数据量的增加而增加。在Easypoi中,我们可以使用@TableStyle注解中的headRows和secondHeadRows来设置多级表头的行数,具体实现步骤如下: ① 在需要导出的实体类中定义表头,例如: public class Student { @Excel(name = "学号", orderNum = "0", width = 15) private String id; @Excel(name = "姓名", orderNum = "1", width = 15) private String name; @Excel(name = "语文", orderNum = "2", width = 15) private Integer chinese; @Excel(name = "数学", orderNum = "3", width = 15) private Integer math; @Excel(name = "英语", orderNum = "4", width = 15) private Integer english; } ② 在需要导出的Controller中设置表格样式使用@TableStyle注解,例如: @GetMapping("/exportStudent") public void exportStudent(HttpServletResponse response) throws IOException { // 模拟数据 List<Student> studentList = new ArrayList<>(); Student stu1 = new Student("001", "张三", 80, 88, 90); Student stu2 = new Student("002", "李四", 85, 90, 87); studentList.add(stu1); studentList.add(stu2); // 设置表格样式 TableStyle style = new TableStyle(); style.setTableHeadFont(getFontHeight((short) 12, "黑体")); style.setTableContentBackGroundColor(IndexedColors.WHITE); style.setTableHeadBackGroundColor(IndexedColors.PINK1); style.setTableTitleBackGroundColor(IndexedColors.GOLD); style.setTableTitleFont(getFontHeight((short) 16, "楷体_GB2312")); style.setTableHeadSecondBackGroundColor(IndexedColors.LIGHT_YELLOW); style.setTableHeadThreeBackGroundColor(IndexedColors.LIGHT_ORANGE); // 表头分两行,第一行3列,第二行2列 style.setHeadRows(1); style.setSecondHeadRows(1); // 导出Excel文件 ExportParams params = new ExportParams("学生信息表", "学生信息", ExcelType.XSSF); params.setStyle(style); Workbook workbook = ExcelExportUtil.exportExcel(params, Student.class, studentList); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(params.getExcelName(), "UTF-8")); response.flushBuffer(); workbook.write(response.getOutputStream()); } ③ 运行程序即可看到导出Excel文件中含有多级表头。 2. 动态表头导出 动态表头就是表头中包含多个级别,其中每个级别的列数是不固定的,会根据实际数据动态增加。在Easypoi中,我们可以通过定义NestedColumn注解的方式动态设置表头名称和列数,具体实现步骤如下: ① 在需要导出的实体类中定义表头,例如: public class Student { @Excel(name = "学号", orderNum = "0", width = 15) private String id; @Excel(name = "姓名", orderNum = "1", width = 15) private String name; @Excel(name = "成绩", orderNum = "2", width = 15) @NestedColumn(nestedColumns = {@Excel(name = "语文", orderNum = "1", width = 15), @Excel(name = "数学", orderNum = "2", width = 15), @Excel(name = "英语", orderNum = "3", width = 15)}) private List<Double> scores; } ② 在需要导出的Controller中设置表格样式,例如: @GetMapping("/exportStudent") public void exportStudent(HttpServletResponse response) throws IOException { // 模拟数据 List<Student> studentList = new ArrayList<>(); Student stu1 = new Student("001", "张三", Arrays.asList(80.0, 88.0, 90.0)); Student stu2 = new Student("002", "李四", Arrays.asList(85.0, 90.0, 87.0)); studentList.add(stu1); studentList.add(stu2); // 设置表格样式 TableStyle style = new TableStyle(); style.setTableHeadFont(getFontHeight((short) 12, "黑体")); style.setTableContentBackGroundColor(IndexedColors.WHITE); style.setTableHeadBackGroundColor(IndexedColors.PINK1); style.setTableTitleBackGroundColor(IndexedColors.GOLD); style.setTableTitleFont(getFontHeight((short) 16, "楷体_GB2312")); style.setTableHeadSecondBackGroundColor(IndexedColors.LIGHT_YELLOW); style.setTableHeadThreeBackGroundColor(IndexedColors.LIGHT_ORANGE); // 导出Excel文件 ExportParams params = new ExportParams("学生信息表", "学生信息", ExcelType.XSSF); params.setStyle(style); Workbook workbook = ExcelExportUtil.exportExcel(params, Student.class, studentList); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(params.getExcelName(), "UTF-8")); response.flushBuffer(); workbook.write(response.getOutputStream()); } ③ 运行程序即可看到动态表头导出结果。 以上就是Easypoi导出Excel多级表头的实现方法。对于不同类型的表头,我们可以根据需要选择对应的方式实现,使得表格样式更加美观、易于理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值