...
|
...
|
@@ -182,7 +182,7 @@ class SignController extends RestBaseController |
|
|
Db::name('user_sign')->where('id',$re['id'])->update(['status'=>1]);
|
|
|
Db::name('user')->where('id',$user['id'])->setInc('all_sign_day',1);
|
|
|
//判断是否为连续打卡
|
|
|
$last=Db::name('user_sign')->where(['user_id'=>$this->getUserId(),'status'=>1,'create_time'=>[ 'between time', [$yesterday,$beginToday]]])->find();
|
|
|
$last=Db::name('user_sign')->where(['user_id'=>$this->$user['id'],'status'=>1,'create_time'=>[ 'between time', [$yesterday,$beginToday]]])->find();
|
|
|
|
|
|
if ($user['stay_sign_day']==0||$last)
|
|
|
{
|
...
|
...
|
@@ -203,7 +203,7 @@ class SignController extends RestBaseController |
|
|
}
|
|
|
//记录打卡积分
|
|
|
Db::name('user')->where('id',$user['id'])->setInc('score',$score);
|
|
|
Db::name('user_score_log')->insert(['score'=>$score,'create_time'=>time(),'action'=>'打卡','user_id'=>$this->getUserId(),'now_score'=>$user['score']+$score]);
|
|
|
Db::name('user_score_log')->insert(['score'=>$score,'create_time'=>time(),'action'=>'打卡','user_id'=>$user['id'],'now_score'=>$user['score']+$score]);
|
|
|
|
|
|
//判断是否需要进行周打卡
|
|
|
if (Db::name('user_week_sign')->where(['user_id'=>$this->getUserId(),'create_time'=>[ '<', $beginToday-(7*24*60*60)]])->find()){
|
...
|
...
|
|