店铺uv条件判定问题处理

This commit is contained in:
Chopper 2021-06-01 09:29:03 +08:00
parent 79461c3768
commit 56c532349b

View File

@ -21,7 +21,6 @@ import cn.lili.modules.statistics.util.StatisticsSuffix;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -237,10 +236,10 @@ public class PlatformViewDataServiceImpl extends ServiceImpl<PlatformViewDataMap
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.between("date", dates[0], dates[1]);
//根据店铺查询判定如果有则店铺查询如果没有则根据商家查询
if (queryParam.getStoreId() != null) {
if (StringUtils.isNotEmpty(queryParam.getStoreId())) {
queryWrapper.eq("store_id", queryParam.getStoreId());
} else {
queryWrapper.eq("store_id", "-1");
queryWrapper.eq("store_id", -1);
}
return platformViewDataMapper.count(queryWrapper);
}