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

修改志愿者列表

... ... @@ -1202,6 +1202,7 @@ class SecondController extends RestBaseController
*/
public function endClock(){
$data=input();
$user_id=$this->getUserId();
$activityModel=new ClockModel();
$activity=$activityModel->where('id',$data['id'])->find();
... ... @@ -1225,7 +1226,10 @@ class SecondController extends RestBaseController
$update['user_end']=time();
$result=db('clock')->where('id',$data['id'])->update(['user_end'=>$now,'status'=>'2']);
if ($result==1){
/**/
/*添加对应工时*/
$info=db('clock')->where('id',$data['id'])->find();
$user=new VolunteerModel();
$user->where('user_id',$user_id)->setInc('work_time',$info['work_time']);
}
$this->success('打卡成功!');
}
... ...