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

用户新增优化

... ... @@ -102,7 +102,8 @@ class User extends Backend
}
$result = $this->model->allowField(true)->save($params);
if($study) {
$res['third_id'] = $params['third_id'];
$study['third_id'] = $this->model->id;
$res['third_id'] = $study['third_id'];
$res['study_id'] = $params['study_id'];
$res['createtime'] = time();
$res['playtime'] = 0;
... ... @@ -114,7 +115,6 @@ class User extends Backend
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
$params[$this->dataLimitField] = $this->auth->id;
}
$study['third_id'] = $this->model->id;
Db::name('third_study')->insertGetId($study);
}
Db::commit();
... ...