![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后端
文章平均质量分 56
TankWide
记录工作中的点点滴滴
展开
-
后端到前台时间格式化处理
在需要格式化的实体类上加注解/**开始时间*/@JsonFormat(pattern = “yyyy-MM-dd HH:mm:ss”, timezone=“GMT+8”)private Date startTime;原创 2021-03-24 14:16:25 · 244 阅读 · 0 评论 -
直接写存贮过程,适合Excel批量导入
package com.eastcom_sw.dsv.special.gde.dao.assetsManage;import com.eastcom_sw.baseframe.jdbc.dao.JdbcDaoSupport;import com.eastcom_sw.dsv.special.gde.dao.interfaceManage.RegisterInterfaceDaoImpl;import org.apache.commons.lang3.StringUtils;import org..原创 2020-11-04 17:35:39 · 114 阅读 · 0 评论 -
昨天文章的修改
package com.eastcom_sw.dsv.special.web.gde.assetsManage;import com.eastcom_sw.common.web.BaseController;import com.eastcom_sw.dsv.special.gde.dao.assetsManage.RegisterIndicatorsDao;import net.sf.json.JSONObject;import org.apache.commons.lang.StringUtil原创 2020-09-22 09:17:56 · 151 阅读 · 0 评论 -
导入的Excel模板下载,并且从后台获取Excel下拉框数据
package com.eastcom_sw.dsv.special.web.gde.assetsManage;import com.eastcom_sw.common.web.BaseController;import com.eastcom_sw.dsv.special.gde.dao.assetsManage.RegisterIndicatorsDao;import net.sf.json.JSONObject;import org.apache.commons.lang.StringUtil原创 2020-09-21 17:18:49 · 543 阅读 · 0 评论 -
左连接取左边最新的一条数据
select * FROM IPMSDW.DW_GDE_TABLE_INFO A LEFT JOIN (select BC.* from (select max(APPR_TIME) as maxrq,ASSET_ID from DW_GDE_TAB_APPROVED_REL GROUP BY ASSET_ID ) AC LEFT JOIN IPMSDW.DW_GDE_TAB_APPROVED_REL BC on AC.maxrq = BC.APPR_T...原创 2020-08-05 15:26:43 · 834 阅读 · 0 评论 -
解析Excel单元格,上传到后台
/*** 数据导入*/@SuppressWarnings(“unchecked”)@Syslog(optType = OptType.IMPORT, isLogParams = true, moduleName = “assetsImport”)@RequestMapping(value = “/importData”, method = RequestMethod.POST)public void importData(HttpSession sesstion, HttpServletRequ原创 2020-08-03 19:14:57 · 170 阅读 · 0 评论 -
转换成map
public static Map<String, Object> objectToMap(Object obj) { Map<String, Object> map = new HashMap<String, Object>(); Class<?> clazz = obj.getClass(); for (Field field : clazz.getDeclaredFields()) { field.setAcces原创 2020-07-24 11:27:33 · 294 阅读 · 0 评论 -
java模糊查询
字段 like CONCAT(CONCAT(’%’, #{name}),’%’) // 模糊查询原创 2020-06-13 19:16:53 · 250 阅读 · 0 评论 -
返回重复数据的数量
private String getLevelAwards(String[] awards) { Map<String, Integer> map = new HashMap<>(); for (String productId : awards) { // map中是否存在产品 if (map.containsKey(productId)) { Integer count = map.get(productId原创 2020-06-13 19:13:20 · 194 阅读 · 0 评论 -
递归得到集合
// 递归得到集合public void climbStairs(ListreturnList) { for (CustomerInfoFlyerDeptOutputDo item: returnList) { CustomerInfoFlyerDeptInputDo inputDo = new CustomerInfoFlyerDeptInputDo(); inputDo.setCustomerId(item.getCustomerId()); i原创 2020-06-13 19:12:44 · 228 阅读 · 0 评论 -
mybatis新增成功后返回指定字段
<selectKey resultType="java.lang.Integer" order="BEFORE" keyProperty="id"> select T_MEDAL_SEQ.NEXTVAL as id from DUAL</selectKey>原创 2020-06-13 19:11:57 · 2277 阅读 · 0 评论 -
后台非空判断
package com.shenzhenair.core.util;import java.text.SimpleDateFormat;import java.util.Date;import java.util.List;import java.util.Map;public class WebTool {private WebTool() { throw new IllegalStateException("WebTool class");}/** * 功能:判断字符串变量是否为空原创 2020-06-13 19:10:27 · 425 阅读 · 0 评论