|
@@ -198,7 +198,7 @@ class Template extends Base
|
|
|
$info['impression'] = $param['impression'];
|
|
|
$info['description'] = $param['description'];
|
|
|
}else{
|
|
|
- $t = DB::table('templates')->where('title',$param['label'])->where('is_public',2)->where('parent_id',0)->find();
|
|
|
+ $t = DB::table('templates')->where('title',$param['label'])->where('exam_class_id',$param['exam_class_id'])->where('is_public',2)->where('parent_id',0)->find();
|
|
|
if($t){
|
|
|
return json_encode(['status'=>'fail','code'=>'1013','msg'=>'已存在相同的模板标题,请重新填写']);
|
|
|
}
|