删除phone_log表
This commit is contained in:
parent
133ca98958
commit
ee9b47ce40
|
@ -82,7 +82,7 @@ class TaskController
|
||||||
return ApiResponseApp::success([]);
|
return ApiResponseApp::success([]);
|
||||||
}
|
}
|
||||||
if ($GetLodeLog->status == 1) {
|
if ($GetLodeLog->status == 1) {
|
||||||
$GetLodeLog->status=2;
|
$GetLodeLog->status = 2;
|
||||||
$GetLodeLog->save();
|
$GetLodeLog->save();
|
||||||
return ApiResponseApp::success(['code' => $GetLodeLog->code]);
|
return ApiResponseApp::success(['code' => $GetLodeLog->code]);
|
||||||
}
|
}
|
||||||
|
@ -90,9 +90,9 @@ class TaskController
|
||||||
* 这里查询是否上号成功 2是等待上号
|
* 这里查询是否上号成功 2是等待上号
|
||||||
*/
|
*/
|
||||||
if ($GetLodeLog->status == 2) {
|
if ($GetLodeLog->status == 2) {
|
||||||
$ws_build_status=SendCode::get_ws_status($phone) == 0;
|
$ws_build_status = SendCode::get_ws_status($phone) == 0;
|
||||||
//上号成功
|
//上号成功
|
||||||
if (UserPhone::where('phone', $phone)->count() == 0&&$ws_build_status) {
|
if (UserPhone::where('phone', $phone)->count() == 0 && $ws_build_status) {
|
||||||
$UserPhone = new UserPhone();
|
$UserPhone = new UserPhone();
|
||||||
$UserPhone->phone = $phone;
|
$UserPhone->phone = $phone;
|
||||||
$UserPhone->user_id = $user_id;
|
$UserPhone->user_id = $user_id;
|
||||||
|
@ -101,9 +101,10 @@ class TaskController
|
||||||
$UserPhone->time = 0;
|
$UserPhone->time = 0;
|
||||||
$UserPhone->save();
|
$UserPhone->save();
|
||||||
$GetLodeLog->delete();
|
$GetLodeLog->delete();
|
||||||
}
|
|
||||||
//首次成功关联,赠送50积分
|
//首次成功关联,赠送50积分
|
||||||
$this->first_phone($phone,$user_id);
|
// $this->first_phone($phone, $user_id);
|
||||||
|
}
|
||||||
|
|
||||||
return ApiResponseApp::success([]);
|
return ApiResponseApp::success([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,10 +188,10 @@ class TaskController
|
||||||
/**
|
/**
|
||||||
* 首次上号送50积分
|
* 首次上号送50积分
|
||||||
*/
|
*/
|
||||||
public static function first_phone($phone,$user_id)
|
public static function first_phone($phone, $user_id)
|
||||||
{
|
{
|
||||||
//查找数据库中是否存在该手机号
|
//查找数据库中是否存在该手机号
|
||||||
$user_phone = PhoneLog::where('phone', $phone)->first();
|
$user_phone = UserPhone::where('phone', $phone)->first();
|
||||||
//如果不存在则送用户50积分
|
//如果不存在则送用户50积分
|
||||||
if (!$user_phone) {
|
if (!$user_phone) {
|
||||||
UserRewardDao::base($user_id, 4, 50, '首次关联此手机号送50积分');
|
UserRewardDao::base($user_id, 4, 50, '首次关联此手机号送50积分');
|
||||||
|
@ -213,7 +214,7 @@ class TaskController
|
||||||
//满足则加80积分
|
//满足则加80积分
|
||||||
UserRewardDao::base($user_id, 6, 80, '任务佣金');
|
UserRewardDao::base($user_id, 6, 80, '任务佣金');
|
||||||
//vip_id等级加1,并更新数据库
|
//vip_id等级加1,并更新数据库
|
||||||
$user->vip_id +=1;
|
$user->vip_id += 1;
|
||||||
$user->save();
|
$user->save();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace app\model;
|
|
||||||
|
|
||||||
use support\Model;
|
|
||||||
|
|
||||||
class PhoneLog extends Model
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The table associated with the model.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $table = 'phone_log';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The primary key associated with the table.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $primaryKey = 'id';
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue