-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdfae03
commit 58bc25f
Showing
82 changed files
with
25,882 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
package cn.tedu.mgsystem.teacher.dao; | ||
|
||
import java.util.Date; | ||
|
||
public class Cadet { | ||
private int id; | ||
private String name;//姓名 | ||
private String educational;//教育水平 | ||
private String profession;//专业 | ||
private int isbasics;//是否有基础 | ||
private String source;//信息来源 | ||
private String info;//信息 | ||
private Date learntime;//学习时长 | ||
private String stage;//状态 | ||
private String createdUser;//创建者 | ||
private String modifiyUser;//修改者 | ||
private Date createdTime;//创建时间 | ||
private Date modifiyTime;//修改时间 | ||
public int getId() { | ||
return id; | ||
} | ||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
public String getName() { | ||
return name; | ||
} | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
public String getEducational() { | ||
return educational; | ||
} | ||
public void setEducational(String educational) { | ||
this.educational = educational; | ||
} | ||
public String getProfession() { | ||
return profession; | ||
} | ||
public void setProfession(String profession) { | ||
this.profession = profession; | ||
} | ||
public int getIsbasics() { | ||
return isbasics; | ||
} | ||
public void setIsbasics(int isbasics) { | ||
this.isbasics = isbasics; | ||
} | ||
public String getSource() { | ||
return source; | ||
} | ||
public void setSource(String source) { | ||
this.source = source; | ||
} | ||
public String getInfo() { | ||
return info; | ||
} | ||
public void setInfo(String info) { | ||
this.info = info; | ||
} | ||
public Date getLearntime() { | ||
return learntime; | ||
} | ||
public void setLearntime(Date learntime) { | ||
this.learntime = learntime; | ||
} | ||
public String getStage() { | ||
return stage; | ||
} | ||
public void setStage(String stage) { | ||
this.stage = stage; | ||
} | ||
public String getCreatedUser() { | ||
return createdUser; | ||
} | ||
public void setCreatedUser(String createdUser) { | ||
this.createdUser = createdUser; | ||
} | ||
public String getModifiyUser() { | ||
return modifiyUser; | ||
} | ||
public void setModifiyUser(String modifiyUser) { | ||
this.modifiyUser = modifiyUser; | ||
} | ||
public Date getCreatedTime() { | ||
return createdTime; | ||
} | ||
public void setCreatedTime(Date createdTime) { | ||
this.createdTime = createdTime; | ||
} | ||
public Date getModifiyTime() { | ||
return modifiyTime; | ||
} | ||
public void setModifiyTime(Date modifiyTime) { | ||
this.modifiyTime = modifiyTime; | ||
} | ||
@Override | ||
public String toString() { | ||
return "Cadet [id=" + id + ", name=" + name + ", educational=" + educational + ", profession=" + profession | ||
+ ", isbasics=" + isbasics + ", source=" + source + ", info=" + info + ", learntime=" + learntime | ||
+ ", stage=" + stage + ", createdUser=" + createdUser + ", modifiyUser=" + modifiyUser | ||
+ ", createdTime=" + createdTime + ", modifiyTime=" + modifiyTime + "]"; | ||
} | ||
|
||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/cn/tedu/mgsystem/teacher/dao/Permission.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cn.tedu.mgsystem.teacher.dao; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* 允许 | ||
* @author Temple | ||
* | ||
*/ | ||
public class Permission { | ||
private int id; | ||
private String name;//名字 | ||
private String info;//信息 | ||
private String createdUser;//创建者 | ||
private String modifiyUser;//修改者 | ||
private Date createdTime;//创建时间 | ||
private Date modifiyTime;//修改时间 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cn.tedu.mgsystem.teacher.dao; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* 座位 | ||
* @author Temple | ||
* | ||
*/ | ||
public class Seat { | ||
private int id; | ||
private int trainingCampId;//训练营id | ||
private int seatNumber;//座位编号 | ||
private String createdTeacher;//创建者 | ||
private String modifiyTeacher;//修改者 | ||
private int cadetId;//学员ID | ||
private Date createdTime;//创建时间 | ||
private Date modifiyTime;//修改时间 | ||
private int seatState;//座位状态 | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/cn/tedu/mgsystem/teacher/dao/TrainingCamp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cn.tedu.mgsystem.teacher.dao; | ||
|
||
import java.util.Date; | ||
|
||
public class TrainingCamp { | ||
private int classroomNumber;//教室编号 | ||
private String teacherName;//老师名字 | ||
private String teacherPhone;//老师电话----这个保留、待定 | ||
private String productLine;//产品线 | ||
private int cadetNumber;//学员编号 | ||
private String createdUser;//创建者 | ||
private String modifiyUser;//修改者 | ||
private Date createdTime;//创建时间 | ||
private Date modifiyTime;//修改时间 | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/cn/tedu/mgsystem/teacher/dao/UserPermission.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package cn.tedu.mgsystem.teacher.dao; | ||
/** | ||
* 用户权限 | ||
* @author Temple | ||
* | ||
*/ | ||
public class UserPermission { | ||
private int id; | ||
private int userId;//用户id | ||
private int permissionId;//管理员id | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/cn/tedu/mgsystem/user/controller/LoginController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package cn.tedu.mgsystem.user.controller; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import javax.annotation.Resource; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.servlet.ModelAndView; | ||
|
||
import cn.tedu.mgsystem.user.entity.User; | ||
import cn.tedu.mgsystem.user.service.IUserService; | ||
|
||
@Controller | ||
public class LoginController { | ||
@Resource(name="loginService") | ||
private IUserService uservice; | ||
|
||
@RequestMapping("/toLogin.do") | ||
public String toLogin(){ | ||
System.out.println("转发到登陆页面!"); | ||
return "test/login"; | ||
} | ||
@RequestMapping("/login.do") | ||
public ModelAndView login(User user){ | ||
Map<String,String> map=new HashMap<String,String>(); | ||
try { | ||
User getUser=uservice.checkLogin(user.getAccount(), user.getPassword()); | ||
|
||
} catch (Exception e) { | ||
|
||
} | ||
|
||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package cn.tedu.mgsystem.user.dao; | ||
|
||
|
||
import org.springframework.stereotype.Repository; | ||
|
||
import cn.tedu.mgsystem.user.entity.User; | ||
|
||
@Repository | ||
public interface UserDao { | ||
public User findByAccount(String account); | ||
} |
4 changes: 2 additions & 2 deletions
4
...tedu/mgsystem/user/dao/UserNameMapper.xml → .../cn/tedu/mgsystem/user/dao/UserMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
src/main/java/cn/tedu/mgsystem/user/service/IUserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package cn.tedu.mgsystem.user.service; | ||
|
||
import cn.tedu.mgsystem.user.entity.User; | ||
|
||
public interface IUserService { | ||
public User checkLogin(String username,String pwd); | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/cn/tedu/mgsystem/user/service/impl/UserServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package cn.tedu.mgsystem.user.service.impl; | ||
|
||
import javax.annotation.Resource; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
import cn.tedu.mgsystem.common.exception.ServiceException; | ||
import cn.tedu.mgsystem.user.dao.UserDao; | ||
import cn.tedu.mgsystem.user.entity.User; | ||
import cn.tedu.mgsystem.user.service.IUserService; | ||
@Service | ||
public class UserServiceImpl implements IUserService{ | ||
@Resource(name="userDao") | ||
private UserDao dao; | ||
public User checkLogin(String username, String pwd) { | ||
User user=null; | ||
user=dao.findByAccount(username); | ||
if(user==null){ | ||
throw new ServiceException("用户不存在!"); | ||
} | ||
if(!user.getPassword().equals(pwd)){ | ||
throw new ServiceException("密码错误!"); | ||
} | ||
return user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Insert title here</title> | ||
</head> | ||
<body> | ||
这里是主页! | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Insert title here</title> | ||
</head> | ||
<body style="font-size:30px;"> | ||
<form action="login.do" method="post"> | ||
<fieldset> | ||
<legend>登录</legend> | ||
用户名:<input name="username"/> | ||
<br/> | ||
密 码:<input type="password" name="pwd"/> | ||
<br/> | ||
<input type="submit" value="确定"/> | ||
</fieldset> | ||
</form> | ||
</body> | ||
<script type="text/javascript"> | ||
|
||
</script> | ||
</html> |
Oops, something went wrong.