Browse Source

修改跟进接口

anderx 1 year ago
parent
commit
b5b8fab627

+ 8 - 0
src/main/java/com/goafanti/business/controller/RestrictProjectController.java

@@ -70,4 +70,12 @@ public class RestrictProjectController extends CertifyApiController {
         Result res = res();
         return res.data(restrictProjectService.pageList(in));
     }
+
+    /**
+     * 限定项目跟进
+     */
+    @RequestMapping(value = "/getFollowDtails", method = RequestMethod.GET)
+    public Result<RestrictProjectPageList> getFollowDtails(String uid){
+        return res().data(restrictProjectService.getFollowDtails(uid));
+    }
 }

+ 2 - 0
src/main/java/com/goafanti/business/service/RestrictProjectService.java

@@ -11,4 +11,6 @@ public interface RestrictProjectService {
     Object update(Integer id,Integer type,String takeAid);
 
     Object pageList(InputRestrictProject in);
+
+    Object getFollowDtails(String uid);
 }

+ 31 - 0
src/main/java/com/goafanti/business/service/impl/RestrictProjectServiceImpl.java

@@ -3,19 +3,25 @@ package com.goafanti.business.service.impl;
 import com.goafanti.business.bo.InputRestrictProject;
 import com.goafanti.business.bo.RestrictProjectPageList;
 import com.goafanti.business.service.RestrictProjectService;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.RestrictProjectMapper;
 import com.goafanti.common.dao.UserBusinessMapper;
+import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.dao.UserTransferLogMapper;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.RestrictProject;
+import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserBusiness;
 import com.goafanti.common.model.UserTransferLog;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.BusinessListBo;
+import com.goafanti.customer.bo.FollowBusinessBo;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
@@ -28,6 +34,18 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
     private UserTransferLogMapper userTransferLogMapper;
     @Resource
     private UserBusinessMapper userBusinessMapper;
+    @Resource
+    private UserMapper userMapper;
+
+
+
+
+
+
+
+
+
+
     @Override
     public int add(InputRestrictProject in) {
         String aid = TokenManager.getAdminId();
@@ -107,6 +125,19 @@ public class RestrictProjectServiceImpl extends BaseMybatisDao<RestrictProjectMa
         return page;
     }
 
+    @Override
+    public Object getFollowDtails(String uid) {
+        User user = userMapper.findUserAccountDetail(uid);
+        FollowBusinessBo fbb = new FollowBusinessBo();
+        SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
+        fbb.setFollowTime(format.format(new Date()));
+        fbb.setIdentifyName(user.getIdentifyName());
+        fbb.setUid(uid);
+        List<BusinessListBo> businessListBos = userBusinessMapper.selectBusinessByUAid(uid, TokenManager.getAdminId());
+        fbb.setUserBusinessList(businessListBos);
+        return fbb;
+    }
+
     private void pushPageList(List<RestrictProjectPageList> list) {
         LocalDateTime now = LocalDateTime.now();
         now=now.withHour(0).withMinute(0).withSecond(0).withNano(0);

+ 4 - 2
src/main/java/com/goafanti/common/enums/NoticeTypes.java

@@ -49,8 +49,10 @@ public enum NoticeTypes {
 				|| i == NoticeStatus.PROJECT_RENEW_NO.getCode() ) {
 			return 2;
 		} else if (i == NoticeStatus.CUSTOMER_LOSE30.getCode() || i == NoticeStatus.CUSTOMER_LOSE270.getCode()
-				|| i == NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode()
-				|| i == NoticeStatus.CUSTOMER_CHENNEL_RECOVERY.getCode()) {
+				|| i == NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode() || i == NoticeStatus.CUSTOMER_CHENNEL_RECOVERY.getCode()
+				|| i == NoticeStatus.RESTRICT_PROJECT_LOSE30.getCode() || i == NoticeStatus.RESTRICT_PROJECT_LOSE270.getCode()
+				|| i == NoticeStatus.RESTRICT_PROJECT_LOSE30_REMIND.getCode() || i == NoticeStatus.RESTRICT_PROJECT_LOSE270_REMIND.getCode()
+		) {
 			return 3;
 		} else if (i == NoticeStatus.CUSTOMER_PRIVATE_REMINDER.getCode()
 				|| i == NoticeStatus.CUSTOMER_LOSE_REMINDER.getCode()) {