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

浙公网安备 33010602011771号