From 87940848162256b5adaa125408b297dba3e8691b Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期三, 12 七月 2023 10:48:02 +0800 Subject: [PATCH] no message --- application/api/logic/taoke/Parser.php | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/application/api/logic/taoke/Parser.php b/application/api/logic/taoke/Parser.php index 18dcdbe..2e90422 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,//姣斾环琛屼负棰勫垽瀹氫剑閲戯紝闇�瑕佺敤鎴峰妗�-鎷煎澶氫笓鐢� ]; } @@ -92,7 +108,9 @@ return [ 'dtitle' => '', //鍟嗗搧title 'goodsSign' => '', - 'goodsid' => '', + 'goods_sign'=>'', + 'goodsid' => '', + 'goodsId'=>'', 'huodongType' => '', 'id' => '', 'jiage' => '', @@ -181,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