|
|
@@ -1088,9 +1088,13 @@ class ProductRepository extends BaseRepository
|
|
1088
|
1088
|
// 计算共富区PV
|
|
1089
|
1089
|
/** @var SharedProsperityRecommendConfigRepository $sharedProsperityRecommendConfigRepository */
|
|
1090
|
1090
|
$sharedProsperityRecommendConfigRepository = app()->make(SharedProsperityRecommendConfigRepository::class);
|
|
|
1091
|
+ // 共富配置--获取最大的直推奖比例
|
|
1091
|
1092
|
$sharedProsperityRecommendConfigEntityByMaxRewardRatio = $sharedProsperityRecommendConfigRepository->getSharedProsperityRecommendConfigEntityByMaxRewardRatio();
|
|
|
1093
|
+ // 共富配置--获取最大的分享奖比例
|
|
|
1094
|
+ $sharedProsperityRecommendConfigEntityByMaxShareRewardRatio = $sharedProsperityRecommendConfigRepository->getSharedProsperityRecommendConfigEntityByMaxShareRatio();
|
|
1092
|
1095
|
// 利润 减去 顶格的直推奖,剩下的是PV值
|
|
1093
|
|
- $pvProportion = bcsub('1', bcdiv($sharedProsperityRecommendConfigEntityByMaxRewardRatio->getRewardRatio(), '100', 4), 2);
|
|
|
1096
|
+ $sharPveRate = bcadd($sharedProsperityRecommendConfigEntityByMaxRewardRatio->getRewardRatio(),$sharedProsperityRecommendConfigEntityByMaxShareRewardRatio->getShareRatio(), CommonEnum::DECIMAL_PLACES_OF_THE_AMOUNT);
|
|
|
1097
|
+ $pvProportion = bcsub('1', bcdiv($sharPveRate, '100', 4), 2);
|
|
1094
|
1098
|
// 获取利润
|
|
1095
|
1099
|
$productSku = Db::name('store_product_attr_value')->where('product_id', $res['product_id'])->order('price asc')->find();
|
|
1096
|
1100
|
// 计算pv
|