ソースを参照

话费四舍五入去除

xialei 1 年間 前
コミット
24884866a6
共有2 個のファイルを変更した4 個の追加4 個の削除を含む
  1. 2 2
      app/common/repositories/store/order/StoreOrderRepository.php
  2. 2 2
      app/common/repositories/user/UserThirdRepository.php

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

@@ -3812,8 +3812,8 @@ class StoreOrderRepository extends BaseRepository
3812 3812
             $yongjin = $pvfee * $yongjinbili / 100;
3813 3813
 
3814 3814
             // 佣金百分之90进入佣金池  佣金百分之10进入复购金
3815
-            $tuiguanyongjin = round($yongjin * 0.9, 2);
3816
-            $tuiguanfugou = round($yongjin * 0.1, 2);
3815
+            $tuiguanyongjin = roundOptimize($yongjin * 0.9, 2);
3816
+            $tuiguanfugou = roundOptimize($yongjin * 0.1, 2);
3817 3817
 
3818 3818
             //end会费
3819 3819
             //sat存养老金

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

@@ -847,7 +847,7 @@ class UserThirdRepository extends BaseRepository
847 847
             //判断是否是老用户  is_old=1是1.0的用户,1.0的用户要总pv*45%的红包
848 848
             if($user["is_old"]==1){
849 849
                 //添加红包
850
-                $hongbao=round($inc_score*0.45,2);
850
+                $hongbao=roundOptimize($inc_score*0.45,2);
851 851
                 $hongbao_data = [
852 852
                     "uid"           =>$user_id,
853 853
                     "number"  =>    $hongbao,
@@ -875,7 +875,7 @@ class UserThirdRepository extends BaseRepository
875 875
         
876 876
                 // @todo 用户身份比例
877 877
                 $yongjinbili = StoreOrderRepository::getUserGroupRate($sprerdUser['user_group']);
878
-                $tuiguanyongjin=round($yongjinbili*$inc_score,2);//按照身份获得佣金
878
+                $tuiguanyongjin=roundOptimize($yongjinbili*$inc_score,2);//按照身份获得佣金
879 879
 
880 880
                 //添加推广积分
881 881
                 $tuijifendata = [