JAVA
guochanof
这个作者很懒,什么都没留下…
展开
-
SpringBoot+Thymeleaf分页 使用PageHelper实现分页
pom.xml首先在项目pom.xml中加入pagehelper插件的依赖<!--pagehelper分页插件 --><dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.5</version&g..原创 2020-09-10 15:22:55 · 3191 阅读 · 0 评论 -
Java 两个逗号串,获取相同字符串 以及 不同字符串
获取相同的字符串String str1 = "A,B,C,D,E,F,G";String str2 = "C,D,Z,H,R";String [] strs1 = str1.split("[,]");//防止str1为nullList<String> list = Arrays.asList(strs1);//防止strs1为nullString [] strs2 = s...原创 2020-04-17 11:19:04 · 1755 阅读 · 0 评论 -
java list转拼成字符串/数组
list 转 字符串List<Map<String, Object>> activityStaList = activityService.getStatusByDeptId(deptId);String actNames = "";String actStatuss = "";for(int i = 0 ; i < activityStaList.si...原创 2019-10-22 14:28:15 · 1280 阅读 · 0 评论 -
拆分字符串,SQL多条件查询
@SuppressWarnings({ "rawtypes", "unchecked" }) @RequestMapping("getPageData") @ResponseBody public PageView getPageData(HttpServletRequest request) { PageView<Map> pageView = new PageView...原创 2018-06-27 08:59:59 · 1405 阅读 · 0 评论 -
JAVA公历转农历大写转农历小写 阳历转阴历
两种转换结果的方法都在,根据自己需要的格式,解放注释即可结果:阳历:1991-02-13 农历: 1990年十二月廿九阳历:1991-02-13 农历: 1990-12-29 java工具类:package com.boot.common.utils; import java.text.ParseException;import java.text.Simp...原创 2019-07-06 15:48:31 · 924 阅读 · 0 评论 -
java判断输入的日期字符串是否小于当前日期
当日期字符串小于当前日期,返回true;当日期字符串大于当前日期,返回falsepackage com.wonders;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;import java.util.Locale;/** * 日期公共...原创 2019-09-18 15:52:08 · 10335 阅读 · 0 评论 -
java String转Long
第一种long activityId = Long.valueOf((String) activity.get("activityId"));第二种long activityId = (long) activity.get("activityId");原创 2019-07-31 16:55:18 · 466 阅读 · 0 评论 -
把数组放到map 根据条件批量查询
controller:public R mylistBatchRemoveCustomer(@RequestParam("ids[]") Long[] customerIds,Long mylistId{ Map<String, Object> map = new HashMap<String, Object>(); //把数组放入Map集合,后台的数据仍是数组...原创 2019-08-02 14:52:06 · 1210 阅读 · 0 评论