|
@@ -135,9 +135,9 @@ public class SaleClueInfoServiceImpl implements ISaleClueInfoService {
|
|
|
clue.setSellerId(Long.valueOf(dataMap.get("sellerId")));
|
|
|
clue.setSellerName(dataMap.get("sellerName"));
|
|
|
clue.setFans(Long.valueOf(dataMap.get("fans")));
|
|
|
- clue.setTelephone( dataMap.get("telephone").isEmpty() ? 0 : Long.valueOf(dataMap.get("telephone")));
|
|
|
+ clue.setTelephone(StringUtils.isEmpty(dataMap.get("telephone")) ? 0 : Long.valueOf(dataMap.get("telephone")));
|
|
|
clue.setProviderFlag(dataMap.get("providerFlag").equals("否") ? 0 : 1);
|
|
|
- clue.setTransitionFlag(dataMap.get("transitionFlag") == null ? 0 : Integer.valueOf(dataMap.get("transitionFlag")));
|
|
|
+ clue.setTransitionFlag(dataMap.get("transitionFlag").equals("否") ? 0 : 1 );
|
|
|
clue.setCreateUserId(createUserId);
|
|
|
//查询行业
|
|
|
SysIndustryInfo industryInfo = sysIndustryInfoMapper.getIndustryInfoByName(dataMap.get("industryId"));
|
|
@@ -147,23 +147,54 @@ public class SaleClueInfoServiceImpl implements ISaleClueInfoService {
|
|
|
clue.setProvinceId(areaInfo == null ? 0 : areaInfo.getParentCode());
|
|
|
clue.setCityId(areaInfo == null ? 0 : areaInfo.getCode());
|
|
|
|
|
|
- quota.setNearlyThirtyDays(dataMap.get("NearlyThirtyDays"));
|
|
|
- quota.setGmvMonth(dataMap.get("gmvMonth") == null ? 0 : Long.valueOf(dataMap.get("gmvMonth")));
|
|
|
- quota.setGmv(dataMap.get("gmv"));
|
|
|
+ if (StringUtils.isNotEmpty(dataMap.get("NearlyThirtyDays"))){
|
|
|
+ quota.setNearlyThirtyDays(dataMap.get("NearlyThirtyDays"));
|
|
|
|
|
|
- quota.setMtdDate(dataMap.get("mtdDate") == null ? 0 : Long.valueOf(dataMap.get("mtdDate")));
|
|
|
- quota.setMtd(dataMap.get("mtd"));
|
|
|
- quota.setCreateUserId(createUserId);
|
|
|
- quota.setSellerId(Long.valueOf(dataMap.get("sellerId")));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(dataMap.get("gmv"))){
|
|
|
+ quota.setGmvMonth(Long.valueOf(dataMap.get("gmvMonth")));
|
|
|
+ quota.setGmv(dataMap.get("gmv"));
|
|
|
+ }
|
|
|
|
|
|
- clueList.add(clue);
|
|
|
- quotaList.add(quota);
|
|
|
+ if (StringUtils.isNotEmpty(dataMap.get("mtd"))){
|
|
|
+ quota.setMtdDate(Long.valueOf(dataMap.get("mtdDate")));
|
|
|
+ quota.setMtd(dataMap.get("mtd"));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(dataMap.get("NearlyThirtyDays")) ||
|
|
|
+ StringUtils.isNotEmpty(dataMap.get("gmv")) ||
|
|
|
+ StringUtils.isNotEmpty(dataMap.get("mtd"))){
|
|
|
+ quota.setCreateUserId(createUserId);
|
|
|
+ quota.setSellerId(Long.valueOf(dataMap.get("sellerId")));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.isNotNull(clue)){
|
|
|
+ clueList.add(clue);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(quota.getSellerId())){
|
|
|
+ quotaList.add(quota);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (clueList.size() > 0){
|
|
|
+ //销售线索
|
|
|
+ saleClueInfoMapper.replaceSaleClueInfoBatch(clueList);
|
|
|
+ }
|
|
|
+ if (quotaList.size() > 0){
|
|
|
+ //线索-额度
|
|
|
+ saleQuotaInfoMapper.replaceSaleQuotaInfoBatch(quotaList);
|
|
|
}
|
|
|
|
|
|
- //销售线索
|
|
|
- saleClueInfoMapper.replaceSaleClueInfoBatch(clueList);
|
|
|
- //线索-额度
|
|
|
- saleQuotaInfoMapper.replaceSaleQuotaInfoBatch(quotaList);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|