上传资源添加验证号码段

master
wujingtao 2 years ago
parent c9b273eccf
commit 436cc7b9ed

@ -26,7 +26,8 @@ public class MobileUtil {
* *
* 134,135,136,137,138,139,147,148,150,151,152,157,158,159,178,182,183,184,187,188,195,198,1440,1703,1705,1706 * 134,135,136,137,138,139,147,148,150,151,152,157,158,159,178,182,183,184,187,188,195,198,1440,1703,1705,1706
**/ **/
private static final String CHINA_MOBILE_PATTERN = "(?:^(?:\\+86)?1(?:3[4-9]|4[78]|5[0-27-9]|78|8[2-478]|98|95)\\d{8}$)|(?:^(?:\\+86)?1440\\d{7}$)|(?:^(?:\\+86)?170[356]\\d{7}$)"; // private static final String CHINA_MOBILE_PATTERN = "(?:^(?:\\+86)?1(?:3[4-9]|4[78]|5[0-27-9]|78|8[2-478]|98|95)\\d{8}$)|(?:^(?:\\+86)?1440\\d{7}$)|(?:^(?:\\+86)?170[356]\\d{7}$)";
private static final String CHINA_MOBILE_PATTERN = "(?:^(?:\\+86)?1(?:3[4-9]|4[78]|5[0-27-9]|7[28]|8[2-478]|98|95)\\d{8}$)|(?:^(?:\\+86)?1440\\d{7}$)|(?:^(?:\\+86)?170[356]\\d{7}$)";
/** /**
* *
@ -45,8 +46,9 @@ public class MobileUtil {
} }
public static void main(String[] args) { public static void main(String[] args) {
String s = "/home/eladmin/mail/MM_20221125_2.zip"; // String s = "/home/eladmin/mail/MM_20221125_2.zip";
String filePath = s.substring(s.lastIndexOf(StrPool.SLASH) + DefaultNumberConstants.ONE_NUMBER); // String filePath = s.substring(s.lastIndexOf(StrPool.SLASH) + DefaultNumberConstants.ONE_NUMBER);
System.out.println( checkPhone("17269788988"));
} }
/** /**
* *

@ -11,6 +11,7 @@ import com.baiye.exception.BadRequestException;
import com.baiye.feign.*; import com.baiye.feign.*;
import com.baiye.http.CommonResponse; import com.baiye.http.CommonResponse;
import com.baiye.model.dto.*; import com.baiye.model.dto.*;
import com.baiye.model.entity.BaseClue;
import com.baiye.model.vo.ResSourceLabel; import com.baiye.model.vo.ResSourceLabel;
import com.baiye.module.dao.*; import com.baiye.module.dao.*;
import com.baiye.module.entity.*; import com.baiye.module.entity.*;
@ -90,7 +91,9 @@ public class ClueServiceImpl implements ClueService {
} }
} }
//删除不符合条件的资源 //删除不符合条件的资源
clueList.removeAll(removeClueList); // clueList.removeAll(removeClueList);
clueList = clueList.stream().filter(item -> !removeClueList.stream().map(BaseClue::getNid).collect(
Collectors.toList()).contains(item.getNid())).collect(Collectors.toList());
//更新成功条数 //更新成功条数
Map<Long, List<Clue>> clueGroup = clueList.stream().collect(Collectors.groupingBy(Clue::getRecordId)); Map<Long, List<Clue>> clueGroup = clueList.stream().collect(Collectors.groupingBy(Clue::getRecordId));
List<ClueRecord> successClueRecord = clueRecordRepository.findAllById(clueGroup.keySet()); List<ClueRecord> successClueRecord = clueRecordRepository.findAllById(clueGroup.keySet());
@ -531,11 +534,11 @@ public class ClueServiceImpl implements ClueService {
clueMiddleRepository.deleteByMemberId(userId); clueMiddleRepository.deleteByMemberId(userId);
//3、删除拓客或者DMP资源数据 //3、删除拓客或者DMP资源数据
clueTalkRepository.deleteByMemberId(userId); clueTalkRepository.deleteByMemberId(userId);
List<Map<String,Object>> mapList = clueMiddleRepository.findTaskIdCount(taskIds); List<Map<String, Object>> mapList = clueMiddleRepository.findTaskIdCount(taskIds);
Map<Long, Integer> taskCount = new HashMap<>(); Map<Long, Integer> taskCount = new HashMap<>();
for (Map<String, Object> map : mapList) { for (Map<String, Object> map : mapList) {
BigInteger taskId = (BigInteger)map.get("taskId"); BigInteger taskId = (BigInteger) map.get("taskId");
BigInteger num = (BigInteger)map.get("num"); BigInteger num = (BigInteger) map.get("num");
taskCount.put(taskId.longValue(), num.intValue()); taskCount.put(taskId.longValue(), num.intValue());
} }
return taskCount; return taskCount;

Loading…
Cancel
Save