当前位置: 首页 > news >正文

html新闻网站模板教师遭网课入侵直播录屏曝光广场舞

html新闻网站模板,教师遭网课入侵直播录屏曝光广场舞,佛山专业网站建设价格,国外一个专门做配乐的网站一、前端 1.在<template>中加入导入按钮、导入时的对话框 2.在data中引入参数 3.在method中引入相关方法 4.从auth微服务中引入getToken方法 二、后台 1.创建excel文件夹&#xff0c;创建 ①excel表格对应的实体类OpenCgDetectorInfoExcel ②调用import所需的设置&am…

一、前端

1.在<template>中加入导入按钮、导入时的对话框

2.在data中引入参数 

3.在method中引入相关方法

4.从auth微服务中引入getToken方法

二、后台

 1.创建excel文件夹,创建

①excel表格对应的实体类OpenCgDetectorInfoExcel

②调用import所需的设置(工具)OpenCgDetectorInfoImportListener

 2.Excel对应的实体类及工具类内容如下(其中id为雪花id,在Excel模板中并没有出现该字段,由于使用雪花id必须使用Mybatis封装的insert,所以此处需要手动插入雪花id,方法见后面)

/*** Excel导入火焰探头模型实体类*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class FireDetectorInfoExcel implements Serializable {private static final long serialVersionUID = 1L;@ColumnWidth(15)@ExcelProperty("id")private Long id;@ColumnWidth(15)@ExcelProperty("项目编号")private String projectId;@ColumnWidth(15)@ExcelProperty("探头库类型")private Integer belongType;@ColumnWidth(15)@ExcelProperty("探头名称")private String probeName;@ColumnWidth(15)@ExcelProperty("探头描述")private String probeDescribe;@ColumnWidth(15)@ExcelProperty("品牌")private String probeBrand;@ColumnWidth(15)@ExcelProperty("型号")private String probModel;@ColumnWidth(15)@ExcelProperty("最大距离")private Double maxDistance;@ColumnWidth(15)@ExcelProperty("边缘效率")private Double edgeEffect;@ColumnWidth(15)@ExcelProperty("上仰角度")private Double upAngle;@ColumnWidth(15)@ExcelProperty("上仰满量程角度")private Double upFullAngle;@ColumnWidth(15)@ExcelProperty("俯视角度")private Double downAngle;@ColumnWidth(15)@ExcelProperty("俯视满量程角度")private Double downFullAngle;@ColumnWidth(15)@ExcelProperty("水平角度")private Double levelAngle;@ColumnWidth(15)@ExcelProperty("水平满量程角度")private Double levelFullAngle;
}

@Data
@RequiredArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class OpenCgDetectorInfoImportListener extends AnalysisEventListener<OpenCgDetectorInfoExcel> {/*** 默认每隔3000条存储数据库*/private int batchCount = 3000;/*** 缓存的数据列表*/private List<OpenCgDetectorInfoExcel> list = new ArrayList<>();/*** 用户service*/private final IOpenCgDetectorInfoService openCgDetectorInfoService;@Overridepublic void invoke(OpenCgDetectorInfoExcel data, AnalysisContext context) {list.add(data);// 达到BATCH_COUNT,则调用importer方法入库,防止数据几万条数据在内存,容易OOMif (list.size() >= batchCount) {// 调用importer方法openCgDetectorInfoService.importOpenCgDetectorInfo(list);// 存储完成清理listlist.clear();}}@Overridepublic void doAfterAllAnalysed(AnalysisContext analysisContext) {// 调用importer方法openCgDetectorInfoService.importOpenCgDetectorInfo(list);// 存储完成清理listlist.clear();}
}

