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

个人中心接口

@@ -194,7 +194,7 @@ class SignController extends RestBaseController @@ -194,7 +194,7 @@ class SignController extends RestBaseController
194 Db::name('user_score_log')->insert(['score'=>$score,'create_time'=>time(),'action'=>'打卡','user_id'=>$this->getUserId(),'now_score'=>$user['score']+$score]); 194 Db::name('user_score_log')->insert(['score'=>$score,'create_time'=>time(),'action'=>'打卡','user_id'=>$this->getUserId(),'now_score'=>$user['score']+$score]);
195 195
196 //判断是否需要进行周打卡 196 //判断是否需要进行周打卡
197 - if (Db::name('user_week_sign')->where(['user_id'=>$this->getUserId(),'create_time'=>[ '<', $beginToday-($score['week_sign']*24*60*60)]])->find()){ 197 + if (Db::name('user_week_sign')->where(['user_id'=>$this->getUserId(),'create_time'=>[ '<', $beginToday-(7*24*60*60)]])->find()){
198 $is_week=1; 198 $is_week=1;
199 }else{ 199 }else{
200 $is_week=0; 200 $is_week=0;
@@ -2418,7 +2418,7 @@ class Query @@ -2418,7 +2418,7 @@ class Query
2418 * @throws ModelNotFoundException 2418 * @throws ModelNotFoundException
2419 * @throws DataNotFoundException 2419 * @throws DataNotFoundException
2420 */ 2420 */
2421 - public function find($data = null) 2421 + public function find($data = null)
2422 { 2422 {
2423 if ($data instanceof Query) { 2423 if ($data instanceof Query) {
2424 return $data->find(); 2424 return $data->find();