Commit 70b6cca8 by guojuxing

判空

parent 082bf723
...@@ -120,6 +120,12 @@ public class GoDownComponent { ...@@ -120,6 +120,12 @@ public class GoDownComponent {
Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()); Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson());
/**所有渠道或者线下渠道第一层级 合计算上无归属数据**/ /**所有渠道或者线下渠道第一层级 合计算上无归属数据**/
if((params.getChannel() == null || (params.getChannel() == StoreChannelEnum.OFFLINE.getChannel() && params.getLevel() == levelVo.getLevel())) && wgs == 1){ if((params.getChannel() == null || (params.getChannel() == StoreChannelEnum.OFFLINE.getChannel() && params.getLevel() == levelVo.getLevel())) && wgs == 1){
if (CollectionUtils.isEmpty(params.getStoreInfoIdList())) {
params.setStoreInfoIdList(new ArrayList<>());
}
if (CollectionUtils.isEmpty(params.getOnlineStoreIdList())) {
params.setOnlineStoreIdList(new ArrayList<>());
}
params.getStoreInfoIdList().add(-1); params.getStoreInfoIdList().add(-1);
params.getOnlineStoreIdList().add("-1"); params.getOnlineStoreIdList().add("-1");
} }
...@@ -129,6 +135,12 @@ public class GoDownComponent { ...@@ -129,6 +135,12 @@ public class GoDownComponent {
Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()); Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson());
/**所有渠道或者线下渠道第一层级 合计算上无归属数据**/ /**所有渠道或者线下渠道第一层级 合计算上无归属数据**/
if(wgs == 1){ if(wgs == 1){
if (CollectionUtils.isEmpty(params.getStoreInfoIdList())) {
params.setStoreInfoIdList(new ArrayList<>());
}
if (CollectionUtils.isEmpty(params.getOnlineStoreIdList())) {
params.setOnlineStoreIdList(new ArrayList<>());
}
params.getStoreInfoIdList().add(-1); params.getStoreInfoIdList().add(-1);
params.getOnlineStoreIdList().add("-1"); params.getOnlineStoreIdList().add("-1");
} }
...@@ -138,6 +150,12 @@ public class GoDownComponent { ...@@ -138,6 +150,12 @@ public class GoDownComponent {
Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()); Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson());
if(params.getChannel() != null && params.getChannel() == 1 && params.getLevel() == levelVo.getLevel() && wgs == 1){ if(params.getChannel() != null && params.getChannel() == 1 && params.getLevel() == levelVo.getLevel() && wgs == 1){
params.setChannel(null); params.setChannel(null);
if (CollectionUtils.isEmpty(params.getStoreInfoIdList())) {
params.setStoreInfoIdList(new ArrayList<>());
}
if (CollectionUtils.isEmpty(params.getOnlineStoreIdList())) {
params.setOnlineStoreIdList(new ArrayList<>());
}
params.getStoreInfoIdList().clear(); params.getStoreInfoIdList().clear();
params.getOnlineStoreIdList().clear(); params.getOnlineStoreIdList().clear();
params.getStoreInfoIdList().add(-1); params.getStoreInfoIdList().add(-1);
...@@ -149,6 +167,12 @@ public class GoDownComponent { ...@@ -149,6 +167,12 @@ public class GoDownComponent {
Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()); Integer wgs = storeSearchUtils.isWgs(params.getUserId(), params.getEnterpriseId(), params.getSearchJson());
if(wgs == 1){ if(wgs == 1){
params.setChannel(null); params.setChannel(null);
if (CollectionUtils.isEmpty(params.getStoreInfoIdList())) {
params.setStoreInfoIdList(new ArrayList<>());
}
if (CollectionUtils.isEmpty(params.getOnlineStoreIdList())) {
params.setOnlineStoreIdList(new ArrayList<>());
}
params.getStoreInfoIdList().clear(); params.getStoreInfoIdList().clear();
params.getOnlineStoreIdList().clear(); params.getOnlineStoreIdList().clear();
params.getStoreInfoIdList().add(-1); params.getStoreInfoIdList().add(-1);
......
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