|
@@ -755,7 +755,7 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
QueryWrapper<ProductInfo> wrapper = Wrappers.query();
|
|
|
wrapper.groupBy("type");
|
|
|
- wrapper.select("count(*) count, ifNull(type,-1)");
|
|
|
+ wrapper.select("count(*) count, ifNull(type,-1) type");
|
|
|
List<ProductInfo> productInfos = baseMapper.selectList(wrapper);
|
|
|
Map<String, List<ProductInfo>> productInfoMap = productInfos.stream().collect(Collectors.groupingBy(ProductInfo::getType));
|
|
|
|
|
@@ -764,8 +764,9 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
|
|
|
map.put("amount",amount);
|
|
|
//获取产品类型统计数据
|
|
|
+ DynamicDataSourceContextHolder.push(SourceConstant.BASE);
|
|
|
List<DictTenantDataVo> dictTenantDataVoList = getDict("product_type");
|
|
|
-
|
|
|
+ DynamicDataSourceContextHolder.poll();
|
|
|
if (dictTenantDataVoList.size()==0){
|
|
|
throw new ServiceException("数据异常:产品没有设置产品类型字典,请先添加");
|
|
|
}
|