zoujiajian 2 năm trước cách đây
mục cha
commit
8d25e2a557

+ 25 - 24
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpCustomerAcquistionServiceImpl.java

@@ -56,38 +56,39 @@ public class CorpCustomerAcquistionServiceImpl implements CorpCustomerAcquistion
         if (corpCustomerAcquisitionLink == null) {
             throw BusinessRuntimeException.getInstance("获客链接不存在.");
         }
-        List<String> dutyServices = sysConfigService.getDutyServices();
-        //值班
-        if (CollUtil.isNotEmpty(dutyServices)) {
-            String userList = corpCustomerAcquisitionLink.getUserList();
+        String userList = corpCustomerAcquisitionLink.getUserList();
 
-            List<String> users = Jsons.parseList(userList, String.class);
+        List<String> users = Jsons.parseList(userList, String.class);
+        if (users.size() > 1) {
+            List<String> dutyServices = sysConfigService.getDutyServices();
+            //值班
+            if (CollUtil.isNotEmpty(dutyServices)) {
 
-            String chooseDutyUsers = corpCustomerAcquisitionLink.getChooseDutyUsers();
-            if (chooseDutyUsers == null) {
-                chooseDutyUsers = userList;
-            }
-            List<String> chooseUserList = Jsons.parseList(chooseDutyUsers, String.class);
+                String chooseDutyUsers = corpCustomerAcquisitionLink.getChooseDutyUsers();
+                if (chooseDutyUsers == null) {
+                    chooseDutyUsers = userList;
+                }
+                List<String> chooseUserList = Jsons.parseList(chooseDutyUsers, String.class);
 
-            Set<String> fitUsers = dutyServices.stream().filter(e -> users.contains(e)).collect(Collectors.toSet());
-            if (CollUtil.isNotEmpty(fitUsers) && (fitUsers.size() != chooseUserList.size() || !chooseUserList.containsAll(fitUsers))) {
+                Set<String> fitUsers = dutyServices.stream().filter(e -> users.contains(e)).collect(Collectors.toSet());
+                if (CollUtil.isNotEmpty(fitUsers) && (fitUsers.size() != chooseUserList.size() || !chooseUserList.containsAll(fitUsers))) {
 
-                corpCustomerAcquisitionLink.setChooseDutyUsers(Jsons.toJson(fitUsers));
+                    corpCustomerAcquisitionLink.setChooseDutyUsers(Jsons.toJson(fitUsers));
 
-                //更新获客链接
-                WxCpLinkUpd wxCpLinkUpd = new WxCpLinkUpd();
-                wxCpLinkUpd.setLinkName(corpCustomerAcquisitionLink.getLinkName());
-                wxCpLinkUpd.setLinkId(corpCustomerAcquisitionLink.getLinkId());
-                wxCpLinkUpd.setSkipVerify(corpCustomerAcquisitionLink.getSkipVerify());
-                Range range = new Range();
-                range.setUserList(JSONUtil.parseArray(corpCustomerAcquisitionLink.getChooseDutyUsers()).toList(String.class));
-                wxCpLinkUpd.setRange(range);
+                    //更新获客链接
+                    WxCpLinkUpd wxCpLinkUpd = new WxCpLinkUpd();
+                    wxCpLinkUpd.setLinkName(corpCustomerAcquisitionLink.getLinkName());
+                    wxCpLinkUpd.setLinkId(corpCustomerAcquisitionLink.getLinkId());
+                    wxCpLinkUpd.setSkipVerify(corpCustomerAcquisitionLink.getSkipVerify());
+                    Range range = new Range();
+                    range.setUserList(JSONUtil.parseArray(corpCustomerAcquisitionLink.getChooseDutyUsers()).toList(String.class));
+                    wxCpLinkUpd.setRange(range);
 
-                corpOps.customerAcquisitionUpdateLink(null, wxCpLinkUpd);
-            }
+                    corpOps.customerAcquisitionUpdateLink(null, wxCpLinkUpd);
+                }
 
+            }
         }
-
         return corpCustomerAcquisitionLink.getUrl();
     }
 

+ 3 - 0
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpFollowActiveCodeFrontServiceImpl.java

@@ -88,6 +88,9 @@ public class CorpFollowActiveCodeFrontServiceImpl implements CorpFollowActiveCod
 	 * 获取对应值班客服的二维码
 	 */
 	public String getDutyServiceCode(List<CorpFollowActiveCodeDto> activeCodeDtos) {
+		if (activeCodeDtos.size() == 1) {
+			return activeCodeDtos.get(0).getQrCode();
+		}
 		List<String> dutyServices = sysConfigService.getDutyServices();
 		String chooseFollowId = null;
 		//值班