From 8312b5755af42a2592e7315cf75d3fdffaa63d81 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 6 Jul 2024 16:53:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E9=A6=96=E6=AC=A1=E4=B8=8D=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/UserSignLogic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/logic/UserSignLogic.php b/app/common/logic/UserSignLogic.php index 7f77e4f4..0ee943a7 100644 --- a/app/common/logic/UserSignLogic.php +++ b/app/common/logic/UserSignLogic.php @@ -3,11 +3,13 @@ namespace app\common\logic; +use app\common\enum\YesNoEnum; use app\common\logic\BaseLogic; use app\common\model\user\User; use app\common\model\user_recharge\UserRecharge; use app\common\model\user_sign\UserSign; use app\common\model\user_sign_log\UserSignLog; +use function Symfony\Component\String\s; /** * 会员积分逻辑 @@ -42,7 +44,7 @@ class UserSignLogic extends BaseLogic if($total_vip==0){ return false; } - $count = UserRecharge::where('uid', $order->uid)->count(); + $count = UserRecharge::where(['uid'=>$order->uid,'paid'=>YesNoEnum::YES])->count(); if ($count ==1 && in_array($user_ship, [1, 2, 3, 5, 6, 7, 8])) { //首充 $write = self::write($order, $total_vip, 0, 1, 9); From b66e01c58548c97c05c88c2bd59eb66c8d4e2e7b Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 6 Jul 2024 17:26:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/store/StoreController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/api/controller/store/StoreController.php b/app/api/controller/store/StoreController.php index a543ebb9..db168b07 100644 --- a/app/api/controller/store/StoreController.php +++ b/app/api/controller/store/StoreController.php @@ -137,6 +137,7 @@ class StoreController extends BaseApiController return $this->fail(PaymentLogic::getError()); } if (isset($result['trade_state_desc']) && $result['trade_state_desc'] == '支付成功') { + Redis::connection()->set('trade_state',json_encode($result)); PayNotifyLogic::handle('recharge', $result['out_trade_no'], $result); } else { Redis::send('send-code-pay', ['order_id' => $order['order_id'],'pay_type'=>'recharge']); From c49e91001ca54b1803f4bbffa242d052c917341d Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 6 Jul 2024 17:28:58 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=9B=9E=E8=B0=83=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/PayController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/api/controller/PayController.php b/app/api/controller/PayController.php index 2a0ea7cf..1aa380e9 100644 --- a/app/api/controller/PayController.php +++ b/app/api/controller/PayController.php @@ -34,6 +34,7 @@ class PayController extends BaseApiController $attach = $ciphertext['attach']; switch ($attach) { case 'recharge': + Cache::set('6logR' . time(), json_encode($ciphertext)); PayNotifyLogic::handle('recharge', $ciphertext['out_trade_no'], $ciphertext); $app->wechat->success(); break; From 9cc0ce8971419b050a689fe87657e878000c0c98 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 6 Jul 2024 17:31:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/store/StoreController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/store/StoreController.php b/app/api/controller/store/StoreController.php index db168b07..4401a508 100644 --- a/app/api/controller/store/StoreController.php +++ b/app/api/controller/store/StoreController.php @@ -137,7 +137,7 @@ class StoreController extends BaseApiController return $this->fail(PaymentLogic::getError()); } if (isset($result['trade_state_desc']) && $result['trade_state_desc'] == '支付成功') { - Redis::connection()->set('trade_state',json_encode($result)); + Cache::set('trade_state' . time(), json_encode($result)); PayNotifyLogic::handle('recharge', $result['out_trade_no'], $result); } else { Redis::send('send-code-pay', ['order_id' => $order['order_id'],'pay_type'=>'recharge']);