网站开发源代码/简述什么是百度竞价排名
写模板
模板图片:
实体类(这里没有用@Data 是因为Lombok和easyExcal的版本冲突,在导入读取的时候获取不到值)
package cn.iocoder.yudao.module.project.controller.admin.goods.vo;import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;
import lombok.NoArgsConstructor;import java.math.BigDecimal;
import java.util.List;
import java.util.Map;/*** 商品下载模板* @author px*/
public class GoodsTemplateExcelVO {@ExcelProperty(index = 0)private String bn;@ExcelProperty(index = 1)private String productName;@ExcelProperty(index = 2)private String brandNameCn;@ExcelProperty(index = 3)private String brandNameEn;@ExcelProperty(index = 4)private String brandLogo;@ExcelProperty(index = 5)private String url;@ExcelProperty(index = 6)private String jingle;@ExcelProperty(index = 7)private String categoryName1;@ExcelProperty(index = 8)private String categoryName2;@ExcelProperty(index = 9)private String categoryName3;@ExcelProperty(index = 10)private String unit;@ExcelProperty(index = 11)private String model;@ExcelProperty(index = 12)private String pakeageSpec;@ExcelProperty(index = 13)private String taxCode;@ExcelProperty(index = 14)private String outputTaxRate;@ExcelProperty(index = 15)private String codeBar;@ExcelProperty(index = 16)private BigDecimal price;@ExcelProperty(index = 17)private BigDecimal actualPrice;@ExcelProperty(index = 18)private String discountRate;@ExcelProperty(index = 19)private String isReturnStr;@ExcelProperty(index = 20)private String onlineStateStr;@ExcelProperty(index = 21)private Integer deliveryTime;@ExcelProperty(index = 22)private Integer arrivalTime;@ExcelProperty(index = 23)private Integer batchNum;@ExcelProperty(index = 24)private String firstAreaName;@ExcelProperty(index = 25)private String secondAreaName;@ExcelProperty(index = 26)private String thirdAreaName;@ExcelProperty(index = 27)private String storageArea;@ExcelProperty(index = 28)private Integer storage;@ExcelProperty(index = 29)private String attrJson;@ExcelProperty(index = 30)private String exceptionList;@ExcelIgnoreprivate String projectName;@ExcelIgnoreprivate Integer queueId;public String getBn() {return bn;}public void setBn(String bn) {this.bn = bn;}public String getProductName() {return productName;}public void setProductName(String productName) {this.productName = productName;}public String getBrandNameCn() {return brandNameCn;}public void setBrandNameCn(String brandNameCn) {this.brandNameCn = brandNameCn;}public String getBrandNameEn() {return brandNameEn;}public void setBrandNameEn(String brandNameEn) {this.brandNameEn = brandNameEn;}public String getBrandLogo() {return brandLogo;}public void setBrandLogo(String brandLogo) {this.brandLogo = brandLogo;}public String getUrl() {return url;}public void setUrl(String url) {this.url = url;}public String getJingle() {return jingle;}public void setJingle(String jingle) {this.jingle = jingle;}public String getCategoryName1() {return categoryName1;}public void setCategoryName1(String categoryName1) {this.categoryName1 = categoryName1;}public String getCategoryName2() {return categoryName2;}public void setCategoryName2(String categoryName2) {this.categoryName2 = categoryName2;}public String getCategoryName3() {return categoryName3;}public void setCategoryName3(String categoryName3) {this.categoryName3 = categoryName3;}public String getUnit() {return unit;}public void setUnit(String unit) {this.unit = unit;}public String getModel() {return model;}public void setModel(String model) {this.model = model;}public String getPakeageSpec() {return pakeageSpec;}public void setPakeageSpec(String pakeageSpec) {this.pakeageSpec = pakeageSpec;}public String getTaxCode() {return taxCode;}public void setTaxCode(String taxCode) {this.taxCode = taxCode;}public String getOutputTaxRate() {return outputTaxRate;}public void setOutputTaxRate(String outputTaxRate) {this.outputTaxRate = outputTaxRate;}public String getCodeBar() {return codeBar;}public void setCodeBar(String codeBar) {this.codeBar = codeBar;}public BigDecimal getPrice() {return price;}public void setPrice(BigDecimal price) {this.price = price;}public BigDecimal getActualPrice() {return actualPrice;}public void setActualPrice(BigDecimal actualPrice) {this.actualPrice = actualPrice;}public String getDiscountRate() {return discountRate;}public void setDiscountRate(String discountRate) {this.discountRate = discountRate;}public String getIsReturnStr() {return isReturnStr;}public void setIsReturnStr(String isReturnStr) {this.isReturnStr = isReturnStr;}public String getOnlineStateStr() {return onlineStateStr;}public void setOnlineStateStr(String onlineStateStr) {this.onlineStateStr = onlineStateStr;}public Integer getDeliveryTime() {return deliveryTime;}public void setDeliveryTime(Integer deliveryTime) {this.deliveryTime = deliveryTime;}public Integer getArrivalTime() {return arrivalTime;}public void setArrivalTime(Integer arrivalTime) {this.arrivalTime = arrivalTime;}public Integer getBatchNum() {return batchNum;}public void setBatchNum(Integer batchNum) {this.batchNum = batchNum;}public String getFirstAreaName() {return firstAreaName;}public void setFirstAreaName(String firstAreaName) {this.firstAreaName = firstAreaName;}public String getSecondAreaName() {return secondAreaName;}public void setSecondAreaName(String secondAreaName) {this.secondAreaName = secondAreaName;}public String getThirdAreaName() {return thirdAreaName;}public void setThirdAreaName(String thirdAreaName) {this.thirdAreaName = thirdAreaName;}public String getStorageArea() {return storageArea;}public void setStorageArea(String storageArea) {this.storageArea = storageArea;}public Integer getStorage() {return storage;}public void setStorage(Integer storage) {this.storage = storage;}public String getAttrJson() {return attrJson;}public void setAttrJson(String attrJson) {this.attrJson = attrJson;}public String getExceptionList() {return exceptionList;}public void setExceptionList(String exceptionList) {this.exceptionList = exceptionList;}public String getProjectName() {return projectName;}public void setProjectName(String projectName) {this.projectName = projectName;}public Integer getQueueId() {return queueId;}public void setQueueId(Integer queueId) {this.queueId = queueId;}public GoodsTemplateExcelVO(){}public GoodsTemplateExcelVO(String bn) {this.bn = bn;this.productName = "测试商品";this.brandNameCn = "品牌";this.brandNameEn = "pingpai";this.brandLogo = "https://img30.360buyimg.com/jgsq-productsoa/jfs/t1…5298/88691/63da0918Fb060cb06/6929f345feb64ed2.jpg";this.url = "https://www.ofs.cn/product-394804.html";this.jingle = "介绍";this.categoryName1 = "工具/工具耗材";this.categoryName2 = "手动工具";this.categoryName3 = "扳手";this.unit = "单位";this.model = "T88110-27";this.pakeageSpec = "1*1*1";this.taxCode = "";this.outputTaxRate = "13%";this.codeBar = "";this.discountRate = "20%";this.isReturnStr = "允许";this.onlineStateStr = "上架";this.deliveryTime = 1;this.arrivalTime = 1;this.batchNum = 2;this.firstAreaName = "全国";this.secondAreaName = "";this.thirdAreaName = "";this.storageArea = "重庆";this.storage = 999;this.attrJson = "保质期:12个月;" +"商品简介:徐福记 卷心酥 105g 香浓奶油味";}
}
public void downloadGoodsTemplateFile(HttpServletResponse response) {response.setContentType("application/vnd.ms-excel");response.setCharacterEncoding("UTF-8");response.setHeader("Content-disposition", "attachment;filename=商品模板.xls");GoodsTemplateExcelVO goodsTemplateExcelVO = new GoodsTemplateExcelVO("123");List<GoodsTemplateExcelVO> goodsTemplateExcelVOList = new ArrayList<>();goodsTemplateExcelVOList.add(goodsTemplateExcelVO);try {// 这里需要设置不关闭流WriteCellStyle headWriteCellStyle = new WriteCellStyle();//设置背景颜色headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex());//内容策略WriteCellStyle contentWriteCellStyle = new WriteCellStyle();//设置 水平居中contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);HorizontalCellStyleStrategy horizontalCellStyleStrategy =new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);EasyExcel.write(response.getOutputStream()).autoCloseStream(Boolean.FALSE).registerWriteHandler(horizontalCellStyleStrategy).head(mergeGoodsDetailHead()).sheet("商品信息")//获取数据填充.doWrite(goodsTemplateExcelVOList);} catch (Exception e) {}}
自定义头部
private List<List<String>> mergeGoodsDetailHead() {String title = "XXX信息统计报表";List<List<String>> list = new ArrayList<>();String erTitle = "MRO标品SKU 商品名称 品牌中文名称 品牌英文名称 品牌图片链接 商品链接 商品介绍 一级分类名称 二级分类名称 " +"三级分类名称 商品单位 商品型号 包装规格 税收编码 销售税税率 条形码 官网价 协议价 折扣率 允许退换货(允许,不允许) 上下架状态(下架,上架) 预计发货时间(天) " +"预计补货时间(天) 最小起订量 一级供货地址 二级供货地址 三级供货地址 库存所在地 库存 类目属性";Arrays.stream(erTitle.split(" ")).forEach(name -> {List<String> head = new ArrayList<>();head.add(title);head.add(name);list.add(head);});return list;}
相关文章:

easyExcel 写复杂表头
写模板 模板图片: 实体类(这里没有用Data 是因为Lombok和easyExcal的版本冲突,在导入读取的时候获取不到值) package cn.iocoder.yudao.module.project.controller.admin.goods.vo;import com.alibaba.excel.annotation.ExcelI…...

关于线程池的执行流程和拒绝策略
使用线程池的好处为: 降低资源消耗:减少线程的创建和销毁带来的性能开销。 提高响应速度:当任务来时可以直接使用,不用等待线程创建 可管理性: 进行统一的分配,监控,避免大量的线程间因互相抢…...

【李忍考研传】二、约定
因为收学生证用了好些时间,李忍把学生证都交给班长后,就赶忙跑去食堂。远远地,他就看到那个瘦小的身影立在食堂正门前,那是他们约定每天午餐集合的地方。 “你咋这么慢啊……” “害!帮班长收东西耽误了点时间&#…...

2023-2-19 刷题情况
修改两个元素的最小分数 题目描述 给你一个下标从 0 开始的整数数组 nums 。 nums 的 最小 得分是满足 0 < i < j < nums.length 的 |nums[i] - nums[j]| 的最小值。nums的 最大 得分是满足 0 < i < j < nums.length 的 |nums[i] - nums[j]| 的最大值。nu…...

LeetCode笔记:Weekly Contest 333
LeetCode笔记:Weekly Contest 333 1. 题目一 1. 解题思路2. 代码实现 2. 题目二 1. 解题思路2. 代码实现 3. 题目三 1. 解题思路2. 代码实现 4. 题目四 比赛链接:https://leetcode.com/contest/weekly-contest-333 1. 题目一 给出题目一的试题链接如下…...

元数据管理 1
1、关于元数据管理原则说法正确的是 (知识点: 三月份模拟题)A.确保员工了解如何访问和使用元数据。B.制定、实施和审核元数据标准,以简化元数据的集成和使用。C.创建反馈机制,以便数据使用者可以将错误或过时的元数据反馈给元数据管理团队。D.以上都对正…...

统计二进制中比特1的个数
快速统计比特1的数量int CountBitOnes(int32_t n) {int result 0;for(;n;result) {n & n-1;}return result; }原理很简单,n-1会将n中最靠近结尾的1减一,这样n&n-1,n中最靠近结尾的1就变成了0;假设n 0b xxxxxxxx100n - 1…...

第三方实现跑马灯和手写实现跑马灯
目录第三方实现跑马灯手写实现跑马灯手写实现跑马灯【整体代码】自己细心研究一下上述代码第三方实现跑马灯 https://vue3-marquee.vercel.app/guide.html#changes-from-v2https://evodiaaut.github.io/vue-marquee-text-component/ 手写实现跑马灯 CSS部分 <style>.m…...

React Native Cannot run program “node“问题
概述 前几天mac重装系统了,用Android studio重新构建React native项目时,报Cannot run program "node"错误。 电脑系统为macOS 12.6.3 (Monterey),M1 Pro芯片。设备信息如下图所示: 完整错误信息如下图所示ÿ…...

python基于vue微信小程序 房屋租赁出租系统
目录 1 绪论 1 1.1课题背景 1 1.2课题研究现状 1 1.3初步设计方法与实施方案 2 1.4本文研究内容 2 2 系统开发环境 4 2.1 2.2MyEclipse环境配置 4 2.3 B/S结构简介 4 2.4MySQL数据库 5 2. 3 系统分析 6 3.1系统可行性分析 6 3.1.1经济可行性 6 3.1.2技术可行性 6 3.1.3运行可行…...

ThreadPoolExecutor管理异步线程笔记
为什么使用线程池? 线程的创建和销毁都需要不小的系统开销,不加以控制管理容易发生OOM错误。避免线程并发抢占系统资源导致系统阻塞。具备一定的线程管理能力(数量、存活时间,任务管理) new ThreadPoolExecutor(int …...

MotoSimEG-VRC教程:动态输送带创建以及示教编程与仿真运行
目录 任务描述 简易输送带外部设备创建 输送带模型添加与配置 工件安装到输送带 输送带输送工件程序编写与仿真运行 任务描述 在MotoSimEG-VRC中创建1条输送带,并且能够实现将工件从输送带起始点位置处输送到结束点位置处。 简易输送带外部设备创建 在MotoS…...

PyTorch 并行训练 DistributedDataParallel完整代码示例
使用大型数据集训练大型深度神经网络 (DNN) 的问题是深度学习领域的主要挑战。 随着 DNN 和数据集规模的增加,训练这些模型的计算和内存需求也会增加。 这使得在计算资源有限的单台机器上训练这些模型变得困难甚至不可能。 使用大型数据集训练大型 DNN 的一些主要挑…...

Golang实现ttl机制保存内存数据
ttl(time-to-live) 数据存活时间,我们这里指数据在内存中保存一段时间,超过期限则不能被读取到,与Redis的ttl机制类似。本文仅实现ttl部分,不考虑序列化和反序列化。 获取当前时间 涉及时间计算,这里首先介绍如何获取…...

js中数字运算结果与预期不一致的问题和解决方案
本文主要是和大家聊聊关于js中经常出现数字运算结果与预期结果不一致的问题,与及解决该问题的的方案。 一、问题现象 如:0.1 0.2的预期结果是0.3,但是在js中得到的计算结果却是0.30000000000000004,如下图所示 如:0…...

C++ Primer Plus 学习笔记(一)——基本类型
字节与字符 计算机内存的基本单位是位(bit),字节(byte)通常指的是8位的内存单元,从这个意义上来说,字节指的就是描述计算机内存量的度量单位。 C对字节的定义则有些不同,C字节由至…...

ChatGpt与Google 谁能给出最好的回答
ChatGPT由于其先进的会话和技术功能而越来越受欢迎。你可以问聊天机器人任何你想问的问题,它会在几秒钟内输出答案。虽然它不是一个搜索引擎,你应该使用ChatGPT作为你的信息来源而不是谷歌,百度吗? 我们来根据国外的一场测试来看一下 ChatG…...

【Redis】一、CentOS64 安装 Redis
1.下载redis https://download.redis.io/releases/2.将 redis 安装包拷贝到 /opt/ 目录 最好自己创建一个文件夹 3.解压 tar -zvxf redis-6.2.1.tar.gz4. 安装gcc yum install gcc5. 进入目录 cd /opt/redis/redis-6.2.1/6. 编译 make7.执行 make install 进行安装 8. …...

Redis底层原理(持久化+分布式锁)
Redis底层原理 持久化 Redis虽然是个内存数据库,但是Redis支持RDB和AOF (Redis Database Backup file(Redis数据备份文件),也被叫做Redis数据快照。简单来说就是把内存中的所有数据都记录到磁盘中 ;Appen…...

Spring Cloud Nacos实战(八) - Nacos集群配置
Nacos集群配置 更改Nacos启动命令配置原理 我们现在知道,想要启动Naocs只需要启动startup.sh命令即可,但是如果启动3个Nacos那?所以如果我们需要启动多个Nacos,其实Nacos本身默认启动就是集群模式。 注意点:如果是l…...

什么是低代码-甲骨文对低代码的定义
什么是低代码平台?低代码阶段使用简化的界面,允许开发人员构建应用程序和软件 既用户友好又响应迅速。而不是编写几行复杂的代码和语言结构, 您可以快速轻松地利用低代码来构建具有用户界面的整体应用程序, 组合和信息。低代码可以…...

shell编程之循环语句
typora-copy-images-to: pictures typora-root-url: …\pictures 文章目录typora-copy-images-to: pictures typora-root-url: ..\..\pictures一、for循环语句1. for循环语法结构㈠ 列表循环㈡ 不带列表循环㈢ 类C风格的for循环2. 应用案例㈠ 脚本计算1-100奇数和① 思路② 落地…...

神经动力学-第一章-神经动力学基础-神经系统的元素
神经元和数学 本章的主要目的是介绍神经科学的几个基本概念,尤其是动作电位、突触后电位、触发阈值、不应期和适应性。基于这些概念,建立了神经元动力学的初步模型,这个简单的模型(漏积分-火模型)将作为本书主题——广义积分-火模型的起点和参考,在第二部分和第三部分进…...

【力扣-LeetCode】64. 最小路径和 C++题解
64. 最小路径和难度中等1430收藏分享切换为英文接收动态反馈给定一个包含非负整数的 m x n 网格 grid ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。说明:每次只能向下或者向右移动一步。示例 1:输入ÿ…...

Mysql数据库事务
数据库事务 数据库事务由一组sql语句组成。 所有sql语句执行成功则事务整体成功;任一条sql语句失败则事务整体失败,数据恢复到事务之前的状态。 Mysql 事务操作 开始事务 start transaction;- 或 begin;事务开始后,对数据的增删改操作不…...

【opencv源码解析0.3】调试opencv源码的两种方式
调试opencv源码的两种方式 上两篇我们分别讲了如何配置opencv环境,以及如何编译opencv源码方便我们阅读。但我们还是无法调试我们的代码,无法以我们的程序作为入口来一步一步单点调试看opencv是如何执行的。 【opencv源码解析0.1】VS如何优雅的配置ope…...

Xcode Archives打包上传 / 导出ipa 发布至TestFlight
Xcode自带的Archives工具可以傻瓜式上传到App Store Connect分发这里以分发到TestFlight为例进行操作。 环境:Xcode 14 一:Archives打包 选择Xcode菜单栏的Product,Archives选项,需要等待编译完成,进入如下界面&…...

RNN GRU模型 LSTM模型图解笔记
RNN模型图解引用RNN模型GRULSTM深度RNN双向循环神经网络引用 动手学深度学习v2–李沐 LSTM长短期记忆网络3D模型–B站up梗直哥丶 RNN模型 加入了一个隐变量(状态),隐变量由上个隐变量和上一个输入而更新,这样模型就可以达到具有短期记忆的效…...

西电_数字信号处理二_学习笔记
文章目录【 第1章 离散随机信号 】【 第2章 维纳滤波 】【 第3章 卡尔曼滤波 】【 第4章 自适应滤波 】【 第5章 功率谱估计 】这是博主2022秋季所学数字信号处理二的思维导图(软件是幕布),供大家参考,如内容上有不妥之处…...

[ vulhub漏洞复现篇 ] Drupal 远程代码执行漏洞(CVE-2018-7602)
🍬 博主介绍 👨🎓 博主介绍:大家好,我是 _PowerShell ,很高兴认识大家~ ✨主攻领域:【渗透领域】【数据通信】 【通讯安全】 【web安全】【面试分析】 🎉点赞➕评论➕收藏 养成习…...