From edfb2ff3d67fa488c6133afde75e5d1c52039ed5 Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Mon, 1 Apr 2024 09:10:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=86=E4=BA=AB=E5=8F=82=E6=95=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/shopro/controller/third/Wechat.php | 3 +++ addons/shopro/listener/Commission.php | 1 + 2 files changed, 4 insertions(+) diff --git a/addons/shopro/controller/third/Wechat.php b/addons/shopro/controller/third/Wechat.php index 387ef7a..dbef0bc 100755 --- a/addons/shopro/controller/third/Wechat.php +++ b/addons/shopro/controller/third/Wechat.php @@ -36,6 +36,9 @@ class Wechat extends Common // 微信登陆(小程序+公众号+开放平台) public function login() { + $shareInfo = $this->request->param('shareInfo'); + $shareInfo = htmlspecialchars_decode($shareInfo); + \think\Log::info('分享参数:'.$shareInfo); $result = Db::transaction(function () { return $this->wechat->login(); }); diff --git a/addons/shopro/listener/Commission.php b/addons/shopro/listener/Commission.php index 5dbcb59..f8ffe65 100755 --- a/addons/shopro/listener/Commission.php +++ b/addons/shopro/listener/Commission.php @@ -21,6 +21,7 @@ class Commission { // $shareInfo = request()->param('shareInfo/a'); $shareInfo = request()->param('shareInfo'); + $shareInfo = json_decode(htmlspecialchars_decode($shareInfo), true); \think\Log::info('分享参数:'.$shareInfo['shareId']); if ($shareInfo) { From 545e1b337110280d92998ca7eb2614deeb17b00d Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Mon, 1 Apr 2024 17:45:44 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BF=94=E4=BD=A3=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/shopro/service/CommissionScoreLog.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/shopro/service/CommissionScoreLog.php b/addons/shopro/service/CommissionScoreLog.php index 4bdebb5..a1f9dd0 100644 --- a/addons/shopro/service/CommissionScoreLog.php +++ b/addons/shopro/service/CommissionScoreLog.php @@ -103,7 +103,7 @@ class CommissionScoreLog return true; } - //1.非用户角色下单立即反积分 并且给公司账户返积分 + //1.非用户角色下单立即反积分 if ($initLevel > self::LEVEL_1 && $currentCommissionLevel == 1) { $amount = bcsub($order['goods_price'], $current_level_price, 2); //算积分 @@ -144,8 +144,9 @@ class CommissionScoreLog //4.向上反佣金 if ($parentLevel > $currentLevel) { $amount = bcsub($current_level_price, $parent_level_price, 2); - //如果当前当前用户等级是会员 按原价算 - if($currentLevel == self::LEVEL_2) { + //如果当前当前用户等级是上级是会员 按原价算 +// if($currentLevel == self::LEVEL_2) { + if($initLevel == self::LEVEL_1 && $sonLevel == self::LEVEL_2) { $amount = bcsub($order['goods_price'], $parent_level_price, 2); } \think\Log::info('上级商品价格'.$parent_level_price); From f0918bcb3d43af1218f08b6ea4ad99421175c21b Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Mon, 1 Apr 2024 17:49:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=BF=94=E4=BD=A3=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/shopro/service/CommissionScoreLog.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/shopro/service/CommissionScoreLog.php b/addons/shopro/service/CommissionScoreLog.php index a1f9dd0..ebeee32 100644 --- a/addons/shopro/service/CommissionScoreLog.php +++ b/addons/shopro/service/CommissionScoreLog.php @@ -144,7 +144,7 @@ class CommissionScoreLog //4.向上反佣金 if ($parentLevel > $currentLevel) { $amount = bcsub($current_level_price, $parent_level_price, 2); - //如果当前当前用户等级是上级是会员 按原价算 + //5.如果初始用户等级普通用户 上级是会员 会员上级按原价算 // if($currentLevel == self::LEVEL_2) { if($initLevel == self::LEVEL_1 && $sonLevel == self::LEVEL_2) { $amount = bcsub($order['goods_price'], $parent_level_price, 2); @@ -159,7 +159,7 @@ class CommissionScoreLog } } - //5.用户的上上级是高级 算团队2% 并给公司账户加钱 + //6.用户的上上级是高级 算团队2% 并给公司账户加钱 if ($parentLevel == self::LEVEL_5 && $currentLevel == self::LEVEL_5 && $level5<2) { if ($level5 == 0) { @@ -182,7 +182,7 @@ class CommissionScoreLog } } else { - //6.只有最后一级是高级时反公司积分 + //7.只有最后一级是高级时反公司积分 if ($currentLevel == self::LEVEL_5 && $sonLevel != self::LEVEL_5 && $currentCommissionLevel > 1) { $this->calcCompany($current_level_price, $company_level_price); }