...
|
...
|
@@ -194,7 +194,9 @@ class ThirdStudy extends Backend |
|
|
$classes_ids = Db::name('classes')->where('study_id', $res['study_id'])->where('is_major', 1)->column('id');
|
|
|
foreach ($classes_ids as $v) {
|
|
|
$res['class_id'] = $v;
|
|
|
Db::name('study_class')->insertGetId($res);
|
|
|
if(!Db::name('study_class')->where('third_id',$params['third_id'])->where('class_id',$v)->find()){
|
|
|
Db::name('study_class')->insertGetId($res);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
$result = $this->model->allowField(true)->saveAll($paramsAll);
|
...
|
...
|
|