Commit 1a434e5585ef0b26beb5b0a4dabc80e676ea8606
1 parent
5f290938
refactor(order
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/order/erp/service/order/impl/ProjectBaseInfoServiceImpl.java
1 | 1 | package com.order.erp.service.order.impl; |
2 | 2 | |
3 | 3 | import cn.hutool.core.bean.BeanUtil; |
4 | +import cn.hutool.core.bean.copier.CopyOptions; | |
4 | 5 | import cn.hutool.core.collection.CollUtil; |
5 | 6 | import com.alibaba.fastjson.JSONObject; |
6 | 7 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
... | ... | @@ -86,7 +87,7 @@ public class ProjectBaseInfoServiceImpl extends ServiceImpl<ProjectBaseInfoMappe |
86 | 87 | ProjectBaseInfoDO projectBaseInfoDO = null; |
87 | 88 | if (projectBaseInfoDOOpt.isPresent()) { |
88 | 89 | projectBaseInfoDO = projectBaseInfoDOOpt.get(); |
89 | - BeanUtil.copyProperties(vo, projectBaseInfoDO, "id"); | |
90 | + BeanUtil.copyProperties(vo, projectBaseInfoDO, CopyOptions.create().setIgnoreProperties("id").ignoreNullValue()); | |
90 | 91 | } else { |
91 | 92 | projectBaseInfoDO = BeanUtil.copyProperties(vo, ProjectBaseInfoDO.class); |
92 | 93 | } | ... | ... |