Commit c385c3e0 authored by 332784038@qq.com's avatar 332784038@qq.com

更新订单业绩归属客户经理时,同步更新其部门,如果客户经理不存在了,则部门id被重置

parent 7a7a791c
...@@ -200,6 +200,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -200,6 +200,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(order.getSalesmanId()); AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(order.getSalesmanId());
if (Objects.nonNull(adminUserRespDTO)) { if (Objects.nonNull(adminUserRespDTO)) {
order.setDeptId(adminUserRespDTO.getDeptId()); order.setDeptId(adminUserRespDTO.getDeptId());
}else {
order.setDeptId(0L);
} }
} else if (CollectionUtil.isEmpty(orderExceptionDOList) && } else if (CollectionUtil.isEmpty(orderExceptionDOList) &&
Objects.nonNull(customerDO) Objects.nonNull(customerDO)
...@@ -2048,6 +2050,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order ...@@ -2048,6 +2050,8 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(customerDO.getCustomerService()); AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(customerDO.getCustomerService());
if (Objects.nonNull(adminUserRespDTO)) { if (Objects.nonNull(adminUserRespDTO)) {
orderDO.setDeptId(adminUserRespDTO.getDeptId()); orderDO.setDeptId(adminUserRespDTO.getDeptId());
}else {
orderDO.setDeptId(0L);
} }
} else { } else {
orderDO.setSalesmanId(0L); orderDO.setSalesmanId(0L);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment