fix(oa):修复项目更新时客户ID为0的处理逻辑
- 修复了当客户ID为0时未正确设置为null的问题- 添加了对客户ID非空的前置判断,避免空指针异常
This commit is contained in:
@@ -227,7 +227,7 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
||||
SysOaProject update = BeanUtil.toBean(bo, SysOaProject.class);
|
||||
|
||||
// 当 customerId 为 0 时,设置为 null
|
||||
if (bo.getCustomerId() == 0) {
|
||||
if (bo.getCustomerId() != null && bo.getCustomerId() == 0) {
|
||||
update.setCustomerId(null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user