diff --git a/app/admin/controller/AdminInfo.php b/app/admin/controller/AdminInfo.php index 871fe41c..26947353 100644 --- a/app/admin/controller/AdminInfo.php +++ b/app/admin/controller/AdminInfo.php @@ -274,6 +274,8 @@ class AdminInfo extends AdminBase return json(['msg' => $msg, 'val' => 0]);; } + $list['username'] = strtoupper($list['username']); + // 更新我的信息 $admindata = AD::update($list); diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 4e130f5e..d240afef 100755 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -110,6 +110,7 @@ class Index extends AdminBase // 设置密码,默认为123456 $md5 = new APR1_MD5(); $list['password'] = $md5->hash('123456'); + $list['username'] = strtolower($list['username']); // 验证表单数据 $validate = new \app\admin\validate\Admin; diff --git a/database/migrations/20181102003411_student.php b/database/migrations/20181102003411_student.php index f3dbc82f..32e32fb7 100755 --- a/database/migrations/20181102003411_student.php +++ b/database/migrations/20181102003411_student.php @@ -47,7 +47,7 @@ class Student extends Migrator ->addColumn('kaoshi','boolean',['limit'=>1,'default'=>1,'null'=>false,'comment'=>'是否参加考试']) ->addColumn('quanpin','string',['limit'=>30,'default'=>'a','null'=>false,'comment'=>'全拼']) ->addColumn('shoupin','string',['limit'=>5,'default'=>'a','null'=>false,'comment'=>'简拼']) - ->addColumn('kaohao','string',['limit'=>25,'null'=>true,'comment'=>'自定义考号']) + ->addColumn('xuehao','string',['limit'=>25,'null'=>true,'comment'=>'自定义考号']) ->addColumn('create_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'创建时间']) ->addColumn('update_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'更新时间']) ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间']) diff --git a/database/migrations/20210525115813_add_student_kaohao.php b/database/migrations/20210525115813_add_student_kaohao.php index b22ba066..6c1a629c 100644 --- a/database/migrations/20210525115813_add_student_kaohao.php +++ b/database/migrations/20210525115813_add_student_kaohao.php @@ -29,7 +29,7 @@ class AddStudentKaohao extends Migrator public function up() { $table = $this->table('student'); - $column = $table->hasColumn('kaohao'); + $column = $table->hasColumn('xuehao'); if (!$column) { $table ->addColumn('xuehao','string',['limit'=>25,'null'=>true,'comment'=>'自定义学号']) diff --git a/database/seeds/Category.php b/database/seeds/Category.php index 747579b2..2ce45b9d 100755 --- a/database/seeds/Category.php +++ b/database/seeds/Category.php @@ -113,9 +113,9 @@ class Category extends Seeder ['id' => 10704,'title' => '德育副校长','p_id' => 107,'paixu' => 4,'isupdate' => 0], ['id' => 10705,'title' => '教学主任','p_id' => 107,'paixu' => 5,'isupdate' => 0], ['id' => 10706,'title' => '德育主任','p_id' => 107,'paixu' => 6,'isupdate' => 0], - ['id' => 10707,'title' => '教研组长','p_id' => 107,'paixu' => 7,'isupdate' => 0], - ['id' => 10708,'title' => '班主任','p_id' => 107,'paixu' => 8,'isupdate' => 0], - ['id' => 10709,'title' => '课任','p_id' => 107,'paixu' => 9,'isupdate' => 0], + ['id' => 10707,'title' => '教研组长','p_id' => 107,'paixu' => 7,'isupdate' => 0, 'status' => 0], + ['id' => 10708,'title' => '班主任','p_id' => 107,'paixu' => 8,'isupdate' => 0, 'status' => 0], + ['id' => 10709,'title' => '课任','p_id' => 107,'paixu' => 9,'isupdate' => 0, 'status' => 0], ['id' => 107010,'title' => '其他','p_id' => 107,'paixu' => 10,'isupdate' => 0], ['id' => 108 diff --git a/public/uploads/student/student_template.xlsx b/public/uploads/student/student_template.xlsx index f42e3915..fa322f47 100755 Binary files a/public/uploads/student/student_template.xlsx and b/public/uploads/student/student_template.xlsx differ