hefei пре 1 година
родитељ
комит
a2e96765da

+ 2 - 2
app/common.php

@@ -900,13 +900,13 @@ if (!function_exists("is_json")){
900
 
900
 
901
 
901
 
902
 
902
 
903
-if (!function_exists("roundOptimize")){
903
+if (!function_exists("round_optimize")){
904
     /**
904
     /**
905
      * round公用四舍五入去除
905
      * round公用四舍五入去除
906
      * @param $number
906
      * @param $number
907
      * @return string
907
      * @return string
908
      */
908
      */
909
-    function roundOptimize($amount, $decimals = 2): string
909
+    function round_optimize($amount, $decimals = 2): string
910
     {
910
     {
911
         if ($amount > 0) {
911
         if ($amount > 0) {
912
             $factor = pow(10, $decimals);
912
             $factor = pow(10, $decimals);

+ 1 - 1
app/common/repositories/store/order/StoreOrderRepository.php

@@ -3827,7 +3827,7 @@ class StoreOrderRepository extends BaseRepository
3827
             $yongjin = $pvfee * $yongjinbili / 100;
3827
             $yongjin = $pvfee * $yongjinbili / 100;
3828
 
3828
 
3829
             // 佣金百分之90进入佣金池  佣金百分之10进入复购金
3829
             // 佣金百分之90进入佣金池  佣金百分之10进入复购金
3830
-            $tuiguanyongjin = roundOptimize($yongjin * 0.9, 2);
3830
+            $tuiguanyongjin = round_optimize($yongjin * 0.9, 2);
3831
             $tuiguanfugou = $yongjin;//复购金赠送函数里面有计算百分之10
3831
             $tuiguanfugou = $yongjin;//复购金赠送函数里面有计算百分之10
3832
 
3832
 
3833
             //end会费
3833
             //end会费

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

@@ -847,7 +847,7 @@ class UserThirdRepository extends BaseRepository
847
             //判断是否是老用户  is_old=1是1.0的用户,1.0的用户要总pv*45%的红包
847
             //判断是否是老用户  is_old=1是1.0的用户,1.0的用户要总pv*45%的红包
848
             if($user["is_old"]==1){
848
             if($user["is_old"]==1){
849
                 //添加红包
849
                 //添加红包
850
-                $hongbao=roundOptimize($inc_score*0.45,2);
850
+                $hongbao=round_optimize($inc_score*0.45,2);
851
                 $hongbao_data = [
851
                 $hongbao_data = [
852
                     "uid"           =>$user_id,
852
                     "uid"           =>$user_id,
853
                     "number"  =>    $hongbao,
853
                     "number"  =>    $hongbao,
@@ -875,7 +875,7 @@ class UserThirdRepository extends BaseRepository
875
         
875
         
876
                 // @todo 用户身份比例
876
                 // @todo 用户身份比例
877
                 $yongjinbili = StoreOrderRepository::getUserGroupRate($sprerdUser['user_group']);
877
                 $yongjinbili = StoreOrderRepository::getUserGroupRate($sprerdUser['user_group']);
878
-                $tuiguanyongjin=roundOptimize($yongjinbili*$inc_score,2);//按照身份获得佣金
878
+                $tuiguanyongjin=round_optimize($yongjinbili*$inc_score,2);//按照身份获得佣金
879
 
879
 
880
                 //添加推广积分
880
                 //添加推广积分
881
                 $tuijifendata = [
881
                 $tuijifendata = [
@@ -896,7 +896,7 @@ class UserThirdRepository extends BaseRepository
896
 
896
 
897
                 //添加推荐献值 普通用户 贡献值为 pv* 30%;推广人是业务员及以上身份,贡献值为:pv的1:1
897
                 //添加推荐献值 普通用户 贡献值为 pv* 30%;推广人是业务员及以上身份,贡献值为:pv的1:1
898
                 if($sprerdUser['user_group'] <= 1){
898
                 if($sprerdUser['user_group'] <= 1){
899
-                    $gongxian = roundOptimize($gongxian*0.3,2);
899
+                    $gongxian = round_optimize($gongxian*0.3,2);
900
                 }
900
                 }
901
                 $tuigangongxian_data = [
901
                 $tuigangongxian_data = [
902
                     "uid"           =>$sprerdUser['uid'],
902
                     "uid"           =>$sprerdUser['uid'],