1[代码解析005] 关于一次bug排查解析 | new出一个对象其属性默认值是?
作者:互联网
1、代码片段
// 子单据状态更新
List<OutboundOrderDetails> updateOutboundOrderDetailsList = Lists.newArrayList();
outboundOrderDetailsList.forEach(val -> {
OutboundOrderDetails updateEntity = new OutboundDetailVO();
updateEntity.setId(val.getId());
updateEntity.setStatus(OutboundOrderDetails.STATUS_LOCK);
updateEntity.preUpdate();
updateOutboundOrderDetailsList.add(updateEntity);
});
outboundOrderDetailsService.updateBatchById(updateOutboundOrderDetailsList);
新增 updateEntity.setRowNum(val.getRowNum());
// 子单据状态更新
List<OutboundOrderDetails> updateOutboundOrderDetailsList = Lists.newArrayList();
outboundOrderDetailsList.forEach(val -> {
OutboundOrderDetails updateEntity = new OutboundDetailVO();
updateEntity.setId(val.getId());
updateEntity.setStatus(OutboundOrderDetails.STATUS_LOCK);
updateEntity.setRowNum(val.getRowNum());
updateEntity.preUpdate();
updateOutboundOrderDetailsList.add(updateEntity);
});
outboundOrderDetailsService.updateBatchById(updateOutboundOrderDetailsList);
标签:默认值,val,updateOutboundOrderDetailsList,outboundOrderDetailsList,updateEntity,005 来源: https://www.cnblogs.com/Code-Rain/p/16577085.html