Merge pull request 'feat(UserLists.php): 修改会员等级判断逻辑' (#52) from rose into dev

Reviewed-on: #52
This commit is contained in:
mkm 2024-07-25 09:47:02 +08:00
commit 08a079ab15
2 changed files with 4 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface,ListsS
if($item['vip_name']== null){
$item['vip_name'] = '普通会员';
}
if($item['vip_name']!= null){
if($item['vip_time']!= null){
$item['vip_time'] = date('Y-m-d H:i:s', strtotime($item['vip_time']));
}
if($item['label_name']== null){

View File

@ -451,7 +451,9 @@ class PayNotifyLogic extends BaseLogic
//更新等级
$user->user_ship = $order['user_ship'];
if($user['vip_time']==null){
$user->vip_time = time();
}
$user->purchase_funds = bcadd($user->purchase_funds, $price, 2);
$user->total_recharge_amount = bcadd($user->total_recharge_amount, $price, 2);
$user->save();