$data['mobile']]); if (!empty($user_info)) { $user_id = $user_info['user_id']; $this->where(['user_id' => $user_id])->save(['user_type' => UserTypeEnum::STORE]); } else { $add = [ 'mobile' => $data['mobile'], 'nick_name' => hide_mobile($data['mobile']), 'platform' => 'MP-WEIXIN', 'last_login_time' => time(), 'store_id' => $storeId, 'user_type' => UserTypeEnum::STORE, ]; $user_id = $this->insertGetId($add); } } return $user_id; } }