- 博客(30)
- 收藏
- 关注
转载 json处理方法
//日志文件import org.apache.log4j.LogManager;import org.apache.log4j.Logger;private Logger logger = LogManager.getLogger(AlarmController.class);import net.sf.json.JsonConfig;import net.sf.j...
2019-09-06 15:52:00
182
转载 json处理
JSONObject jsonObject = new JSONObject();map = alarmService.selectAlarmLiveIssue(endDate, taskDays,eci, issuetype);jsonObject.putAll(map, JsonObjectDefaultNullConfig.getInstance());Ha...
2019-09-06 15:50:00
145
转载 密码加密
import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;public class MD5Util { //静态方法,便于作为工具类 public static String getMd5(String plainText) { ...
2019-09-06 15:45:00
170
转载 java中execl导入与导出
package com.icos.utility.utils;import java.io.OutputStream;import java.net.URLDecoder;import java.net.URLEncoder;import java.util.List;import javax.servlet.http.HttpServletRespons...
2019-09-06 15:43:00
122
转载 对字符String进行处理
/******************************************************************************* * Copyright (c) 2013. Pyrlong All rights reserved. * * Licensed under the Apache License, Version 2.0 (th...
2019-09-06 15:40:00
276
转载 HashMap排序问题
package com.icos.utility.listsort;import java.util.ArrayList;import java.util.Comparator;import java.util.HashMap;import java.util.Map;import java.util.Map.Entry;import java.util....
2019-09-06 15:36:00
116
转载 java文件处理
package com.icos.utility.file;import java.io.*;import java.util.ArrayList;import java.util.List;import java.util.Stack;import org.apache.log4j.Logger;import com.icos.utility.dat...
2019-09-06 15:21:00
138
转载 复制文件
public static void copyTo(String srcName, String targetName) throws IOException { File file = new File(srcName); if (file.exists()) { BufferedInputStream inBuff...
2019-09-06 15:19:00
106
转载 时间函数
import java.text.DateFormat;import java.text.DateFormatSymbols;import java.text.FieldPosition;import java.text.Format;import java.text.ParseException;import java.text.ParsePosition;...
2019-09-06 15:10:00
184
转载 时间转化函数,编码转化
province1 = URLDecoder.decode(province,"utf-8") ;dimension1 = URLDecoder.decode(dimension ,"utf-8");SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); java.util.Date date1 =...
2019-09-06 15:09:00
157
转载 mysql子查询
1、where型子查询 (把内层查询结果当作外层查询的比较条件) #不用order by 来查询最新的商品 select goods_id,goods_name from goods where goods_id = (select max(goods_id) from goods)...
2019-09-05 09:38:00
114
转载 having 与where 的异同点
having与where类似,可以筛选数据,where后的表达式怎么写,having后就怎么写 where针对表中的列发挥作用,查询数据 having对查询结果中的列发挥作用,筛选数据 #查询本店商品价格比市场价低多少钱,输出低200元以上的商品 ...
2019-09-05 09:36:00
239
转载 group by 分组
一般情况下group需与统计函数(聚合函数)一起使用才有意义 mysql中的五种统计函数: (1)max:求最大值 select max(goods_price) from goods 这里会取出最大的价格的值,只有值 ...
2019-09-05 09:35:00
107
转载 计算运行时间
//开始时间 long elapsedtime=System.currentTimeMillis(); System.out.println("执行代码块/方法"); //结束时间long endTime=System.currentTimeMillis(); System.out.println(param.get("tablename")+"上传所...
2019-09-05 09:28:00
139
转载 将拿到的list<map>拿到Treemap里面存一下自动排序
Map<String, Object> map = new HashMap<>(); List<Verdice> verdice = verdiceService.selectVerdicePRB(eci, starttime, endtime); List<Map<String, String>> list...
2019-09-04 16:38:00
573
转载 Mybatis配置SQL加载log
mybatis-config.xml <!-- <setting name="logImpl" value="LOG4J2"/> --> <setting name="logImpl" value="STDOUT_LOGGING" /> </settings> 转载...
2019-09-04 16:37:00
138
转载 execl 连接
=A2&" "&B2&" comment'"&C2&"'"&","转载于:https://www.cnblogs.com/tanada/p/11459961.html
2019-09-04 16:36:00
92
转载 List<HashMap<String, Object>> configList = orderInfoDao.getindexstypecofing(param);的使用
HashMap<String,HashMap<String,Integer>> alarmMap = new HashMap<String,HashMap<String,Integer>>();HashMap<String,Integer> eciMap=alarmMap.get(alarmEci);if(eciMa...
2019-09-04 16:35:00
141
转载 java execl导入与设置
package com.icos.util;import java.io.OutputStream;import java.net.URLDecoder;import java.net.URLEncoder;import java.util.List;import javax.servlet.http.HttpServletResponse;imp...
2019-08-21 10:12:00
132
转载 javaAPI获取本地时间及指定格式
long start_time = System.currentTimeMillis();new SimpleDateFormat("yyyyMM").format(new Date())转载于:https://www.cnblogs.com/tanada/p/11387094.html
2019-08-21 10:05:00
184
转载 ftp处理、获取文件上传到ftp
//获取文件上传到不同的ftp public int sendWorkIssueRuleCsv(String pro,CommonsMultipartFile csv_file) throws IOException { int returnvalue=0; List<String> pro...
2019-08-21 09:57:00
147
转载 ftp派发
// 派发 @RequestMapping(value = "/groupRuleUpload") public void GroupRuleUpload(@RequestParam("file") CommonsMultipartFile file, HttpServletRequest request, HttpServletResp...
2019-08-21 09:27:00
84
转载 利用字节流读取csv文件
// csv下载 @RequestMapping(value = "/selectTaskDownFile.do", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<byte[]> selectTaskDownF...
2019-08-21 09:17:00
919
转载 Springmvc框架流程
service 写接口 service.impl 写接口实现controller 写实现dao写 xml里面sql方法 entity写实体类util里面写公共方法转载于:https://www.cnblogs.com/tanada/p/11384142.html...
2019-08-20 17:10:00
58
转载 java转码
// 转码,防止中文乱码 filename = URLEncoder.encode(filename, "UTF-8");转载于:https://www.cnblogs.com/tanada/p/11383754.html
2019-08-20 16:29:00
186
转载 从数据库查数,存储到list对象里
public List<HashMap<String, Object>> selectorderDetails(String date, String province, String city, String vendor, String scene, int limitcount, int pagecount) { ...
2019-08-20 16:03:00
1094
转载 java关于读取csv文件保存为list<hashmap<String,Object >>,头标题
pom.xml文件<dependency> <groupId>net.sourceforge.javacsv</groupId> <artifactId>javacsv</artifactId> <version>2.0</v...
2019-08-20 15:53:00
1605
转载 java File读取本地文件,判断是否存在
File file = new File(inpath);if (!file.exists()) {file.createNewFile();System.out.println("文件不存在,新建成功!");} else {System.out.println("文件存在!");}转载于:https://www.cnbl...
2019-08-20 09:41:00
2349
转载 java利用做的csv文件解析为list对象
import java.io.BufferedReader;import java.io.File;import java.io.FileReader;import java.lang.reflect.Field;import java.util.ArrayList;import java.util.List;public class ...
2019-08-20 09:39:00
766
转载 ssm框架写接口
运行入口:http://localhost:8080/java/selectIssueAll/getcityname方法类:webview.controller.stsCityGuide.IssueController.javaservice接口:webview.service.stsCityGuide.IssueService(接口)service.impl...
2019-08-20 09:36:00
750
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人