随笔分类 -  问题处理

遇到的一些问题和解决办法
摘要:1 import org.springframework.context.annotation.Bean; 2 import org.springframework.context.annotation.Configuration; 3 import org.springframework.web. 阅读全文
posted @ 2021-01-27 14:01 宁任翃 阅读(97) 评论(0) 推荐(0)
摘要:Integer: List<Integer> values = ...; Integer sum = values.stream().reduce(0, Integer::sum); BigDecimal: BigDecimal millHours = list.stream().filter(wo 阅读全文
posted @ 2021-01-25 16:43 宁任翃 阅读(1301) 评论(0) 推荐(0)
摘要:1 public class FatherToChild { 2 3 public static <T> QuotesMergePlusPriceDto fatherToChild(T father, T child) throws Exception { 4 if (child.getClass( 阅读全文
posted @ 2021-01-25 16:29 宁任翃 阅读(1694) 评论(0) 推荐(0)
摘要:用source.compareTo(BigDecimal.ZERO)==0,可以比较是否等于0,返回true则等于0,返回false,则不等于0 参考内容:https://blog.csdn.net/jixinhuluwa/article/details/72626598 阅读全文
posted @ 2021-01-25 15:14 宁任翃 阅读(2880) 评论(0) 推荐(0)
摘要:在数据库连接的URL中加上 allowPublicKeyRetrieval=true&useSSL=false 阅读全文
posted @ 2021-01-12 13:59 宁任翃 阅读(84) 评论(0) 推荐(0)
摘要:使用Mybatis批量处理数据,避免通过循环调用方法建立数据库连接,减少任务耗时 xml文件 1 <insert id="insertUser"> 2 insert into mr_user 3 (user_id,dept_id,username,nick_name,email,phone,gend 阅读全文
posted @ 2020-12-23 12:01 宁任翃 阅读(186) 评论(0) 推荐(0)
摘要:需求:在规定时间段内收费(7:00 - 22:00),其余时间不收费 代码实现(BigDecimal 处理精度问题): 1 package Others; 2 3 import java.math.BigDecimal; 4 import java.time.Duration; 5 import j 阅读全文
posted @ 2020-12-22 15:00 宁任翃 阅读(149) 评论(0) 推荐(0)
摘要:数据库查询结果 最终结果 JAVA实现 // 数据库查询结果List<HrUserRoleRightDto> userRole = hrUserMapper.queryRightUserList(strIds);// 数据格式整理 userResults = floorsFormat(userRol 阅读全文
posted @ 2020-11-04 18:45 宁任翃 阅读(639) 评论(0) 推荐(1)