|
|
@@ -744,7 +744,8 @@ class StoreOrderRepository extends BaseRepository
|
|
744
|
744
|
'commission_rate' => (float)$merchantRepository->get($cartInfo['mer_id'])->mer_commission_rate,
|
|
745
|
745
|
'order_type' => 0,
|
|
746
|
746
|
'extension_one' => round($total_extension_one, 2),
|
|
747
|
|
- 'extension_two' => $total_extension_two,
|
|
|
747
|
+// 'extension_two' => $total_extension_two,
|
|
|
748
|
+ 'extension_two' => $product_attr_unique_datas['extension_two'],//@todo 此字段已被用于分佣比例
|
|
748
|
749
|
'orderInfo' => $cartInfo['order'],
|
|
749
|
750
|
'cartInfo' => $cartInfo['list'],
|
|
750
|
751
|
'order_sn' => $this->getNewOrderId() . ($k + 1),
|
|
|
@@ -10202,20 +10203,25 @@ class StoreOrderRepository extends BaseRepository
|
|
10202
|
10203
|
//推广佣金
|
|
10203
|
10204
|
$this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $group_order['group_order_sn'], '推广获得拥金' . $yj_amount_90, $store_order_data['mer_id'], 0);
|
|
10204
|
10205
|
}
|
|
|
10206
|
+ /** @var OrderMerchantRepository $orderMerchantRepository */
|
|
|
10207
|
+ $orderMerchantRepository = app()->make(OrderMerchantRepository::class);
|
|
|
10208
|
+ $jdAndGonxianConfig = $orderMerchantRepository->getMerchantContribution($store_order_data['extension_two']);
|
|
|
10209
|
+
|
|
10205
|
10210
|
//商户获得贡献值
|
|
10206
|
10211
|
if ($concession_pri >= 0.01) {
|
|
|
10212
|
+ $gonxian = round($concession_pri * $jdAndGonxianConfig['gonxian'],2);
|
|
10207
|
10213
|
$gongxian_data = [
|
|
10208
|
10214
|
"uid" =>$merchant_data["uid"],
|
|
10209
|
10215
|
"mer_id" =>$user_data['mer_id'],
|
|
10210
|
10216
|
"pv" =>$pv,
|
|
10211
|
|
- "number" => $concession_pri,
|
|
|
10217
|
+ "number" => $gonxian,
|
|
10212
|
10218
|
"addtime" =>time(),
|
|
10213
|
10219
|
"status" =>-1,
|
|
10214
|
10220
|
"order_type" =>2,
|
|
10215
|
10221
|
"order_id" =>$store_order_data['order_id'],
|
|
10216
|
10222
|
"mark" =>"锁客商家获得贡献值",
|
|
10217
|
10223
|
"desc" =>'',
|
|
10218
|
|
- "surplus" =>$concession_pri,
|
|
|
10224
|
+ "surplus" =>$gonxian,
|
|
10219
|
10225
|
"type" =>1
|
|
10220
|
10226
|
];
|
|
10221
|
10227
|
Db::name("user_sign_gongxian")->insert($gongxian_data);//添加记录
|
|
|
@@ -10225,17 +10231,18 @@ class StoreOrderRepository extends BaseRepository
|
|
10225
|
10231
|
|
|
10226
|
10232
|
//商户获得京豆
|
|
10227
|
10233
|
if ($concession_pri >= 0.01) {
|
|
|
10234
|
+ $jd = round($concession_pri * $jdAndGonxianConfig['jd'],2);
|
|
10228
|
10235
|
$jd_data = [
|
|
10229
|
10236
|
"uid" =>$merchant_data["uid"],
|
|
10230
|
10237
|
"mer_id" =>$user_data['mer_id'],
|
|
10231
|
|
- "number" => $concession_pri,
|
|
|
10238
|
+ "number" => $jd,
|
|
10232
|
10239
|
"addtime" =>time(),
|
|
10233
|
10240
|
"status" =>-1,
|
|
10234
|
10241
|
"order_type" =>2,
|
|
10235
|
10242
|
"order_id" =>$store_order_data['order_id'],
|
|
10236
|
10243
|
"mark" =>"锁客商家获得京豆",
|
|
10237
|
10244
|
"desc" =>'',
|
|
10238
|
|
- "surplus" =>$concession_pri,
|
|
|
10245
|
+ "surplus" =>$jd,
|
|
10239
|
10246
|
"type" =>1
|
|
10240
|
10247
|
];
|
|
10241
|
10248
|
Db::name("user_sign_jingdou")->insert($jd_data);//添加记录
|