|
|
@@ -315,17 +315,23 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
ulr.setLockTime(date);
|
|
|
userLockReleaseMapper.insertSelective(ulr);
|
|
|
}
|
|
|
- UserBusiness ub=new UserBusiness();
|
|
|
- ub.setId(UUID.randomUUID().toString());
|
|
|
- ub.setUid(tn.getBuyerId());
|
|
|
- ub.setAid(tn.getSalesmanId());
|
|
|
- ub.setFollowSituation(5);
|
|
|
- ub.setCustomerStatus(4);
|
|
|
- ub.setCreateTime(date);
|
|
|
- ub.setUpdateTime(date);
|
|
|
- ub.setRemarks("派单自动锁定客户");
|
|
|
- ub.setBusinessProjectId(t.getCommodityId());
|
|
|
+ int i = userBusinessMapper.judgeBusiness(tn.getBuyerId(), t.getCommodityId(), TokenManager.getAdminId());
|
|
|
+ UserBusiness ub=new UserBusiness();
|
|
|
+ ub.setId(UUID.randomUUID().toString());
|
|
|
+ ub.setUid(tn.getBuyerId());
|
|
|
+ ub.setAid(tn.getSalesmanId());
|
|
|
+ ub.setFollowSituation(5);
|
|
|
+ ub.setCustomerStatus(4);
|
|
|
+ ub.setCreateTime(date);
|
|
|
+ ub.setUpdateTime(date);
|
|
|
+ ub.setRemarks("派单自动锁定客户");
|
|
|
+ ub.setBusinessProjectId(t.getCommodityId());
|
|
|
+ if (i>0){
|
|
|
+ userBusinessMapper.updateByPrimaryKeySelective(ub);
|
|
|
+ }else {
|
|
|
userBusinessMapper.insertSelective(ub);
|
|
|
+ }
|
|
|
+
|
|
|
//如果是渠道客户更新渠道表
|
|
|
UserChannel uc=new UserChannel();
|
|
|
uc.setUid(tn.getBuyerId());
|