1、设置多个属性字段的默认值
list.forEach((entity) ->{
entity.setCreateTime(new Date());
entity.setCreateUser(ShiroUtils.getUserId());
entity.setContractId(hTity.getId());
}
);
2、设置单个属性字段的默认值
list.forEach(item ->item.setImprestId(aaEntity.getId()));
发表评论