Commit ae0c265c authored by shiyu's avatar shiyu

Merge branch 'master' into quanku_v2.0

parents 9ce4cd60 149014e8
......@@ -376,7 +376,7 @@
(SELECT item_id, MAX(price) as max_amount
FROM distributor_share_record where `distributor_id` = #{distributorId} AND `type` = #{type} AND enabled =1
GROUP BY item_id) t
ON d.item_id = t.item_id AND price = t.max_amount where d.distributor_id = #{distributorId} AND d.type = #{type};
ON d.item_id = t.item_id AND price = t.max_amount where d.distributor_id = #{distributorId} AND d.type = #{type} AND d.enabled =1;
</select>
</mapper>
\ No newline at end of file
......@@ -278,6 +278,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
Map<Long, DistributorShareRecord> map = distributorShareRecordList.stream().collect(Collectors.toMap(DistributorShareRecord::getItemId, Function.identity(), (k1, k2) -> k1));
logger.info(">>>>>>> map >>>>> : {}", JsonUtils.from(map));
List<Long> itemIds = distributorShareRecordList.stream().map(DistributorShareRecord::getItemId).collect(Collectors.toList());
if (CollectionUtils.isEmpty(itemIds)) {
return Result.success(new PageSearchResult<>());
}
SupplierItemRequestDto searchDto = new SupplierItemRequestDto();
searchDto.setIsOnSale(true);
searchDto.setIsDeleted(false);
......@@ -311,7 +314,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
});
return Result.success(PageSearchResult.of(pageInfo, supplierItemVos));
} catch (Exception e) {
logger.error("查询最近订单所属分销商的商品列表 error : {}", e);
logger.error("查询最近订单所属分销商的商品列表,商品类型为:{}, error : {}", dto.getType(), e);
}
return Result.failed();
}
......
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