From 8c00bd0245ca4756ca04483a4980ad202714e43e Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期四, 20 七月 2023 09:40:44 +0800
Subject: [PATCH] Merge branch 'release/v1.1.4发布'

---
 application/api/logic/taoke/Parser.php |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/application/api/logic/taoke/Parser.php b/application/api/logic/taoke/Parser.php
index aefa49f..a1d519f 100644
--- a/application/api/logic/taoke/Parser.php
+++ b/application/api/logic/taoke/Parser.php
@@ -7,7 +7,7 @@
 use app\api\logic\UserCollect;
 use app\api\logic\User as LogicUser;
 use app\common\model\UserLevel as ModelUserLevel;
-
+use \app\common\model\UserExtend as ModelUserExtend;
 class Parser extends BasicLogic
 {
     //TODO 妫�鏌ユ墍鏈夋帴鍙f槸涓嶆槸鏈夎皟鏁寸殑锛岄渶瑕佷紶浠g悊鐨勭浉搴斿瓧娈�
@@ -26,6 +26,10 @@
 
     protected static $topLevelName = ""; //椤剁骇绛夌骇鍚嶇О
 
+    protected static $buyCount=-1;//璐拱娆℃暟
+
+    protected static $returnLimit=1;//浣i噾鍏ㄨ繑鐨勮喘涔版鏁伴檺鍒�
+
 
     public function __construct(){
         $level = 1;
@@ -42,6 +46,17 @@
         self::$userRate = $leveInfo['own_commission_rate'] * 0.01;
         $topLevelInfo = $ModelUserLevel->where(['level'=>3])->find();
         if(empty($topLevelInfo)) fault('浠g悊閰嶇疆澶辫触');
+        //鑾峰彇璐拱娆℃暟
+       /*  $ModelUserExtend=new ModelUserExtend();
+        $userBuy= $ModelUserExtend->where(['id'=>USERID])->find();
+        if(!empty($userBuy))
+        {
+            self::$buyCount=$userBuy['tradecount'];
+        }
+        if(self::$buyCount>=0&&self::$buyCount<self::$returnLimit)
+        {//绗﹀悎鍏ㄨ繑瑙勫垯
+            self::$userRate =1;
+        } */
         self::$topFanliRate = $topLevelInfo['own_commission_rate'] * 0.01;
         self::$topLevelName = $topLevelInfo['level_name'];
     }
@@ -80,6 +95,7 @@
             'url_type' => "3",          //鍟嗗搧璇︽儏,
             'isCollect' => 0,            //鏄惁鏀惰棌
             'topLevelName' => self::$topLevelName,  //椤剁骇绛夌骇鍚嶇О
+            'predictPromotionRate'=>0,//姣斾环琛屼负棰勫垽瀹氫剑閲戯紝闇�瑕佺敤鎴峰妗�-鎷煎澶氫笓鐢�
         ];
     }
 
@@ -183,8 +199,8 @@
     /**
      * 璁$畻鍟嗗搧灞曠ず杩斿埄閲戦
      *
-     * @param [type] $price
-     * @param [type] $commissionRate
+     * @param [type] $price 鍒稿悗浠�
+     * @param [type] $commissionRate 鍒嗕剑姣斾緥
      * @return void
      */
     public static function rebate($price,$commissionRate,$otherRate = "")

--
Gitblit v1.9.3