123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /**
- * ${CARET}
- * @file:HuaWeiController.php
- * @Created by gnitif
- * @Date: 2023/2/6
- * @Time: 15:40
- */
- namespace App\Http\Controllers\QuickApp;
- use App\Http\Controllers\Controller;
- use App\Modules\Subscribe\Services\ChapterOrderService;
- use App\Modules\User\Services\ReadRecordService;
- use Illuminate\Support\Facades\DB;
- class HuaWeiController extends Controller
- {
- public function index(){
- set_time_limit(0);
- //
- // die();
- $sql = "SELECT id,send_order_id,balance,created_at FROM users WHERE send_order_id in (4007118,4007706,4007708,4007731,4007733,4007793,4007834,4007843,4009806,4012429,4016127,4023097) and LENGTH(openid) > 32 AND created_at > '2023-02-2' and balance > 0 and balance < 100;";
- // $sql = "SELECT id,send_order_id,balance,created_at FROM users WHERE 1 limit 10";
- $uids = DB::select($sql);
- if(!is_empty($uids)){
- foreach ($uids as $v){
- $res = ReadRecordService::getReadRecord($v->id);
- if (is_empty($res)){
- $res = array_column($res,null,'bid');
- $res = $res[66643] ?? [];
- }
- if (!is_empty($res)){
- if (isset($res['cid']) && $v->id > 0 && in_array($res['cid'],[30300728,30300727,30300726,30300725,30300724,30300723] )){
- ReadRecordService::delReadRecordStatic($v->id, [66643]);
- }
- }
- // $res = ReadRecordService::getReadRecord(1234598187);
- echo "<pre><hr> uid => ".$v->id."\t 书币:{$v->balance} \t 注册时间:{$v->created_at} \t 阅读书籍本数:".count($res)."<br> ";
- // var_export($res);
- }
- }
- }
- }
|