兼容充值逻辑首次不支付

This commit is contained in:
liu 2024-07-06 16:53:59 +08:00
parent 53199c8aa6
commit 8312b5755a

View File

@ -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);