作者 sgj
1 个管道 的构建 通过 耗费 7 秒

修改级别bug

... ... @@ -364,8 +364,12 @@ class ActivityController extends AdminBaseController
$user_id=$join['user_id'];
$all_map['user_id']=$user_id;
$all_result=\db('join')->where($all_map)->sum('work_time');
$level_map['min']=['<=',$all_result];
$level_map['max']=['>',$all_result];
$level=db('level')->where($level_map)->value('level');
//dump($all_result);
\db('volunteer')->where('user_id',$user_id)->update(['work_time'=>$all_result]);
//var_dump($level);
\db('volunteer')->where('user_id',$user_id)->update(['work_time'=>$all_result,'level'=>$level]);
if ($result>0){
$this->success('编辑成功!');
... ...