DROP TABLE IF EXISTS teacher
;
CREATE TABLE teacher
(
id
int(11) NOT NULL AUTO_INCREMENT,
username
varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
password
varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
teaname
varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
PRIMARY KEY (id
) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
– Records of teacher
INSERT INTO teacher
VALUES (3, ‘root’, ‘123456’, ‘李老师’);
INSERT INTO teacher
VALUES (7, ‘a’, ‘123456’, ‘孟老师’);
INSERT INTO teacher
VALUES (5, ‘b’, ‘123456’, ‘赵老师’);
INSERT INTO teacher
VALUES (6, ‘c’, ‘123456’, ‘李老师’);
SET FOREIGN_KEY_CHECKS = 1;
5.工程截图
二、系统展示
=======
1.登录系统
2.学生-主页面
3.学生-我的成绩
4.学生-修改密码
5.教师-主页面
6.教师-录入成绩
7.教师-修改密码
8.管理员-主页面
9.管理员-学生管理-增加学生
10.管理员–学生管理-管理学生
11.管理员-老师管理-增加老师
12.管理员-老师管理-管理老师
三、部分代码
======
AdminController
package com.hhtc.controller;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.hhtc.po.Page;
import com.hhtc.po.Student;
import com.hhtc.po.Teacher;
import com.hhtc.service.AdminService;