Quellcode durchsuchen

修改跟进接口

anderx vor 1 Jahr
Ursprung
Commit
800103b8c9

+ 2 - 1
src/main/java/com/goafanti/common/dao/RestrictProjectMapper.java

@@ -3,6 +3,7 @@ package com.goafanti.common.dao;
 import com.goafanti.business.bo.InputRestrictProject;
 import com.goafanti.business.bo.OutRestrictProject;
 import com.goafanti.common.model.RestrictProject;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -34,5 +35,5 @@ public interface RestrictProjectMapper {
 
     void updateRelease(List<Integer> list2);
 
-    void updateRefreshLockTime(String uid, String pid, String aid);
+    void updateRefreshLockTime(@Param("uid") String uid, @Param("pid") String pid, @Param("aid") String aid);
 }

+ 2 - 2
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -513,7 +513,7 @@ public class AdminCustomerApiController extends BaseApiController{
 	@RequestMapping(value = "/addFollow", method = RequestMethod.POST)
 	public Result addFollow(String userBusinessList,String uid,String ocbId,String contactType,
 							String result,String followTime,Integer type)  throws BusinessException{
-		Result res = new Result();
+		Result res = res();
 		if(StringUtils.isBlank(uid) || StringUtils.isBlank(ocbId)){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, ""));
 			return res;
@@ -542,7 +542,7 @@ public class AdminCustomerApiController extends BaseApiController{
 		fbb.setFollowTime(followTime);
 		fbb.setUserBusinessList(list);
 		customerService.addFollow(fbb,null,1,type);
-		return res;
+		return res.data(1);
 	}
 
 	/** 进入修改拜访记录 **/

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

@@ -817,6 +817,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		int followCount = userBusinessMapper.selectFollowCountByUAid(fbb.getUid(), null) + 1;
 		userFollow.setFollowCount(followCount);
 		userFollow.setType(0);
+		if (type==0){
 			//处理中间表
 			UserMid um =new UserMid();
 			um.setUid(userFollow.getUid());
@@ -831,18 +832,16 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			um.setLastFollowType(userFollow.getContactType());
 			um.setFollowAname(a.getName());
 			userMidMapper.updateByUid(um);
-		if (type==0){
 			addUserFllow( fbb, ufid, mainStatus,followTime,followId);
 		}else if (type==1){
-			addRestrictProject(fbb, ufid, mainStatus,followTime,followId);
+			addRestrictProject(fbb,followTime,followId);
 		}
 		userFollowMapper.insert(userFollow);
 
 		return 1;
 	}
 
-	private void addRestrictProject(FollowBusinessBo fbb, String ufid, Integer mainStatus, Date followTime, String followId) {
-		List<LockingReleaseBo> businessLockedList = null;
+	private void addRestrictProject(FollowBusinessBo fbb,  Date followTime, String followId) {
 		String businessName = "";
 		String ufbId = "";
 		UserBusiness userBusiness = null;
@@ -896,6 +895,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	private void addUserFllow(FollowBusinessBo fbb,String ufid,Integer mainStatus,Date followTime,String followId) {
+
 		boolean isUserOwner = false;
 		// 检查客户锁定情况
 		if (fbb.getUserBusinessList()!=null&& !fbb.getUserBusinessList().isEmpty()) {