diff --git a/app/Update/controller/Admin.php b/app/Update/controller/Admin.php index 6b6abb4a..6f9c4310 100644 --- a/app/Update/controller/Admin.php +++ b/app/Update/controller/Admin.php @@ -237,7 +237,7 @@ class Admin unset($oldList['update_time']); unset($oldList['create_time']); unset($oldList['delete_time']); - $oldList['category'] === 1 ? $oldList['category_id'] = 11901 + $oldList['category'] == 1 ? $oldList['category_id'] = 11901 : $oldList['category_id'] = 11902; $oldList['rongyu_id'] = $oldList['rongyuid']; $oldList['teacher_id'] = $oldList['teacherid']; @@ -393,7 +393,7 @@ class Admin unset($oldList['delete_time']); $oldList['ketiinfo_id'] = $oldList['ketiinfoid']; $oldList['teacher_id'] = $oldList['teacherid']; - $oldList['category'] === 1 ? $oldList['category_id'] = 11901 + $oldList['category'] == 1 ? $oldList['category_id'] = 11901 : $oldList['category_id'] = 11902; $newList[] = $oldList; } diff --git a/app/keti/controller/KetiInfo.php b/app/keti/controller/KetiInfo.php index 095bebc8..bd8ee9fb 100644 --- a/app/keti/controller/KetiInfo.php +++ b/app/keti/controller/KetiInfo.php @@ -151,7 +151,7 @@ class KetiInfo extends BaseController foreach ($list['hjteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 1 + ,'category_id' => 11901 ]; } @@ -296,7 +296,7 @@ class KetiInfo extends BaseController foreach ($list['hjteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 1 + ,'category_id' => 11901 ]; } $data = $data->ktZcr()->saveAll($canyulist); # 添加新课题主持人 @@ -412,7 +412,7 @@ class KetiInfo extends BaseController foreach ($list['cyteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 2 + ,'category_id' => 11902 ]; } diff --git a/app/rongyu/controller/JsRongyuInfo.php b/app/rongyu/controller/JsRongyuInfo.php index 4f17b0af..b4ab7a96 100644 --- a/app/rongyu/controller/JsRongyuInfo.php +++ b/app/rongyu/controller/JsRongyuInfo.php @@ -162,7 +162,7 @@ class JsRongyuInfo extends BaseController foreach ($list['hjteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 1 + ,'category_id' => 11901 ]; } if(!empty($list['cyteachers'])){ @@ -170,7 +170,7 @@ class JsRongyuInfo extends BaseController foreach ($list['cyteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 2 + ,'category_id' => 11902 ]; } } @@ -349,7 +349,7 @@ class JsRongyuInfo extends BaseController foreach ($list['hjteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 1 + ,'category_id' => 11901 ]; } if(!empty($list['cyteachers'])){ @@ -357,7 +357,7 @@ class JsRongyuInfo extends BaseController foreach ($list['cyteachers'] as $key => $value) { $canyulist[] = [ 'teacher_id' => $value - ,'category_id' => 2 + ,'category_id' => 11902 ]; } } diff --git a/database/migrations/20190214052203_js_rongyu_canyu.php b/database/migrations/20190214052203_js_rongyu_canyu.php index c2da76f6..9c5dc02d 100644 --- a/database/migrations/20190214052203_js_rongyu_canyu.php +++ b/database/migrations/20190214052203_js_rongyu_canyu.php @@ -33,7 +33,7 @@ class JsRongyuCanyu extends Migrator // 添加当前表字段 $table - ->addColumn('category_id','integer',['limit'=>1,'null'=>false,'default'=>0,'comment'=>'获奖人或参与人']) + ->addColumn('category_id','integer',['limit'=>11,'null'=>false,'default'=>0,'comment'=>'获奖人或参与人']) ->addColumn('rongyu_id','integer',['limit'=>11,'default'=>0,'null'=>false,'comment'=>'荣誉id'])// rongyuid应该改成rongyuinfoid ->addColumn('teacher_id','integer',['limit'=>11,'default'=>0,'null'=>false,'comment'=>'教师id']) ->addColumn('create_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'创建时间'])