作者 潘浩文
1 个管道 的构建 通过 耗费 0 秒

接口

... ... @@ -50,7 +50,7 @@ class SignController extends RestBaseController
$user_sign=Db::name('user_sign')->where(['user_id'=>$user_id,'create_time'=>[ 'between time', [$beginToday,$endToday]]])->find();
if ($time>$data['morning_sign_time']&&$time<$data['morning_sign_end_time']){
if ($user_sign['morning']!=null) {
$data['sign'] = 0;
$data['sign'] = -1;
}else{
$data['sign'] = 1;
}
... ... @@ -58,7 +58,7 @@ class SignController extends RestBaseController
$data['end_time']=$data['morning_sign_end_time'];
}else if ($time>$data['noon_sign_time']&&$time<$data['noon_sign_end_time']){
if ($user_sign['noon']!=null) {
$data['sign'] = 0;
$data['sign'] = -1;
}else{
$data['sign'] = 2;
}
... ... @@ -66,7 +66,7 @@ class SignController extends RestBaseController
$data['end_time']=$data['noon_sign_end_time'];
}else if ($time>$data['night_sign_time']&&$time<$data['night_sign_end_time']){
if ($user_sign['night']!=null) {
$data['sign'] = 0;
$data['sign'] = -1;
}else{
$data['sign'] = 3;
}
... ... @@ -74,7 +74,7 @@ class SignController extends RestBaseController
$data['end_time']=$data['night_sign_end_time'];
}else if ($time>$data['sleep_sign_time']&&$time<$data['sleep_sign_end_time']){
if ($user_sign['sleep']!=null) {
$data['sign'] = 0;
$data['sign'] = -1;
}else{
$data['sign'] = 4;
}
... ... @@ -94,6 +94,7 @@ class SignController extends RestBaseController
$data['start_time']=$data['sleep_sign_time'];
$data['end_time']=$data['sleep_sign_end_time'];
}
$data['sign']=0;
}
... ...