Browse Source

业务转交更改逻辑

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
c114882269

+ 4 - 8
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1527,17 +1527,13 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		userLockReleaseMapper.updateByPrimaryKeySelective(ul);
 		addtransferLog(uid,pid,TokenManager.getAdminId(),inputId,1);
 		addUserLock(uid,inputId,1,pid,now); //指定用户锁定客户
-		List<BusinessListBo> bl=userBusinessMapper.selectBusinessProjectByUAPid(uid, inputId, pid);
-		if (bl.isEmpty()) {
+		List<BusinessListBo> bl=userBusinessMapper.selectBusinessProjectByUAPid(uid, TokenManager.getAdminId(), pid);
+		if (bl.size()==1) {
 			UserBusiness ub=new UserBusiness();
-			ub.setId(UUID.randomUUID().toString());
+			ub.setId(bl.get(0).getBusinessId());
 			ub.setAid(inputId);
-			ub.setUid(uid);
-			ub.setBusinessProjectId(pid);
-			ub.setCustomerStatus(4);
-			ub.setFollowSituation(5);
 			ub.setRemarks("转交客户业务触发");
-			userBusinessMapper.insertSelective(ub);
+			userBusinessMapper.updateByPrimaryKeySelective(ub);
 		}
 		return 1;
 	}