xialei 1 рік тому
батько
коміт
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 885
                     "status"        =>  -1,
886 886
                     "order_type"    =>  $type_shop,
887 887
                     "order_id"      =>  $order_sn,
888
-                    "mark"          =>  "推广消费从{$make}购买商品赠送积分",
888
+                    "mark"          =>  "推广{$make}商品赠送积分",
889 889
                     "surplus"       =>  $sprerdUser['score'] + $tuiguanyongjin,
890 890
                     "pm"            =>  1,
891 891
                     "source_type"   =>  4
@@ -894,7 +894,10 @@ class UserThirdRepository extends BaseRepository
894 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 901
                 $tuigangongxian_data = [
899 902
                     "uid"           =>$sprerdUser['uid'],
900 903
                     "number"  =>    $gongxian,
@@ -902,7 +905,7 @@ class UserThirdRepository extends BaseRepository
902 905
                     "status"        =>-1,
903 906
                     "order_type"    =>$type_shop,
904 907
                     "order_id"      =>$order_sn,
905
-                    "mark"          =>"推广消费从{$make}商品赠送贡献值",
908
+                    "mark"          =>"推广{$make}商品赠送贡献值",
906 909
                     "desc"          =>'',
907 910
                     "surplus"       => $sprerdUser['contribute'] + $gongxian,
908 911
                     "type"          =>1