提高代码效率
进击的豆子
这个作者很懒,什么都没留下…
展开
-
异步线程池在开发中的使用
代码】异步线程池在开发中的使用。原创 2022-07-19 16:18:59 · 169 阅读 · 1 评论 -
一些常用的sql或者XML语句
1.批量插入的方法 <!-- 保存订单完成率指标数据 --> <insert id="insertSmtOrThtOrderCompletionRateList" parameterType="beat.model.OrderCompletionRateDto"> insert into rt_order_completion_rate_dz( base_code, factory_code, floor_code, w原创 2021-05-26 16:10:29 · 348 阅读 · 0 评论 -
JDK 1.8新特性,Lamda表达式,steam流的一些用法例子
1.返回集合的某个字段集List<MaThtZjConfigEntity> data = new ArrayList<>()List<String> position = null;if (!CollectionUtils.isEmpty(data)) { position = data.stream().map(MaThtZjConfigEntity::getZjType).distinct().collect(Collectors.toList())原创 2021-05-19 14:31:57 · 560 阅读 · 0 评论 -
通过反射的方式给调用set和get方法,用于动态的返回值
package com.hikvision.mes.report.util;import java.lang.reflect.Method;import java.math.BigDecimal;public class ReflectionNameUtil { /** * Created by xuchenghua * Date 2021/01/22 * Description:根据属性名反射获取get和set方法 */ .原创 2021-01-25 19:13:40 · 195 阅读 · 0 评论 -
自定義代碼生成器
public class GenerationVlEntity { //老值 private String originalValue; //新值 private String newValue; public String getNewValue() { return newValue; } public void setNewValue(String newValue) { this.newValue ...原创 2020-11-23 11:13:27 · 162 阅读 · 0 评论 -
告别996之函数编程,JDK1.8新特性
package com.example.demo.jdk18;public class Sku { //id private Integer skuId; //名称 private String skuName; //单价 private Double skuPrice; //购买个数 private Integer totalNum; //总价 private Double totalPrice; //商品类型.原创 2020-11-18 01:32:29 · 130 阅读 · 0 评论