|
|
@@ -3684,6 +3684,21 @@ class StoreOrderRepository extends BaseRepository
|
|
3684
|
3684
|
public function yugu_rebate_gong_fu($order)
|
|
3685
|
3685
|
{
|
|
3686
|
3686
|
|
|
|
3687
|
+ $make="";
|
|
|
3688
|
+ $type_shop = $order['type_shop']??0;
|
|
|
3689
|
+ if($type_shop==1){
|
|
|
3690
|
+ $make="拼多多";
|
|
|
3691
|
+ }else if($type_shop==5){
|
|
|
3692
|
+ $make="淘宝";
|
|
|
3693
|
+ }else if($type_shop==6){
|
|
|
3694
|
+ $make="京东";
|
|
|
3695
|
+ }else if($type_shop==3){
|
|
|
3696
|
+ $make="苏宁";
|
|
|
3697
|
+ }else if($type_shop==2){
|
|
|
3698
|
+ $make="唯品会";
|
|
|
3699
|
+ }else if($type_shop==9){
|
|
|
3700
|
+ $make="话费";
|
|
|
3701
|
+ }
|
|
3687
|
3702
|
|
|
3688
|
3703
|
$order_sn = $order["order_sn"];
|
|
3689
|
3704
|
log::info("进入添加养老金{$order['order_sn']}");
|
|
|
@@ -3729,11 +3744,11 @@ class StoreOrderRepository extends BaseRepository
|
|
3729
|
3744
|
log::info("++{$order['total_price']}+返回佣金===={$oldagefee}");
|
|
3730
|
3745
|
//当前已扣会费总额
|
|
3731
|
3746
|
// $oldagefee = $oldagefee-$dues;
|
|
3732
|
|
- $mark = "消费获得养老金" . $oldagefee;
|
|
|
3747
|
+ $mark = $make."消费获得养老金" . $oldagefee;
|
|
3733
|
3748
|
|
|
3734
|
3749
|
//end会费
|
|
3735
|
3750
|
//sat存养老金
|
|
3736
|
|
- $title = "养老金 ";
|
|
|
3751
|
+ $title = "养老金";
|
|
3737
|
3752
|
$commission_type = 5;
|
|
3738
|
3753
|
if ($oldagefee >= 0.01) {
|
|
3739
|
3754
|
$this->add_bill($title, $oldagefee, $order["uid"], $mark, $commission_type, $order_sn, $order_id, $order["mer_id"], 0, 0, $order["type_shop"]);
|
|
|
@@ -3749,7 +3764,7 @@ class StoreOrderRepository extends BaseRepository
|
|
3749
|
3764
|
$zijiUser = Db::name("user")->where('uid', $order["uid"])->find();
|
|
3750
|
3765
|
// 老用户发红包奖励
|
|
3751
|
3766
|
if($zijiUser['is_old'] == 1){
|
|
3752
|
|
- $this->giveHongBao($order["uid"], $pvfee, $order_id, '消费赠送红包');
|
|
|
3767
|
+ $this->giveHongBao($order["uid"], $pvfee, $order_id, $make.'消费赠送红包');
|
|
3753
|
3768
|
}
|
|
3754
|
3769
|
$sprerdUser = Db::name("user")->where('uid', $zijiUser['spread_uid'])->find();
|
|
3755
|
3770
|
//不为空的时候进行添加推荐奖励
|
|
|
@@ -3813,7 +3828,7 @@ class StoreOrderRepository extends BaseRepository
|
|
3813
|
3828
|
|
|
3814
|
3829
|
// 佣金百分之90进入佣金池 佣金百分之10进入复购金
|
|
3815
|
3830
|
$tuiguanyongjin = roundOptimize($yongjin * 0.9, 2);
|
|
3816
|
|
- $tuiguanfugou = roundOptimize($yongjin * 0.1, 2);
|
|
|
3831
|
+ $tuiguanfugou = $yongjin;//复购金赠送函数里面有计算百分之10
|
|
3817
|
3832
|
|
|
3818
|
3833
|
//end会费
|
|
3819
|
3834
|
//sat存养老金
|