parent
a5f90b7b18
commit
78b995d15f
20 changed files with 1615 additions and 205 deletions
@ -0,0 +1,164 @@ |
||||
package com.yipin.liuwanr.entity; |
||||
|
||||
public class OrganizationRelationship { |
||||
//用户id
|
||||
private Integer userId; |
||||
//平台ID
|
||||
private Integer platformId; |
||||
//学校id
|
||||
private Integer schoolId; |
||||
//学校名称
|
||||
private String schoolName; |
||||
//角色ID
|
||||
private Integer roleId; |
||||
//工号学号
|
||||
private String workNumber; |
||||
//一级部门ID
|
||||
private Integer oneDepartmentId; |
||||
//二级部门ID
|
||||
private Integer twoDepartmentId; |
||||
//一级部门名称
|
||||
private String oneDepartmentName; |
||||
//二级部门名称
|
||||
private String twoDepartmentName; |
||||
//绑定专业ID
|
||||
private Integer professionalId; |
||||
//绑定专业名称
|
||||
private String professionalName; |
||||
//年级ID
|
||||
private Integer gradeId; |
||||
//年级名称
|
||||
private String gradeName; |
||||
//班级ID
|
||||
private Integer classId; |
||||
//班级名称
|
||||
private String className; |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Integer getPlatformId() { |
||||
return platformId; |
||||
} |
||||
|
||||
public void setPlatformId(Integer platformId) { |
||||
this.platformId = platformId; |
||||
} |
||||
|
||||
public Integer getSchoolId() { |
||||
return schoolId; |
||||
} |
||||
|
||||
public void setSchoolId(Integer schoolId) { |
||||
this.schoolId = schoolId; |
||||
} |
||||
|
||||
public String getSchoolName() { |
||||
return schoolName; |
||||
} |
||||
|
||||
public void setSchoolName(String schoolName) { |
||||
this.schoolName = schoolName; |
||||
} |
||||
|
||||
public Integer getRoleId() { |
||||
return roleId; |
||||
} |
||||
|
||||
public void setRoleId(Integer roleId) { |
||||
this.roleId = roleId; |
||||
} |
||||
|
||||
public String getWorkNumber() { |
||||
return workNumber; |
||||
} |
||||
|
||||
public void setWorkNumber(String workNumber) { |
||||
this.workNumber = workNumber; |
||||
} |
||||
|
||||
public Integer getOneDepartmentId() { |
||||
return oneDepartmentId; |
||||
} |
||||
|
||||
public void setOneDepartmentId(Integer oneDepartmentId) { |
||||
this.oneDepartmentId = oneDepartmentId; |
||||
} |
||||
|
||||
public Integer getTwoDepartmentId() { |
||||
return twoDepartmentId; |
||||
} |
||||
|
||||
public void setTwoDepartmentId(Integer twoDepartmentId) { |
||||
this.twoDepartmentId = twoDepartmentId; |
||||
} |
||||
|
||||
public String getOneDepartmentName() { |
||||
return oneDepartmentName; |
||||
} |
||||
|
||||
public void setOneDepartmentName(String oneDepartmentName) { |
||||
this.oneDepartmentName = oneDepartmentName; |
||||
} |
||||
|
||||
public String getTwoDepartmentName() { |
||||
return twoDepartmentName; |
||||
} |
||||
|
||||
public void setTwoDepartmentName(String twoDepartmentName) { |
||||
this.twoDepartmentName = twoDepartmentName; |
||||
} |
||||
|
||||
public Integer getProfessionalId() { |
||||
return professionalId; |
||||
} |
||||
|
||||
public void setProfessionalId(Integer professionalId) { |
||||
this.professionalId = professionalId; |
||||
} |
||||
|
||||
public String getProfessionalName() { |
||||
return professionalName; |
||||
} |
||||
|
||||
public void setProfessionalName(String professionalName) { |
||||
this.professionalName = professionalName; |
||||
} |
||||
|
||||
public Integer getGradeId() { |
||||
return gradeId; |
||||
} |
||||
|
||||
public void setGradeId(Integer gradeId) { |
||||
this.gradeId = gradeId; |
||||
} |
||||
|
||||
public String getGradeName() { |
||||
return gradeName; |
||||
} |
||||
|
||||
public void setGradeName(String gradeName) { |
||||
this.gradeName = gradeName; |
||||
} |
||||
|
||||
public Integer getClassId() { |
||||
return classId; |
||||
} |
||||
|
||||
public void setClassId(Integer classId) { |
||||
this.classId = classId; |
||||
} |
||||
|
||||
public String getClassName() { |
||||
return className; |
||||
} |
||||
|
||||
public void setClassName(String className) { |
||||
this.className = className; |
||||
} |
||||
} |
@ -0,0 +1,94 @@ |
||||
package com.yipin.liuwanr.entity; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 用户信息实体 |
||||
* |
||||
* @author Ning |
||||
*/ |
||||
public class PersonalFile { |
||||
//个人档案id
|
||||
private Integer personalFileId; |
||||
//个人职业id(1、学生 2、老师)
|
||||
private Integer personalCareerId; |
||||
//绑定学校id
|
||||
private Integer schoolId; |
||||
//绑定学科id
|
||||
private Integer disciplineId; |
||||
//绑定专业类id
|
||||
private Integer professionalClassId; |
||||
//绑定专业id
|
||||
private Integer professionalId; |
||||
//用户id
|
||||
private Integer userId; |
||||
|
||||
public Integer getPersonalFileId() { |
||||
return personalFileId; |
||||
} |
||||
|
||||
public void setPersonalFileId(Integer personalFileId) { |
||||
this.personalFileId = personalFileId; |
||||
} |
||||
|
||||
public Integer getPersonalCareerId() { |
||||
return personalCareerId; |
||||
} |
||||
|
||||
public void setPersonalCareerId(Integer personalCareerId) { |
||||
this.personalCareerId = personalCareerId; |
||||
} |
||||
|
||||
public Integer getSchoolId() { |
||||
return schoolId; |
||||
} |
||||
|
||||
public void setSchoolId(Integer schoolId) { |
||||
this.schoolId = schoolId; |
||||
} |
||||
|
||||
public Integer getDisciplineId() { |
||||
return disciplineId; |
||||
} |
||||
|
||||
public void setDisciplineId(Integer disciplineId) { |
||||
this.disciplineId = disciplineId; |
||||
} |
||||
|
||||
public Integer getProfessionalClassId() { |
||||
return professionalClassId; |
||||
} |
||||
|
||||
public void setProfessionalClassId(Integer professionalClassId) { |
||||
this.professionalClassId = professionalClassId; |
||||
} |
||||
|
||||
public Integer getProfessionalId() { |
||||
return professionalId; |
||||
} |
||||
|
||||
public void setProfessionalId(Integer professionalId) { |
||||
this.professionalId = professionalId; |
||||
} |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "PersonalFile{" + |
||||
"personalFileId=" + personalFileId + |
||||
", personalCareerId=" + personalCareerId + |
||||
", schoolId=" + schoolId + |
||||
", disciplineId=" + disciplineId + |
||||
", professionalClassId=" + professionalClassId + |
||||
", professionalId=" + professionalId + |
||||
", userId=" + userId + |
||||
'}'; |
||||
} |
||||
} |
@ -0,0 +1,207 @@ |
||||
package com.yipin.liuwanr.entity; |
||||
|
||||
import java.util.List; |
||||
|
||||
//学生和老师管理员组织关系信息实体
|
||||
public class StuStaff { |
||||
//主键ID
|
||||
private Integer id; |
||||
//账号
|
||||
private String account; |
||||
//用户id
|
||||
private Integer userId; |
||||
//名字
|
||||
private String name; |
||||
//角色Id
|
||||
private Integer roleId; |
||||
//工号
|
||||
private String workNumber; |
||||
//电话
|
||||
private String phone; |
||||
//邮件
|
||||
private String email; |
||||
//绑定员工年级架构ID
|
||||
private Integer staffGradeId; |
||||
//绑定专业ID
|
||||
private Integer staffProfessionalArchitectureId; |
||||
//绑定专业名称
|
||||
private String staffProfessionalArchitectureName; |
||||
//绑定员工年级名称
|
||||
private String staffGradeName; |
||||
//唯一标示性账号
|
||||
private String uniqueIdentificationAccount; |
||||
//绑定学校id
|
||||
private Integer schoolId; |
||||
//绑定专业ID
|
||||
private Integer professionalId; |
||||
//绑定年级ID
|
||||
private Integer gradeId; |
||||
//绑定班级ID
|
||||
private Integer classId; |
||||
//专业名称
|
||||
private String professionalName; |
||||
//年级名称
|
||||
private String gradeName; |
||||
//绑定班级名称
|
||||
private String className; |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getAccount() { |
||||
return account; |
||||
} |
||||
|
||||
public void setAccount(String account) { |
||||
this.account = account; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getWorkNumber() { |
||||
return workNumber; |
||||
} |
||||
|
||||
public void setWorkNumber(String workNumber) { |
||||
this.workNumber = workNumber; |
||||
} |
||||
|
||||
public String getPhone() { |
||||
return phone; |
||||
} |
||||
|
||||
public void setPhone(String phone) { |
||||
this.phone = phone; |
||||
} |
||||
|
||||
public String getEmail() { |
||||
return email; |
||||
} |
||||
|
||||
public void setEmail(String email) { |
||||
this.email = email; |
||||
} |
||||
|
||||
public Integer getStaffGradeId() { |
||||
return staffGradeId; |
||||
} |
||||
|
||||
public void setStaffGradeId(Integer staffGradeId) { |
||||
this.staffGradeId = staffGradeId; |
||||
} |
||||
|
||||
public Integer getStaffProfessionalArchitectureId() { |
||||
return staffProfessionalArchitectureId; |
||||
} |
||||
|
||||
public void setStaffProfessionalArchitectureId(Integer staffProfessionalArchitectureId) { |
||||
this.staffProfessionalArchitectureId = staffProfessionalArchitectureId; |
||||
} |
||||
|
||||
public String getStaffProfessionalArchitectureName() { |
||||
return staffProfessionalArchitectureName; |
||||
} |
||||
|
||||
public void setStaffProfessionalArchitectureName(String staffProfessionalArchitectureName) { |
||||
this.staffProfessionalArchitectureName = staffProfessionalArchitectureName; |
||||
} |
||||
|
||||
public Integer getRoleId() { |
||||
return roleId; |
||||
} |
||||
|
||||
public void setRoleId(Integer roleId) { |
||||
this.roleId = roleId; |
||||
} |
||||
|
||||
public String getStaffGradeName() { |
||||
return staffGradeName; |
||||
} |
||||
|
||||
public void setStaffGradeName(String staffGradeName) { |
||||
this.staffGradeName = staffGradeName; |
||||
} |
||||
|
||||
public String getUniqueIdentificationAccount() { |
||||
return uniqueIdentificationAccount; |
||||
} |
||||
|
||||
public void setUniqueIdentificationAccount(String uniqueIdentificationAccount) { |
||||
this.uniqueIdentificationAccount = uniqueIdentificationAccount; |
||||
} |
||||
|
||||
public Integer getSchoolId() { |
||||
return schoolId; |
||||
} |
||||
|
||||
public void setSchoolId(Integer schoolId) { |
||||
this.schoolId = schoolId; |
||||
} |
||||
|
||||
public Integer getProfessionalId() { |
||||
return professionalId; |
||||
} |
||||
|
||||
public void setProfessionalId(Integer professionalId) { |
||||
this.professionalId = professionalId; |
||||
} |
||||
|
||||
public Integer getGradeId() { |
||||
return gradeId; |
||||
} |
||||
|
||||
public void setGradeId(Integer gradeId) { |
||||
this.gradeId = gradeId; |
||||
} |
||||
|
||||
public Integer getClassId() { |
||||
return classId; |
||||
} |
||||
|
||||
public void setClassId(Integer classId) { |
||||
this.classId = classId; |
||||
} |
||||
|
||||
public String getProfessionalName() { |
||||
return professionalName; |
||||
} |
||||
|
||||
public void setProfessionalName(String professionalName) { |
||||
this.professionalName = professionalName; |
||||
} |
||||
|
||||
public String getGradeName() { |
||||
return gradeName; |
||||
} |
||||
|
||||
public void setGradeName(String gradeName) { |
||||
this.gradeName = gradeName; |
||||
} |
||||
|
||||
public String getClassName() { |
||||
return className; |
||||
} |
||||
|
||||
public void setClassName(String className) { |
||||
this.className = className; |
||||
} |
||||
} |
@ -0,0 +1,138 @@ |
||||
package com.yipin.liuwanr.entity; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 用户档案实体 |
||||
* |
||||
* @author Ning |
||||
*/ |
||||
public class UserProfiles { |
||||
//个人档案id
|
||||
private Integer personalFileId; |
||||
//个人职业id
|
||||
private Integer personalCareerId; |
||||
//绑定学校id
|
||||
private Integer schoolId; |
||||
//学校名称
|
||||
private String schoolName; |
||||
//绑定学科id
|
||||
private Integer disciplineId; |
||||
//学科名称
|
||||
private String disciplineName; |
||||
//绑定专业类id
|
||||
private Integer professionalClassId; |
||||
//专业类名称
|
||||
private String professionalClassName; |
||||
//绑定专业id
|
||||
private Integer professionalId; |
||||
//专业名称
|
||||
private String professionalName; |
||||
//绑定用户id
|
||||
private Integer userId; |
||||
|
||||
public String getSchoolName() { |
||||
return schoolName; |
||||
} |
||||
|
||||
public void setSchoolName(String schoolName) { |
||||
this.schoolName = schoolName; |
||||
} |
||||
|
||||
public String getDisciplineName() { |
||||
return disciplineName; |
||||
} |
||||
|
||||
public void setDisciplineName(String disciplineName) { |
||||
this.disciplineName = disciplineName; |
||||
} |
||||
|
||||
public String getProfessionalClassName() { |
||||
return professionalClassName; |
||||
} |
||||
|
||||
public void setProfessionalClassName(String professionalClassName) { |
||||
this.professionalClassName = professionalClassName; |
||||
} |
||||
|
||||
public String getProfessionalName() { |
||||
return professionalName; |
||||
} |
||||
|
||||
public void setProfessionalName(String professionalName) { |
||||
this.professionalName = professionalName; |
||||
} |
||||
|
||||
public Integer getPersonalFileId() { |
||||
return personalFileId; |
||||
} |
||||
|
||||
public void setPersonalFileId(Integer personalFileId) { |
||||
this.personalFileId = personalFileId; |
||||
} |
||||
|
||||
public Integer getPersonalCareerId() { |
||||
return personalCareerId; |
||||
} |
||||
|
||||
public void setPersonalCareerId(Integer personalCareerId) { |
||||
this.personalCareerId = personalCareerId; |
||||
} |
||||
|
||||
public Integer getSchoolId() { |
||||
return schoolId; |
||||
} |
||||
|
||||
public void setSchoolId(Integer schoolId) { |
||||
this.schoolId = schoolId; |
||||
} |
||||
|
||||
public Integer getDisciplineId() { |
||||
return disciplineId; |
||||
} |
||||
|
||||
public void setDisciplineId(Integer disciplineId) { |
||||
this.disciplineId = disciplineId; |
||||
} |
||||
|
||||
public Integer getProfessionalClassId() { |
||||
return professionalClassId; |
||||
} |
||||
|
||||
public void setProfessionalClassId(Integer professionalClassId) { |
||||
this.professionalClassId = professionalClassId; |
||||
} |
||||
|
||||
public Integer getProfessionalId() { |
||||
return professionalId; |
||||
} |
||||
|
||||
public void setProfessionalId(Integer professionalId) { |
||||
this.professionalId = professionalId; |
||||
} |
||||
|
||||
public Integer getUserId() { |
||||
return userId; |
||||
} |
||||
|
||||
public void setUserId(Integer userId) { |
||||
this.userId = userId; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "UserProfiles{" + |
||||
"personalFileId=" + personalFileId + |
||||
", personalCareerId=" + personalCareerId + |
||||
", schoolId=" + schoolId + |
||||
", schoolName='" + schoolName + '\'' + |
||||
", disciplineId=" + disciplineId + |
||||
", disciplineName='" + disciplineName + '\'' + |
||||
", professionalClassId=" + professionalClassId + |
||||
", professionalClassName='" + professionalClassName + '\'' + |
||||
", professionalId=" + professionalId + |
||||
", professionalName='" + professionalName + '\'' + |
||||
", userId=" + userId + |
||||
'}'; |
||||
} |
||||
} |
@ -0,0 +1,181 @@ |
||||
package com.yipin.liuwanr.mapper; |
||||
|
||||
import com.yipin.liuwanr.entity.*; |
||||
import com.yipin.liuwanr.vo.UserInfoVO; |
||||
import com.yipin.liuwanr.vo.UserVO; |
||||
import org.apache.ibatis.annotations.*; |
||||
import org.apache.ibatis.mapping.FetchType; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface UserInfoMapper { |
||||
|
||||
@Update({ "<script>", |
||||
"UPDATE lw_user SET", |
||||
"<when test='mobile!=null'>", "mobile=#{mobile},", "</when>", |
||||
"<when test='email!=null'>", "email=#{email},", "</when>", |
||||
"<when test='nickname!=null'>", "nickname=#{nickname},", "</when>", |
||||
"<when test='sex!=-1'>", "sex=#{sex},", "</when>", |
||||
"<when test='sign!=null'>", "sign=#{sign},", "</when>", |
||||
"<when test='birthday!=null'>", "birthday=#{birthday},", "</when>", |
||||
"<when test='avatar!=null'>", "avatar=#{avatar},", "</when>", |
||||
"<when test='country!=null'>", "country=#{country},", "</when>", |
||||
"<when test='province!=null'>", "province=#{province},", "</when>", |
||||
"<when test='city!=null'>", "city=#{city},", "</when>", |
||||
"updatetime=now() WHERE uuid =#{uuid}", |
||||
"</script>"}) |
||||
void update(User user); |
||||
|
||||
@Insert("INSERT INTO hr_user_info(userName,uniqueIdentificationAccount,documentType,IDNumber,provinceId,cityId,countries,dateBirth,educationDegree,schoolId,phone,weChatID,email,account,password,creationTime,logInNumber,sex,userAvatars,isdel)" |
||||
+ " VALUES(#{userName},#{uniqueIdentificationAccount},#{documentType},#{IDNumber},#{provinceId},#{cityId},#{countries},#{dateBirth},#{educationDegree},#{schoolId},#{phone},#{weChatID},#{email},#{account},#{password},now(),#{logInNumber},#{sex},#{userAvatars},0)") |
||||
@Options(useGeneratedKeys=true, keyProperty="userId", keyColumn="userId") |
||||
void addUser(UserInfo user); |
||||
|
||||
@Select({"<script>", |
||||
"SELECT s.schoolName,s.provinceId,s.cityId,s.provinceName,s.cityName,u.userId,u.userName,u.countries,u.creationTime,u.account,u.logInNumber,hor.schoolId,hor.platformId,hor.roleId FROM hr_user_info u,hr_organization_relationship hor,school s WHERE u.userId = hor.userId and hor.schoolId = s.schoolId and s.isdel = 0", |
||||
" <if test='countries!=null and countries !=\"\" '>and u.countries = #{countries} </if>", |
||||
" <if test='provinceId!=null and provinceId !=\"\" '>and u.provinceId = #{provinceId} </if>", |
||||
" <if test='schoolId!=null and schoolId !=\"\"'>and u.schoolId = #{schoolId} </if>", |
||||
" <if test='cityId!=null and cityId !=\"\" '>and u.cityId = #{cityId} </if>", |
||||
" <if test='roleId!=null and roleId !=\"\" '>and u.roleId = #{roleId} </if>", |
||||
// " <if test='searchContent!=null and searchContent !=\"\" '> AND CONCAT(u.name, s.schoolName) LIKE CONCAT('%',#{searchContent},'%')</if>",
|
||||
" <if test='month==3'>and u.creationTime>DATE_SUB(CURDATE(), INTERVAL 3 MONTH)</if>", |
||||
" <if test='month==6'>and u.creationTime>DATE_SUB(CURDATE(), INTERVAL 6 MONTH)</if>", |
||||
" <if test='month==9'>and u.creationTime>DATE_SUB(CURDATE(), INTERVAL 9 MONTH)</if>", |
||||
" <if test='month==12'>and u.creationTime>DATE_SUB(CURDATE(), INTERVAL 12 MONTH)</if>", |
||||
" <if test='creationTime!=null and endTime!=null and endTime!=\"\" and creationTime!=\"\" '> and u.creationTime between #{creationTime} and #{endTime}</if>", |
||||
"GROUP BY u.userId order by u.creationTime desc", |
||||
"</script> "}) |
||||
List<UserInfo> queryUserInfo(UserInfo userInfo); |
||||
|
||||
@Update("UPDATE hr_user_info SET isdel = 1 where userId = #{userId}") |
||||
void deleteUser(Integer userId); |
||||
|
||||
//批量删除员工
|
||||
@Update({ "<script>", |
||||
"UPDATE staff SET isdel = 1 where account = #{account} ", |
||||
"</script>" }) |
||||
void deleteStaff(UserInfo user); |
||||
|
||||
//批量删除学生
|
||||
@Update({ "<script>", |
||||
"UPDATE student SET isdel = 1 where account = #{account} ", |
||||
"</script>" }) |
||||
void deleteStudent(UserInfo user); |
||||
|
||||
//修改用户
|
||||
@Update("UPDATE user SET name = #{name},sex = #{sex},documentType = #{documentType},countries = #{countries},educationDegree = #{educationDegree}," |
||||
+ "IDNumber = #{IDNumber},accountRole = #{accountRole},provinceId = #{provinceId},subjectsTaught = #{subjectsTaught},cityId = #{cityId}," |
||||
+ "phone = #{phone},teachingProfessional = #{teachingProfessional},WeChatID = #{WeChatID},dateBirth = #{dateBirth},email = #{email},schoolId = #{schoolId},disciplineId = #{disciplineId},professionalId = #{professionalId},professionalClassId = #{professionalClassId} where userId = #{userId}") |
||||
void updateUser(UserInfo user); |
||||
|
||||
//修改员工
|
||||
@Update("UPDATE staff SET staffName = #{staffName},staffWorkNumber = #{staffWorkNumber},phone = #{phone},email = #{email},staffProfessionalArchitectureId = #{staffProfessionalArchitectureId}," |
||||
+ "staffProfessionalArchitectureId = #{staffProfessionalArchitectureId},staffGradeId = #{staffGradeId},roleId = #{roleId} where phone = #{phone}") |
||||
void updateStaff(Staff staff); |
||||
|
||||
//修改学生
|
||||
@Update("UPDATE student SET studentName = #{studentName},studentNumber = #{studentNumber},phone = #{phone},email = #{email},roleId = #{roleId}" |
||||
+ ",schoolId = #{schoolId},professionalId = #{professionalId},gradeId = #{gradeId},classId = #{classId} where phone = #{phone}") |
||||
void updateStudent(Student student); |
||||
|
||||
//登陆
|
||||
@Select("SELECT * from hr_user_info where isdel=0 and account = #{account} and password = #{password}") |
||||
UserInfo logins(UserInfo userInfo); |
||||
|
||||
//查询用户roleId
|
||||
@Select("SELECT schoolId,roleId from hr_organization_relationship where userId = #{userId}") |
||||
OrganizationRelationship queryOrganizationRelationship(Integer userId); |
||||
|
||||
//查询用户手机
|
||||
@Select("SELECT u.* from user u where isdel=0 and phone = #{phone}") |
||||
List<UserM> queryPhone(String phone); |
||||
|
||||
//查询用户详情
|
||||
@Select({"<script>", |
||||
"SELECT * from hr_user_info where isdel = 0 and userId = #{userId}", |
||||
"</script> "}) |
||||
List<UserInfoVO> queryUserInfoDetails(Integer userId); |
||||
|
||||
//查询用户详情
|
||||
@Select({"<script>", |
||||
"SELECT * from hr_personal_file where userId = #{userId}", |
||||
"</script> "}) |
||||
List<UserProfiles> queryUserProfiles(Integer userId); |
||||
|
||||
@Select({"<script>", |
||||
"SELECT customerId,customerName,schoolId FROM customer where isdel = 0 and provinceId = #{provinceId} and cityId = #{cityId}", |
||||
"</script> "}) |
||||
List<Customer> queryCustomer(Integer cityId, Integer provinceId); |
||||
|
||||
/** |
||||
* 批量插入用户 |
||||
* @param user |
||||
*/ |
||||
@Insert({ |
||||
"<script>", |
||||
"insert into user(name, password,accountRole,workNumber,phone,uniqueIdentificationAccount,creationTime,isdel) values ", |
||||
"<foreach collection='users' item='user' index='index' separator=','>", |
||||
"(#{user.name}, #{user.password}, #{user.accountRole}, #{user.workNumber} ,#{user.phone},#{user.uniqueIdentificationAccount},now(),0)", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void addUserM(@Param("users") List<UserM> users); |
||||
|
||||
//修改用户头像
|
||||
@Update("update user set userAvatars=#{userAvatars} where userId=#{userId}") |
||||
void updateUserAvatars(@Param("userAvatars") String userAvatars, @Param("userId") Integer userId); |
||||
|
||||
//更新用户登录次数和最后一次登录时间
|
||||
@Update({ "UPDATE user SET logInNumber=logInNumber+1, lastTimeOfLanding=now() WHERE userId=#{userId}"}) |
||||
void updateLogInNumber(UserM user); |
||||
|
||||
//更新用户登录次数和最后一次登录时间
|
||||
@Update({ "UPDATE student SET logInNumber=logInNumber+1, lastLoginTime=now() WHERE phone=#{phone}"}) |
||||
void updateStudentLogInNumber(UserM user); |
||||
|
||||
//更新用户登录次数和最后一次登录时间
|
||||
@Update({ "UPDATE staff SET logNumber=logNumber+1, lastTimeOfLanding=now() WHERE phone=#{phone}"}) |
||||
void updateStaffLogInNumber(UserM user); |
||||
|
||||
//查询账号是否存在
|
||||
@Select("SELECT userId,account from user where isdel = 0 and account = #{account}") |
||||
List<UserInfo> queryAccountIsExist(String account); |
||||
|
||||
//查询学号、工号是否存在
|
||||
@Select("SELECT userId,workNumber from user where isdel = 0 and workNumber = #{workNumber}") |
||||
List<UserM> queryWorkNumberIsExist(String workNumber); |
||||
|
||||
//========全承珠
|
||||
@Select("select userId,password,accountRole,logInNumber,workNumber,phone,uniqueIdentificationAccount,schoolId from user " |
||||
+ " where isdel=0 and password=#{password} and (phone=#{userAccount} or workNumber=#{userAccount} or uniqueIdentificationAccount=#{userAccount})") |
||||
UserM loginsQ(@Param("userAccount") String userAccount, @Param("password") String password); |
||||
|
||||
|
||||
@Update("update user set lastTimeOfLanding=#{time},logInNumber=#{logInNumber} where userId=#{userId}") |
||||
void updateUserQ(@Param("time") String time, @Param("logInNumber") Integer logInNumber, @Param("userId") Integer userId); |
||||
|
||||
/** |
||||
* 批量插入个人档案 |
||||
*/ |
||||
@Insert({ |
||||
"<script>", |
||||
"insert into hr_personal_file(personalCareerId,schoolId,disciplineId,professionalClassId,professionalId,userId) values ", |
||||
"<foreach collection='list' item='list' index='index' separator=','>", |
||||
"(#{list.personalCareerId}, #{list.schoolId}, #{list.disciplineId}, #{list.professionalClassId} ,#{list.professionalId},#{list.userId})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void addPersonalFile(List<UserProfiles> list); |
||||
|
||||
//添加学生
|
||||
@Insert("INSERT INTO student(account,userId,studentName,roleId,studentNumber,phone,email,professionalId,gradeId,classId,professionalName,gradeName,className,uniqueIdentificationAccount,schoolId,isdel)" |
||||
+ " VALUES(#{account},#{userId},#{name},#{roleId},#{workNumber},#{phone},#{email},#{professionalId},#{gradeId},#{classId},#{professionalName},#{gradeName},#{className},#{uniqueIdentificationAccount},#{schoolId},0)") |
||||
void addStudent(StuStaff stuStaff); |
||||
|
||||
//添加员工
|
||||
@Insert("INSERT INTO staff(account,userId,staffName,roleId,staffWorkNumber,phone,email,staffGradeId,staffProfessionalArchitectureId,staffProfessionalArchitectureName,staffGradeName,uniqueIdentificationAccount,schoolId,isdel)" |
||||
+ " VALUES(#{account},#{userId},#{name},#{roleId},#{workNumber},#{phone},#{email},#{staffGradeId},#{staffProfessionalArchitectureId},#{staffProfessionalArchitectureName},#{staffGradeName},#{uniqueIdentificationAccount},#{schoolId},0)") |
||||
void addStaff(StuStaff stuStaff); |
||||
|
||||
} |
@ -0,0 +1,454 @@ |
||||
package com.yipin.liuwanr.service; |
||||
|
||||
import com.aliyun.oss.OSSClient; |
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.yipin.liuwanr.AliyunOssConfig; |
||||
import com.yipin.liuwanr.entity.*; |
||||
import com.yipin.liuwanr.helper.OssConfigUtil; |
||||
import com.yipin.liuwanr.helper.RandomUtil; |
||||
import com.yipin.liuwanr.mapper.StaffMapper; |
||||
import com.yipin.liuwanr.mapper.StudentMapper; |
||||
import com.yipin.liuwanr.mapper.UserInfoMapper; |
||||
import org.jboss.logging.Logger; |
||||
import org.springframework.beans.factory.BeanFactory; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
import redis.clients.jedis.JedisCluster; |
||||
|
||||
import java.text.SimpleDateFormat; |
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
|
||||
|
||||
@Service |
||||
public class UserInfoService { |
||||
|
||||
private static Logger logger = Logger.getLogger(UserInfoService.class); |
||||
|
||||
@Autowired |
||||
private StaffMapper staffMapper; |
||||
@Autowired |
||||
private StudentMapper studentMapper; |
||||
@Autowired |
||||
private UserInfoMapper userInfoMapper; |
||||
@Autowired |
||||
private JedisCluster jedis; |
||||
@Autowired |
||||
private AliyunOssConfig config; |
||||
@Autowired |
||||
private BeanFactory beanFactory; |
||||
|
||||
public HashMap<String, Object> login(String id, String password){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
User user = null; |
||||
if(null == password || password.isEmpty()){ |
||||
// user = userInfoMapper.getSelfBy3rdId(id);
|
||||
}else{ |
||||
String storedPassword = RandomUtil.parsePassword(password); |
||||
// user = userInfoMapper.getSelfByAccount(id);
|
||||
if( null != user){ |
||||
logger.info(user.toString()); |
||||
logger.info(user.getPassword()); |
||||
logger.info(storedPassword); |
||||
if(0 == user.getPassword().compareToIgnoreCase(storedPassword)){ |
||||
user.setPassword(null); |
||||
resp.put("retcode", 200); |
||||
resp.put("retvalue", user); |
||||
} |
||||
else{ |
||||
resp.put("retcode",500); |
||||
resp.put("retvalue","User/Password Invalid"); |
||||
} |
||||
} |
||||
} |
||||
if(null == user){ |
||||
resp.put("retcode",400); |
||||
resp.put("retvalue","Account Invalid"); |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询手机号
|
||||
public HashMap<String, Object>queryPhone(String phone) { |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
resp.put("retvalue", userInfoMapper.queryPhone(phone)); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "查询手机号失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//添加用户
|
||||
public HashMap<String, Object> addUser(UserInfo user){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
user.setPassword("huoran123");//设置默认密码
|
||||
userInfoMapper.addUser(user); |
||||
Integer userId = user.getUserId(); |
||||
resp.put("userId",userId); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "添加用户失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询用户信息
|
||||
public HashMap<String, Object> queryUserInfo(UserInfo userInfo,Integer pageNo,Integer pageSize){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
if(pageNo!=null&&pageSize!=null) { |
||||
PageHelper.startPage(pageNo, pageSize); |
||||
List<UserInfo> list = userInfoMapper.queryUserInfo(userInfo); |
||||
PageInfo<UserInfo> info=new PageInfo<UserInfo>(list); |
||||
int total1 = (int) info.getTotal(); |
||||
int totalPages; |
||||
totalPages = total1 / pageSize; |
||||
if (total1 % pageSize != 0){ |
||||
totalPages ++; |
||||
} |
||||
long total = total1; |
||||
resp.put("retvalue", new PageResult(total, list,totalPages)); |
||||
resp.put("retcode", 200); |
||||
}else { |
||||
List<UserInfo> list = userInfoMapper.queryUserInfo(userInfo); |
||||
resp.put("retvalue", list); |
||||
resp.put("retcode", 200); |
||||
} |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "查询用户失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
//删除用户
|
||||
public HashMap<String, Object> deleteUserInfo(Integer userId){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
userInfoMapper.deleteUser(userId); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "删除用户失败"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//批量删除员工
|
||||
public HashMap<String, Object> deleteStaff(UserInfo user){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
userInfoMapper.deleteStaff(user); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "删除员工失败"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//批量删除学生
|
||||
public HashMap<String, Object> deleteStudent(UserInfo user){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
userInfoMapper.deleteStudent(user); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "删除学生失败"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//更新用户
|
||||
@Transactional |
||||
public HashMap<String, Object> updateUser(UserInfo user){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
userInfoMapper.updateUser(user); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "更新用户失败!"); |
||||
throw new RuntimeException(); |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//更新学生
|
||||
@Transactional |
||||
public HashMap<String, Object> updateStudent(Student student){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
userInfoMapper.updateStudent(student); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "更新学生失败!"); |
||||
throw new RuntimeException(); |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//更新员工
|
||||
@Transactional |
||||
public HashMap<String, Object> updateStaff(Staff staff){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
userInfoMapper.updateStaff(staff); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "更新员工失败!"); |
||||
throw new RuntimeException(); |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//登陆
|
||||
public HashMap<String, Object> logins(UserInfo userInfo){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
HashMap<String, Object> obj = new HashMap<String, Object>(); |
||||
Student student; |
||||
Staff staff; |
||||
try { |
||||
UserInfo user=userInfoMapper.logins(userInfo); |
||||
if(user!=null) { |
||||
Integer userId = user.getUserId(); |
||||
OrganizationRelationship organizationRelationship = userInfoMapper.queryOrganizationRelationship(userId); |
||||
// user.setRoleId(roleId);
|
||||
// int loginNumber=user.getLogInNumber()+1;
|
||||
// long time=System.currentTimeMillis();
|
||||
// Date date = new Date(time);
|
||||
// SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
// String lastTime=sd.format(date);
|
||||
// if(roleId.equals(4)) {
|
||||
// student=studentMapper.queryStudentQ(user);
|
||||
// if(student!=null) {
|
||||
// Integer studentId=student.getStudentId();
|
||||
// studentMapper.updateStudentQ(lastTime,loginNumber, studentId);
|
||||
// obj.put("student",student);
|
||||
// }
|
||||
// }else if(roleId.equals(3)) {
|
||||
// staff =staffMapper.queryStaffQ(user);
|
||||
// if(staff!=null) {
|
||||
// Integer staffId=staff.getStaffId();
|
||||
// staffMapper.updateStaffQ(lastTime,loginNumber, staffId);
|
||||
// obj.put("staff",staff);
|
||||
// }
|
||||
// }
|
||||
// user.setPassword(null);
|
||||
// obj.put("user",user);
|
||||
// userInfoMapper.updateUserQ(lastTime,loginNumber, userId);
|
||||
resp.put("retcode", 200); |
||||
resp.put("retvalue", obj); |
||||
}else { |
||||
resp.put("retcode", 300); |
||||
resp.put("retvalue", "登录失败,账号密码有误或不存在!"); |
||||
} |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "登录异常,请稍后再试!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询用户详情
|
||||
public HashMap<String, Object> queryUserInfoDetails(Integer userId){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
resp.put("retvalue", userInfoMapper.queryUserInfoDetails(userId)); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "查询用户详情失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询用户详情
|
||||
public HashMap<String, Object> queryUserProfiles(Integer userId){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
resp.put("retvalue", userInfoMapper.queryUserProfiles(userId)); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "查询用户详情失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询客户
|
||||
public HashMap<String, Object> queryCustomer(Integer cityId,Integer provinceId){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
resp.put("retvalue", userInfoMapper.queryCustomer(cityId,provinceId)); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "查询客户失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//修改用户头像
|
||||
public HashMap<String, Object> uploadUserAvatars(MultipartFile file,Integer userId){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
OSSClient client=beanFactory.getBean(OSSClient.class); |
||||
FilesResult result=OssConfigUtil.uploadUserAvatars(file, client, config); |
||||
|
||||
//用户图片路径
|
||||
String userAvatars=result.getFileUrl(); |
||||
userInfoMapper.updateUserAvatars(userAvatars,userId); |
||||
resp.put("retcode", 200); |
||||
resp.put("retvalue", userAvatars); |
||||
} catch (Exception e) { |
||||
logger.info(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "修改头像失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//更新登录次数和时间
|
||||
public HashMap<String, Object> updateLogInNumber(UserM user){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
Integer accountRole = user.getAccountRole(); |
||||
userInfoMapper.updateLogInNumber(user); |
||||
if (accountRole==3){ |
||||
//更新员工登录次数和时间
|
||||
userInfoMapper.updateStaffLogInNumber(user); |
||||
} |
||||
if (accountRole==4){ |
||||
//更新学生登录次数和时间
|
||||
userInfoMapper.updateStudentLogInNumber(user); |
||||
} |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "更新登录次数失败!"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询账号是否存在
|
||||
public HashMap<String, Object> queryAccountIsExist(String account){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
resp.put("retvalue", userInfoMapper.queryAccountIsExist(account)); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "Inquiry Failed"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//查询学号、工号是否存在
|
||||
public HashMap<String, Object> queryWorkNumberIsExist(String workNumber){ |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
resp.put("retvalue", userInfoMapper.queryWorkNumberIsExist(workNumber)); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "Inquiry Failed"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//添加个人档案
|
||||
public HashMap<String, Object> addPersonalFile(List<UserProfiles> userProfilesList,Integer userId) { |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
Integer size = userProfilesList.size(); |
||||
for (int i = 0; i < size; i++){ |
||||
UserProfiles userProfiles = userProfilesList.get(i); |
||||
userProfiles.setUserId(userId); |
||||
} |
||||
userInfoMapper.addPersonalFile(userProfilesList); |
||||
resp.put("retcode", 200); |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "添加个人档案失败"); |
||||
return resp; |
||||
} |
||||
return resp; |
||||
} |
||||
|
||||
//添加学生和员工信息
|
||||
@Transactional |
||||
public HashMap<String, Object> addStuStaff(List<StuStaff> stuStaffList,Integer userId) { |
||||
HashMap<String, Object> resp = new HashMap<String, Object>(); |
||||
try { |
||||
int size = stuStaffList.size(); |
||||
for (int i=0;i<size;i++){ |
||||
StuStaff stuStaff = stuStaffList.get(i); |
||||
stuStaff.setUserId(userId); |
||||
Integer roleId = stuStaff.getRoleId(); |
||||
if (roleId == 2 || roleId == 3){ |
||||
//添加老师和管理员sql
|
||||
userInfoMapper.addStaff(stuStaff); |
||||
resp.put("retcode", 200); |
||||
}else if (roleId == 4){ |
||||
//添加学生sql
|
||||
userInfoMapper.addStudent(stuStaff); |
||||
resp.put("retcode", 200); |
||||
}else{ |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "添加学生和员工信息失败!,角色id有误!"); |
||||
throw new RuntimeException("添加学生和员工信息失败!,角色id有误!"); |
||||
} |
||||
} |
||||
} catch (RuntimeException e) { |
||||
logger.error(e.getMessage()); |
||||
resp.put("retcode", 500); |
||||
resp.put("retvalue", "添加学生和员工信息失败!"); |
||||
throw new RuntimeException("添加学生和员工信息失败!"); |
||||
// return resp;
|
||||
} |
||||
return resp; |
||||
} |
||||
} |
@ -0,0 +1,46 @@ |
||||
package com.yipin.liuwanr.vo; |
||||
|
||||
import com.yipin.liuwanr.entity.Staff; |
||||
import com.yipin.liuwanr.entity.Student; |
||||
import com.yipin.liuwanr.entity.UserM; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 用户信息实体 |
||||
* @author Ning |
||||
* |
||||
*/ |
||||
public class StuStaffVO { |
||||
//学生
|
||||
private Student student; |
||||
//员工
|
||||
private Staff staff; |
||||
private List<Student> studentList; |
||||
private List<Staff> staffList; |
||||
|
||||
public Student getStudent() { |
||||
return student; |
||||
} |
||||
public void setStudent(Student student) { |
||||
this.student = student; |
||||
} |
||||
public Staff getStaff() { |
||||
return staff; |
||||
} |
||||
public void setStaff(Staff staff) { |
||||
this.staff = staff; |
||||
} |
||||
public List<Student> getStudentList() { |
||||
return studentList; |
||||
} |
||||
public void setStudentList(List<Student> studentList) { |
||||
this.studentList = studentList; |
||||
} |
||||
public List<Staff> getStaffList() { |
||||
return staffList; |
||||
} |
||||
public void setStaffList(List<Staff> staffList) { |
||||
this.staffList = staffList; |
||||
} |
||||
} |
@ -0,0 +1,118 @@ |
||||
package com.yipin.liuwanr.vo; |
||||
|
||||
import com.yipin.liuwanr.entity.*; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 用户信息实体 |
||||
* @author Ning |
||||
* |
||||
*/ |
||||
public class UserInfoVO { |
||||
//用户
|
||||
private UserInfo userInfo; |
||||
//学生
|
||||
private Student student; |
||||
//员工
|
||||
private Staff staff; |
||||
//个人档案
|
||||
private UserProfiles userProfiles; |
||||
//组织架构关系
|
||||
private OrganizationRelationship organizationRelationship; |
||||
|
||||
private List<OrganizationRelationship> organizationRelationshipList; |
||||
private List<UserInfo> userInfoList; |
||||
private List<Student> studentList; |
||||
private List<Staff> staffList; |
||||
private List<UserProfiles> userProfilesList; |
||||
private List<StuStaff> stuStaffList; |
||||
|
||||
public OrganizationRelationship getOrganizationRelationship() { |
||||
return organizationRelationship; |
||||
} |
||||
|
||||
public void setOrganizationRelationship(OrganizationRelationship organizationRelationship) { |
||||
this.organizationRelationship = organizationRelationship; |
||||
} |
||||
|
||||
public List<OrganizationRelationship> getOrganizationRelationshipList() { |
||||
return organizationRelationshipList; |
||||
} |
||||
|
||||
public void setOrganizationRelationshipList(List<OrganizationRelationship> organizationRelationshipList) { |
||||
this.organizationRelationshipList = organizationRelationshipList; |
||||
} |
||||
|
||||
public List<StuStaff> getStuStaffList() { |
||||
return stuStaffList; |
||||
} |
||||
|
||||
public void setStuStaffList(List<StuStaff> stuStaffList) { |
||||
this.stuStaffList = stuStaffList; |
||||
} |
||||
|
||||
public UserProfiles getUserProfiles() { |
||||
return userProfiles; |
||||
} |
||||
|
||||
public void setUserProfiles(UserProfiles userProfiles) { |
||||
this.userProfiles = userProfiles; |
||||
} |
||||
|
||||
public List<UserProfiles> getUserProfilesList() { |
||||
return userProfilesList; |
||||
} |
||||
|
||||
public void setUserProfilesList(List<UserProfiles> userProfilesList) { |
||||
this.userProfilesList = userProfilesList; |
||||
} |
||||
|
||||
public UserInfo getUserInfo() { |
||||
return userInfo; |
||||
} |
||||
|
||||
public void setUserInfo(UserInfo userInfo) { |
||||
this.userInfo = userInfo; |
||||
} |
||||
|
||||
public Student getStudent() { |
||||
return student; |
||||
} |
||||
|
||||
public void setStudent(Student student) { |
||||
this.student = student; |
||||
} |
||||
|
||||
public Staff getStaff() { |
||||
return staff; |
||||
} |
||||
|
||||
public void setStaff(Staff staff) { |
||||
this.staff = staff; |
||||
} |
||||
|
||||
public List<UserInfo> getUserInfoList() { |
||||
return userInfoList; |
||||
} |
||||
|
||||
public void setUserInfoList(List<UserInfo> userInfoList) { |
||||
this.userInfoList = userInfoList; |
||||
} |
||||
|
||||
public List<Student> getStudentList() { |
||||
return studentList; |
||||
} |
||||
|
||||
public void setStudentList(List<Student> studentList) { |
||||
this.studentList = studentList; |
||||
} |
||||
|
||||
public List<Staff> getStaffList() { |
||||
return staffList; |
||||
} |
||||
|
||||
public void setStaffList(List<Staff> staffList) { |
||||
this.staffList = staffList; |
||||
} |
||||
} |
Loading…
Reference in new issue