作者 sgj
1 个管道 的构建 失败 耗费 0 秒

打卡状态编辑

@@ -49,6 +49,12 @@ class VolunteerModel extends Model @@ -49,6 +49,12 @@ class VolunteerModel extends Model
49 /*添加团队工时*/ 49 /*添加团队工时*/
50 } 50 }
51 51
  52 + public function addStudyTime($userId,$time){
  53 + $map['user_id']=$userId;
  54 + $this->where($map)->setInc('study_time',$time);
  55 + /*添加团队工时*/
  56 + }
  57 +
52 /** 58 /**
53 * 获取用户详情 59 * 获取用户详情
54 * @param $userId 60 * @param $userId
@@ -365,6 +365,7 @@ class SecondController extends RestBaseController @@ -365,6 +365,7 @@ class SecondController extends RestBaseController
365 $volunteer=new VolunteerModel(); 365 $volunteer=new VolunteerModel();
366 $volunteer->where('user_id',$user_id)->setInc('work_time',$class['work_time']); 366 $volunteer->where('user_id',$user_id)->setInc('work_time',$class['work_time']);
367 $volunteer->addWorkTime($user_id,$class['work_time']); 367 $volunteer->addWorkTime($user_id,$class['work_time']);
  368 + $volunteer->addStudyTime($user_id,$class['work_time']);
368 /*添加到完成*/ 369 /*添加到完成*/
369 $UserPassModel=new UserPassModel(); 370 $UserPassModel=new UserPassModel();
370 $UserPassModel->pass($user_id,$class_id); 371 $UserPassModel->pass($user_id,$class_id);