|
@@ -1,5 +1,6 @@
|
|
|
package com.dayou.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.dayou.dto.CustomerPersonalSelectDTO;
|
|
|
import com.dayou.entity.CustomerLinkman;
|
|
@@ -58,7 +59,10 @@ public class CustomerLinkmanServiceImpl extends ServiceImpl<CustomerLinkmanMappe
|
|
|
|
|
|
@Override
|
|
|
public Boolean add(CustomerLinkman customerLinkman){
|
|
|
- customerLinkman.setClientManagerId(LoginContext.getCurrentUserId());
|
|
|
+ // 判断前端是否有设置客户经理
|
|
|
+ if (ObjectUtil.isNull(customerLinkman.getClientManagerId()) || ObjectUtil.isEmpty(customerLinkman.getClientManagerId())) {
|
|
|
+ customerLinkman.setClientManagerId(LoginContext.getCurrentUserId()); // 没有就以当前会话用户作为客户经理
|
|
|
+ }
|
|
|
return this.save(customerLinkman);
|
|
|
}
|
|
|
|