Commit 5188ed82 authored by jay's avatar jay

云迹拉取修改

parent 9cb03dac
......@@ -424,20 +424,22 @@ public class CloudActivityImpl implements ICloudActivityInterface {
int count2 = 0;
for (int i = 0; i < seeList.size(); i++) {
Map<String, Object> s = seeList.get(i);
//数据保护机制 只过滤私客存在的客户
//数据保护机制 1、过滤私客存在的客户 2、过滤已拉取的客户
String phone = s.get("loginAccount").toString();
String houseName = s.get("projectName").toString();
Map<String, Object> queryMap = new HashMap<>(5);
queryMap.put("phone", phone);
List<CustomerEntity> cusList = mergeMapper.queryByConditions(queryMap);
queryMap.put("mobile", phone);
List<CloudCustomerEntity> cloudList = cloudCustomerMapper.queryByConditions(queryMap);
if (CollectionUtils.isNotEmpty(cusList)) {
if (CollectionUtils.isNotEmpty(cusList) || CollectionUtils.isNotEmpty(cloudList)) {
Long count = increaseProtectKey(activeId);
logger.warn("cloud protect " + phone + " count :" + count + " total:" + getFinishCount(activeId));
count1 ++;
count1++;
continue;
} else {
count2 ++;
count2++;
Long count = increaseDoneKey(activeId);
logger.warn("cloud线程:" + "-" + total + " done count:" + count + " total:" + getFinishCount(activeId));
CloudCustomerEntity entity = getCloudCustomer(phone, houseName, city);
......
......@@ -88,7 +88,9 @@ public class AddCloudCustomerImpl implements IAddCloudCustomer {
Map<String, Object> queryMap = new HashMap<>(5);
queryMap.put("phone", phone);
List<CustomerEntity> cusList = mergeMapper.queryByConditions(queryMap);
if (CollectionUtils.isEmpty(cusList)) {
queryMap.put("mobile", phone);
List<CloudCustomerEntity> cloudList = mapper.queryByConditions(queryMap);
if (CollectionUtils.isEmpty(cusList) && CollectionUtils.isEmpty(cloudList)) {
CloudCustomerEntity entity = getCloudCustomer(m);
entity.setActiveId(activeId);
entity.setIsOvertime(0);
......
......@@ -265,6 +265,9 @@
<if test="city != null and city != ''">
AND city_code = #{city}
</if>
<if test="mobile != null and mobile != ''">
AND phone = #{mobile}
</if>
<if test="activeId != null and activeId >= 0 ">
AND active_id = #{activeId}
</if>
......
......@@ -265,6 +265,9 @@
<if test="city != null and city != ''">
AND city_code = #{city}
</if>
<if test="mobile != null and mobile != ''">
AND phone = #{mobile}
</if>
<if test="activeId != null and activeId >= 0 ">
AND active_id = #{activeId}
</if>
......
......@@ -265,6 +265,9 @@
<if test="city != null and city != ''">
AND city_code = #{city}
</if>
<if test="mobile != null and mobile != ''">
AND phone = #{mobile}
</if>
<if test="activeId != null and activeId >= 0 ">
AND active_id = #{activeId}
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment