redis->executeCommand('GET', [$cacheKey]); if (!empty($has)) { Yii::info("支付回调短时间内出现重复通知,流水类型:{$capitalType} orderSn:{$orderSn}"); return false; } Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 4, 'has']); //流水类型列表 switch ($capitalType) { case dict::getDict('capitalType', 'xhRecharge', 'id'): //商家充值 $currentRecharge = RechargeClass::thirdPay($payWay, $orderSn, $totalFee, $attach); //有发红包的通知供货商 WxMessageClass::customRechargeInformGhs($currentRecharge); $customName = $currentRecharge->customName ?? ''; $rechargeAmount = $currentRecharge->amount ?? 0; $rechargeAmount = floatval($rechargeAmount); noticeUtil::push("客户 {$customName} 充值{$rechargeAmount}元", '15280215347'); break; case dict::getDict('capitalType', 'xhPurchase', 'id'): //零售采购 PurchaseService::thirdPay($payWay, $orderSn, $totalFee, $attach, $transactionId); break; case dict::getDict('capitalType', 'hdPurchaseClear', 'id'): //零售结帐 PurchaseClearClass::thirdPay($payWay, $orderSn, $totalFee, $attach,$transactionId); break; case dict::getDict('capitalType', 'xhOrder', 'id'): //散客下单 OrderClass::thirdPay($payWay, $orderSn, $totalFee, $attach, $transactionId); break; case dict::getDict('capitalType', 'xhRenew', 'id'): //商家续期 RenewClass::thirdPay($payWay, $orderSn, $totalFee, $attach); break; case dict::getDict('capitalType', 'pxApply', 'id'): //培训报名 PxApplyService::thirdPay($payWay, $orderSn, $totalFee, $attach); break; default: } } }