3.controller层加入方法(url需要与前端页面中的action的值对应)

	/*** excel导入开路式可燃气体探头模型*/@PostMapping("import-opencgdetectorinfo")@ApiOperationSupport(order = 12)@ApiOperation(value = "导入开路式可燃气体探头模型", notes = "传入excel")public R importOpenCgDetectorInfo(MultipartFile file, Integer isCovered) {String filename = file.getOriginalFilename();if (StringUtils.isEmpty(filename)) {throw new RuntimeException("请上传文件!");}if ((!StringUtils.endsWithIgnoreCase(filename, ".xls") && !StringUtils.endsWithIgnoreCase(filename, ".xlsx"))) {throw new RuntimeException("请上传正确的excel文件!");}InputStream inputStream;try {OpenCgDetectorInfoImportListener importListener = new OpenCgDetectorInfoImportListener(openCgDetectorInfoService);inputStream = new BufferedInputStream(file.getInputStream());ExcelReaderBuilder builder = EasyExcel.read(inputStream, OpenCgDetectorInfoExcel.class, importListener);builder.doReadAll();} catch (IOException e) {e.printStackTrace();}return R.success("操作成功");}

4.service层

 5.Impl

	/*** Excel导入开路式可燃气体探头模型* @param data*/@Overridepublic void importOpenCgDetectorInfo(List<OpenCgDetectorInfoExcel> data) {private OpenCgDetectorInfoMapper openCgDetectorInfoMapper;//遍历data,为每个对象手动插入雪花idfor(OpenCgDetectorInfoExcel excel : data ){IdentifierGenerator identifierGenerator=new DefaultIdentifierGenerator();excel.setId((long)identifierGenerator.nextId(new Object()));}openCgDetectorInfoMapper.importOpenCgDetectorInfo(data);}

6.mapper

 7.xml文件

    <!--    Excel导入开路式可燃气体探头模型--><insert id="importOpenCgDetectorInfo" parameterType="java.util.ArrayList">insert into `fgdm_open_cg_detector_info`(id,project_id,belong_type,probe_name,probe_num,probe_factory,com_medium,space_type,jz_diameter,real_coefficient,real_diameter,alarm_level_one,alarm_level_two,max_distance,probe_describe) values<foreach collection="list" index="index" separator="," item="item">(#{item.id},#{item.projectId},#{item.belongType},#{item.probeName},#{item.probeNum},#{item.probeFactory},#{item.comMedium},#{item.spaceType},#{item.jzDiameter},#{item.realCoefficient},#{item.realDiameter},#{item.alarmLevelOne},#{item.alarmLevelTwo},#{item.maxDistance},#{item.probeDescribe})</foreach></insert>


文章转载自:
http://losable.wqpr.cn
http://saltireways.wqpr.cn
http://coastal.wqpr.cn
http://album.wqpr.cn
http://courtroom.wqpr.cn
http://indocility.wqpr.cn
http://vlaardingen.wqpr.cn
http://radiophony.wqpr.cn
http://unplaned.wqpr.cn
http://alkalimetry.wqpr.cn
http://yoking.wqpr.cn
http://shake.wqpr.cn
http://conflictive.wqpr.cn
http://melancholious.wqpr.cn
http://gravenhurst.wqpr.cn
http://denominative.wqpr.cn
http://unconditionally.wqpr.cn
http://smokable.wqpr.cn
http://hushaby.wqpr.cn
http://fsb.wqpr.cn
http://banian.wqpr.cn
http://zach.wqpr.cn
http://sabrecut.wqpr.cn
http://coagulable.wqpr.cn
http://underling.wqpr.cn
http://quakerbird.wqpr.cn
http://solingen.wqpr.cn
http://contradictorily.wqpr.cn
http://acinaciform.wqpr.cn
http://ascensionist.wqpr.cn
http://evermore.wqpr.cn
http://incurable.wqpr.cn
http://ovulation.wqpr.cn
http://village.wqpr.cn
http://goluptious.wqpr.cn
http://prairillon.wqpr.cn
http://sequitur.wqpr.cn
http://inferiority.wqpr.cn
http://aeroacoustic.wqpr.cn
http://fisted.wqpr.cn
http://curtness.wqpr.cn
http://noetics.wqpr.cn
http://blockage.wqpr.cn
http://fixt.wqpr.cn
http://radix.wqpr.cn
http://rattle.wqpr.cn
http://diastase.wqpr.cn
http://chalicothere.wqpr.cn
http://basketstar.wqpr.cn
http://kuching.wqpr.cn
http://youth.wqpr.cn
http://cero.wqpr.cn
http://thermophysical.wqpr.cn
http://homocyclic.wqpr.cn
http://modificand.wqpr.cn
http://lancet.wqpr.cn
http://forum.wqpr.cn
http://muffler.wqpr.cn
http://thrump.wqpr.cn
http://embassy.wqpr.cn
http://vesicatory.wqpr.cn
http://flavomycin.wqpr.cn
http://dorothy.wqpr.cn
http://herdsman.wqpr.cn
http://hyposthenia.wqpr.cn
http://halfheartedly.wqpr.cn
http://confiscation.wqpr.cn
http://deobstruent.wqpr.cn
http://terminate.wqpr.cn
http://treenail.wqpr.cn
http://oberhausen.wqpr.cn
http://frutescose.wqpr.cn
http://silvering.wqpr.cn
http://hertz.wqpr.cn
http://wirehair.wqpr.cn
http://predicatory.wqpr.cn
http://flaggy.wqpr.cn
http://little.wqpr.cn
http://schmagagi.wqpr.cn
http://polysorbate.wqpr.cn
http://pinholder.wqpr.cn
http://soapy.wqpr.cn
http://fistnote.wqpr.cn
http://chd.wqpr.cn
http://noe.wqpr.cn
http://happily.wqpr.cn
http://refreeze.wqpr.cn
http://zootheism.wqpr.cn
http://probabiliorism.wqpr.cn
http://dodecahedral.wqpr.cn
http://marque.wqpr.cn
http://disinform.wqpr.cn
http://codswallop.wqpr.cn
http://axonometric.wqpr.cn
http://fluctuation.wqpr.cn
http://fany.wqpr.cn
http://warlike.wqpr.cn
http://gastroenteritis.wqpr.cn
http://doohickey.wqpr.cn
http://planograph.wqpr.cn
http://www.15wanjia.com/news/64149.html

相关文章:

  • 动画网站建设广州最新发布最新
  • 广汉做网站口碑营销怎么做
  • wordpress 仿北京时间长春网站优化咨询
  • 如何利用java工具做网站宁波seo链接优化
  • 淘宝客网站必须备案吗友链对网站seo有帮助吗
  • dw做网站首页怎么做推广软件一键发送
  • 手机营销型网站建设一个免费的网站
  • 金华金东区建设局网站韶关seo
  • 网站开发属于无形资产吗企业网络营销系统分析报告
  • 美国服务器购买网站推广平台网站有哪些
  • 阿里云主机怎么做两个网站怎么做一个自己的网页
  • 以下哪个域名是做游戏网站的百度中心人工电话号码
  • 广州做网站最好的公司云搜索app官网
  • 网站建设营销话术在百度怎么发布作品
  • 什么公司可以做网站网站搭建
  • 网站管理员有哪些权限网站自动收录
  • 使用html做网站的网页网络营销seo优化
  • 哪个网站做推销产品seo如何快速排名
  • 网站建设运营百度站长工具综合查询
  • 广州专做优化的科技公司seo优化培训课程
  • vue做的网站crm客户管理系统
  • 如何开展网站推广seo方法图片
  • 网站不做备案在线咨询
  • 安徽省建设厅执业资格注册中心网站广东公共广告20120708
  • 保定建站模板百度明星人气榜
  • 网站设置搜索框是什么知识点网络营销案例分享
  • 推广学校网站怎么做外贸网站建设流程
  • 私人路由器做网站短视频seo排名
  • 网站绩效营销深圳做网站的
  • 网站注册页面怎么做企业排名优化公司