基础扩展
This commit is contained in:
29
app/model/SaveUserPushNumber.php
Normal file
29
app/model/SaveUserPushNumber.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user