xialei 1 год назад
Родитель
Сommit
5cf0aa3add
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      app/common/repositories/user/UserThirdRepository.php

+ 6 - 3
app/common/repositories/user/UserThirdRepository.php

@@ -885,7 +885,7 @@ class UserThirdRepository extends BaseRepository
885
                     "status"        =>  -1,
885
                     "status"        =>  -1,
886
                     "order_type"    =>  $type_shop,
886
                     "order_type"    =>  $type_shop,
887
                     "order_id"      =>  $order_sn,
887
                     "order_id"      =>  $order_sn,
888
-                    "mark"          =>  "推广消费从{$make}购买商品赠送积分",
888
+                    "mark"          =>  "推广{$make}商品赠送积分",
889
                     "surplus"       =>  $sprerdUser['score'] + $tuiguanyongjin,
889
                     "surplus"       =>  $sprerdUser['score'] + $tuiguanyongjin,
890
                     "pm"            =>  1,
890
                     "pm"            =>  1,
891
                     "source_type"   =>  4
891
                     "source_type"   =>  4
@@ -894,7 +894,10 @@ class UserThirdRepository extends BaseRepository
894
                 Db::name("user_sign_score")->insert($tuijifendata);//添加积分记录
894
                 Db::name("user_sign_score")->insert($tuijifendata);//添加积分记录
895
 
895
 
896
 
896
 
897
-                //添加推荐献值
897
+                //添加推荐献值 普通用户 贡献值为 pv* 30%;推广人是业务员及以上身份,贡献值为:pv的1:1
898
+                if($sprerdUser['user_group'] <= 1){
899
+                    $gongxian = roundOptimize($gongxian*0.3,2);
900
+                }
898
                 $tuigangongxian_data = [
901
                 $tuigangongxian_data = [
899
                     "uid"           =>$sprerdUser['uid'],
902
                     "uid"           =>$sprerdUser['uid'],
900
                     "number"  =>    $gongxian,
903
                     "number"  =>    $gongxian,
@@ -902,7 +905,7 @@ class UserThirdRepository extends BaseRepository
902
                     "status"        =>-1,
905
                     "status"        =>-1,
903
                     "order_type"    =>$type_shop,
906
                     "order_type"    =>$type_shop,
904
                     "order_id"      =>$order_sn,
907
                     "order_id"      =>$order_sn,
905
-                    "mark"          =>"推广消费从{$make}商品赠送贡献值",
908
+                    "mark"          =>"推广{$make}商品赠送贡献值",
906
                     "desc"          =>'',
909
                     "desc"          =>'',
907
                     "surplus"       => $sprerdUser['contribute'] + $gongxian,
910
                     "surplus"       => $sprerdUser['contribute'] + $gongxian,
908
                     "type"          =>1
911
                     "type"          =>1