血翼残飞

导航

2020年5月11日 #

Java 后端导出Excel ,复杂表头,合并行

摘要: @RequestMapping(value = "/exportXls") public void exportXls(@RequestParam String zcq,@RequestParam String ksq,HttpServletRequest request, HttpServletR 阅读全文

posted @ 2020-05-11 14:25 血翼残飞 阅读(8484) 评论(1) 推荐(0)

vue 前端导出excel

摘要: 安装插件:cnpm install js-export-excel创建js jsExportExcel.js import ExportJsonExcel from "js-export-excel" export function downloadExcel (fileName,exportDat 阅读全文

posted @ 2020-05-11 14:14 血翼残飞 阅读(377) 评论(0) 推荐(0)

vue 页面导出pdf

摘要: <view id = "demo"> <a-button style="margin-top: 2px" type="primary" icon="search" @click="printOut">导出pdf</a-button> </view > printOut () { htmlToPdf. 阅读全文

posted @ 2020-05-11 13:56 血翼残飞 阅读(4926) 评论(0) 推荐(0)

2020年5月2日 #

Mybatis 实现Mysql批量插入数据,判断数据是否存在

摘要: insert into 插入数据库时会检查主键是否存在,存在会报错 replace into 替换数据库记录,需要表中有主键或者unique索引,如果数据库已存在的数据,会先删除该数据然后新增。不存在的数据效果和insert into 一样。 <insert id="insertInfoBatch" 阅读全文

posted @ 2020-05-02 16:45 血翼残飞 阅读(6435) 评论(0) 推荐(0)

MySQL中查询某年某月的数据

摘要: 查询2020年的数据: select * from day_rate where year(时间字段)='2020' 查询2月份的数据: select * from day_rate where month(时间字段)='02' 查询2020年2月份的数据: select * from day_ra 阅读全文

posted @ 2020-05-02 16:41 血翼残飞 阅读(6569) 评论(0) 推荐(0)

2020年4月30日 #

ajax接收后端传回的jsonarray数据,追加到<select>

摘要: import net.sf.json.JSONArray; @RequestMapping(value = "admin/selectLearnPackge/{trainingId}", method = RequestMethod.POST) public void selectLearnPack 阅读全文

posted @ 2020-04-30 09:53 血翼残飞 阅读(543) 评论(0) 推荐(0)

2020年1月20日 #

远程连接sftp,下载csv文件,读取插入数据库

摘要: sftp工具类: package com.examstack.portal.util; import com.jcraft.jsch.*; import java.io.*; import java.util.*; public class SftpUtil { private ChannelSft 阅读全文

posted @ 2020-01-20 09:37 血翼残飞 阅读(814) 评论(0) 推荐(0)

2020年1月6日 #

SpringMVC上传文件的三种方式

摘要: <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 阅读全文

posted @ 2020-01-06 11:15 血翼残飞 阅读(541) 评论(0) 推荐(0)

2019年12月16日 #

spring+mybatis 返回值为map时返回驼峰命名

摘要: <resultMap id ="UserInfoMap" type="com.example.mybaitsxml.dao.entity.User"> <result column="name_" property="name"/> <result column="sex" property="se 阅读全文

posted @ 2019-12-16 14:49 血翼残飞 阅读(2085) 评论(0) 推荐(0)

java遍历request.getParameterMap()中的值

摘要: Map<String, String[]> reqMap = req.getParameterMap(); for (String key : reqMap.keySet()) { String[] values = (String[])reqMap.get(key); String value = 阅读全文

posted @ 2019-12-16 14:45 血翼残飞 阅读(976) 评论(0) 推荐(0)