29 lines
653 B
PHP
29 lines
653 B
PHP
<?php
|
|
|
|
namespace app\model;
|
|
|
|
use support\Log;
|
|
use support\think\Db;
|
|
|
|
// 更新用户可推送次数
|
|
|
|
class SaveUserPushNumber
|
|
{
|
|
public static function savePushNumber()
|
|
{
|
|
$user_event_push_num_list = Db::name('tb_user_push_event_num')->select()->toArray();
|
|
if($user_event_push_num_list) {
|
|
foreach ($user_event_push_num_list as $k => $user_event_push_num) {
|
|
Db::name('tb_user_push_event_num')->where(['user_id' => $user_event_push_num['user_id']])->update([
|
|
'num' => 4,
|
|
'update_time' => date('Y-m-d H:i:s'),
|
|
]);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |