每日12点统计用户数据

This commit is contained in:
2025-12-31 03:19:22 +08:00
parent b3e52f9c3d
commit b68db7b6c5
4 changed files with 98 additions and 18 deletions

View File

@@ -109,20 +109,13 @@ class Tasks extends Model
//查询是否实名认证
$mobile = db::name('user')->where(['id' => $user_id,'status'=>1])->value('mobile');
$is_real = db::name('user_auth')->where('mobile' , $mobile)->field('real_name,card_id,is_real,mobile')->find();
if(empty($is_real)){
return ['code' => 0, 'msg' => '请先实名认证','data' => null];
}else{
if($is_real['is_real'] !=1){
return ['code' => 0, 'msg' => '请先实名认证','data' => null];
if($is_real && $is_real['is_real'] ==1){
//查询同一个身份证下的 用户
$user_auth_mobile = db::name('user_auth')->where(['card_id'=>$is_real['card_id']])->column('mobile');
if(count($user_auth_mobile)>1){
$user_ids = db::name('user')->whereIn('mobile',$user_auth_mobile)->column('id');
}else{
//查询同一个身份证下的 用户
$user_auth_mobile = db::name('user_auth')->where(['card_id'=>$is_real['card_id']])->column('mobile');
if(count($user_auth_mobile)>1){
$user_ids = db::name('user')->whereIn('mobile',$user_auth_mobile)->column('id');
}else{
$user_ids = db::name('user')->where('mobile',$is_real['mobile'])->column('id');
}
$user_ids = db::name('user')->where('mobile',$is_real['mobile'])->column('id');
}
}
@@ -350,7 +343,7 @@ class Tasks extends Model
//判断用户是否实名认证,并查询用户手机号下的用户
$mobile = db::name('user')->where(['id' => $user_id,'status'=>1])->value('mobile');
$is_real = db::name('user_auth')->where('mobile' , $mobile)->field('real_name,card_id,is_real,mobile')->find();
if($is_real['is_real'] ==1){
if($is_real && $is_real['is_real'] ==1){
//查询同一个身份证下的 用户
$user_auth_mobile = db::name('user_auth')->where(['card_id'=>$is_real['card_id']])->column('mobile');
if(count($user_auth_mobile)>1){