- 博客(26)
- 收藏
- 关注
原创 计算相差天数、小时、分钟
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); LocalDate localDate1 = 时间随便写。 LocalDate localDate2 = LocalDate .now(); Period.between(localDate1 ,localDate2) .getDays() // 获取天数LocalDateTime time2 = 时间Duration.between(time2, Lo.
2022-02-24 16:55:34
508
原创 java导出方法
/**-----------------------------根据实体导出数据---------------------------------**/public void finacePayrollExport(@RequestBody 实体对象 实体对象, HttpServletResponse response) { try { response.setHeader("content-Type", "application/vnd.ms-excel");
2022-02-15 16:10:44
624
原创 固定模板头导入
public ResultVO importFinacePayrollExcel(MultipartFile file, HttpServletRequest req, SysUser user) { try { if (!file.getOriginalFilename().endsWith(".xls") && !file.getOriginalFilename().endsWith(".xlsx")) { thro
2022-02-15 15:50:51
246
原创 java微信验证
@Value("${custom.wechat.appId}")private String wechatAppId; //微信公众号appID@Value("${custom.wechat.secret}")private String wechatSecret; //微信公众号appsecret@GetMapping(value = “/wechatAuthorization”)@ApiOperation(value = “微信验证”)public ResultVO wechatAut
2022-02-15 15:12:19
252
原创 获取手机验证码
/*** 获取短信验证码* @param phone - 手机号* @return - 发送手机验证码结果* @author LiuDeTian at 2021-08-30*/@GetMapping(value = “/getAuthCode”)@ApiOperation(value = “获取验证码”)public ResultVO getAuthCode(@RequestParam String phone) {try {//获取redis中是否有已发送结果long keyExpi
2022-02-15 15:00:53
1416
原创 编写.bat执行jar包
cdF: //文件盘cd F:\idea-workspace\tj_aofa_salary\system\target\ //文件夹路径java -jar tj_aofa_salary-1.0-SNAPSHOT.jar //执行的jar包pause
2022-02-10 18:02:41
477
原创 接口调用 Http Get和Post请求
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.URL;import java.net.URLConnection;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;public c
2020-09-16 10:52:05
144
原创 mysql 根据当前时间自动创建表
复制主表结构并创建SET @sqlstr = CONCAT('create table covi_',DATE_FORMAT(CURDATE(),'%Y_%m_%d'),' like covi');PREPARE stmt1 FROM @sqlstr ;EXECUTE stmt1 ;复制主表数据SET @sqlstr = CONCAT('insert into covi_',DATE_FORMAT(CURDATE(),'%Y_%m_%d'),' select * from covi').
2020-08-31 15:22:51
845
原创 百度地图 去掉地名和logo
去除地名var style = [{"featureType":"all","elementType":"labels.text.fill","stylers":{"color":"#2da0c6","visibility":"off"}}]map.setMapStyle({ styleJson:style});logo只需要添加如下css样式即可:.BMap_cpyCtrl {display: none;...
2020-08-20 16:49:07
3703
3
原创 java定时任务
public class TestTimeOrder { public static void main(String[] args) { TimerTask task = new TimerTask() { @Override public void run() { System.out.println(Thread.currentThread().getName() + " 定时间隔3秒"); ...
2020-08-05 15:13:31
120
原创 点击刷新按钮刷新option选项值
var SelectArr = $("#name") //name是 select的id for (var i = 0; i < SelectArr.length; i++) { SelectArr[i].options[0].selected = true; }给input赋值document.getElementById("endTimey").value = "";
2020-07-23 16:53:52
386
原创 打开指定的jar
利用cmd 命令打开,但是会显示dos窗口。Runtime.getRuntime().exec("cmd /c start java -jar SocketClient.jar");使用main方法打开指定文件夹下的jar,但是如果点击叉时,tomcat也会关闭。String softPath ="file:D:/eclipse/eclipse/SocketClient.jar"; URLClassLoader classLoader = new URLClassLo...
2020-06-18 09:44:35
175
原创 服务器上root能连接,本地访问不行
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Lancer001.' WITH GRANT OPTION;
2020-06-09 16:59:25
177
原创 bootstrap-fileinput 文件上传
$("#fileupload_input_factor").fileinput({ language : 'zh', uploadUrl : contextpath + "/rest/pollutionburining/burninguploadfile?status="+status+"&source="+source, enctype :...
2019-08-12 14:35:34
245
原创 压缩文件下载
public void downloadFile() throws IOException { int id = getParser().getInt("id", 0); List<HkyNoticeattachment> list =noticeattachmentService.selectFileUrlByPid(id); ...
2019-07-17 16:46:45
140
原创 调用exe程序cmd方法
Runtime rn = Runtime.getRuntime(); Process p = null; 路劲 File dir = new File(paths+Config.READFILE); String ml = Config.AERMODEXE; ...
2019-07-01 14:59:46
1957
原创 获取一个文件夹下的所有文件名
public static String [] getFileName(String path) { File file = new File(path); String [] fileName = file.list(); return fileName; } public s...
2019-06-18 16:56:57
232
原创 HighCharts之2D柱状图、折线图
折线图 :type: 'spline'。柱状图 :type: 'spline'。饼图: type: 'pie'http://www.runoob.com/highcharts/highcharts-pie-charts.html
2019-04-23 11:04:13
173
转载 关于数据库报Packet for query is too large (1986748 > 1048576)(mysql写入数据过大)的解决办法
关于数据库报Packet for query is too large (1986748 > 1048576)(mysql写入数据过大)的解决办法 https://blog.youkuaiyun.com/qq_37674858/article/details/79964288
2019-02-26 15:51:02
213
原创 ztree 的模糊查询
//实现模糊查询功能 function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) { fuzzySearch('treeDemo','#keyword',null,true); }; function fuzzySearch(zTreeId, search...
2019-02-26 15:47:49
1001
1
原创 data转换string
data 类型转换成string: enterpriseDto.setUpdateDate(new SimpleDateFormat("yyyy-MM-dd ").format(new Date()));
2019-02-19 17:57:50
3393
原创 jsp input只读
jsp input框锁定readonly=true属性为只读属性easyUi时间控件:editable=false;(只读)disabled="disabled"(不可编辑)
2019-02-19 17:53:54
428
原创 简单的导入功能
|首先导入工具类public class ExportExcel extends BaseJerseySupport {public void exportExcelwithoutCellRangeAddress(HSSFWorkbook workbook, String sheet,String[] headers, Collection<T> dataset) { // ...
2019-02-14 17:12:24
236
原创 bootstrap-table-treegrid
前台js脚本$(function() {$permissionList = $(&quot;#permmanage_copy&quot;);var contextpath = $(&quot;#contextpath&quot;).val();$(document).ready(function () {$(’#permissionList-table’).treegridData ({id: ‘id’,//变量paren...
2019-02-14 16:55:43
2968
原创 ztree 的demo
$(function() {var contextpath = $("#contextpath").val();//定义全局变量var zTreeObj;var zTreeNodes;var setting = { check: { enable: true, chkStyle: "checkbox", chkb...
2019-02-14 16:51:40
915
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人