20200424-lc-1
增加教师管理关联用户显示和修改功能
This commit is contained in:
		| @@ -1,8 +1,12 @@ | ||||
| package com.ruoyi.project.system.controller; | ||||
|  | ||||
| import java.util.Date; | ||||
| import java.util.List; | ||||
|  | ||||
| import com.ruoyi.project.common.SchoolCommon; | ||||
| import com.ruoyi.project.system.domain.ByTeacherJbxx; | ||||
| import com.ruoyi.project.system.service.*; | ||||
| import com.ruoyi.project.system.service.impl.ByTeacherJbxxServiceImpl; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.security.access.prepost.PreAuthorize; | ||||
| import org.springframework.validation.annotation.Validated; | ||||
| @@ -28,9 +32,6 @@ import com.ruoyi.framework.web.controller.BaseController; | ||||
| import com.ruoyi.framework.web.domain.AjaxResult; | ||||
| import com.ruoyi.framework.web.page.TableDataInfo; | ||||
| import com.ruoyi.project.system.domain.SysUser; | ||||
| import com.ruoyi.project.system.service.ISysPostService; | ||||
| import com.ruoyi.project.system.service.ISysRoleService; | ||||
| import com.ruoyi.project.system.service.ISysUserService; | ||||
|  | ||||
| /** | ||||
|  * 用户信息 | ||||
| @@ -47,6 +48,9 @@ public class SysUserController extends BaseController | ||||
|     @Autowired | ||||
|     private ISysRoleService roleService; | ||||
|  | ||||
|     @Autowired | ||||
|     private IByTeacherJbxxService byTeacherJbxxService; | ||||
|  | ||||
|     @Autowired | ||||
|     private ISysPostService postService; | ||||
|  | ||||
| @@ -56,6 +60,11 @@ public class SysUserController extends BaseController | ||||
|     @Autowired | ||||
|     private SchoolCommon schoolCommon; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|     /** | ||||
|      * 获取用户列表 | ||||
|      */ | ||||
| @@ -106,8 +115,10 @@ public class SysUserController extends BaseController | ||||
|     public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) | ||||
|     { | ||||
|         AjaxResult ajax = AjaxResult.success(); | ||||
|         //在添加用户时判断是否为幼儿园平台 | ||||
|         if(schoolCommon.isSchool()==true) | ||||
|         { | ||||
|             //只显示幼儿园相关的岗位和角色 | ||||
|             ajax.put("roles", roleService.selectYeyRoleAll()); | ||||
|             ajax.put("posts", postService.selectYeyPostAll()); | ||||
|         }else { | ||||
| @@ -115,6 +126,7 @@ public class SysUserController extends BaseController | ||||
|             ajax.put("posts", postService.selectPostAll()); | ||||
|         } | ||||
|  | ||||
|         //在修改用户时判断是否为幼儿园平台 | ||||
|         if (StringUtils.isNotNull(userId)) | ||||
|         { | ||||
|             if (schoolCommon.isSchool()==true) | ||||
| @@ -156,7 +168,18 @@ public class SysUserController extends BaseController | ||||
|         user.setEmail(user.getUserName()+"@benyi.com"); | ||||
|         user.setCreateBy(SecurityUtils.getUsername()); | ||||
|         user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); | ||||
|         return toAjax(userService.insertUser(user)); | ||||
|         int bl = userService.insertUser(user); | ||||
|         if (bl>0) | ||||
|         { | ||||
|             ByTeacherJbxx byTeacherJbxx = new ByTeacherJbxx(); | ||||
|             //并赋值给教师userid | ||||
|             byTeacherJbxx.setUserid(user.getUserId()); | ||||
|             byTeacherJbxx.setCreatetime(new Date()); | ||||
|             //插入数据到教师表 | ||||
|             byTeacherJbxxService.insertByTeacherJbxx(byTeacherJbxx); | ||||
|         } | ||||
|         return toAjax(bl); | ||||
|  | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -1,12 +1,14 @@ | ||||
| package com.ruoyi.project.system.domain; | ||||
|  | ||||
|  | ||||
| import com.fasterxml.jackson.annotation.JsonFormat; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel; | ||||
| import com.ruoyi.framework.web.domain.BaseEntity; | ||||
| import java.util.Date; | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * 教师基本信息对象 by_teacher_jbxx | ||||
|  *  | ||||
| @@ -30,6 +32,7 @@ public class ByTeacherJbxx extends BaseEntity | ||||
|  | ||||
|     /** 出生日期 */ | ||||
|     @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd") | ||||
|     private Date csrq; | ||||
|  | ||||
|     /** 毕业院校 */ | ||||
| @@ -50,6 +53,7 @@ public class ByTeacherJbxx extends BaseEntity | ||||
|  | ||||
|     /** 参加工作日期 */ | ||||
|     @Excel(name = "参加工作日期", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd") | ||||
|     private Date cjgzrq; | ||||
|  | ||||
|     /** 资格证书 */ | ||||
| @@ -62,6 +66,7 @@ public class ByTeacherJbxx extends BaseEntity | ||||
|  | ||||
|     //创建时间 | ||||
|     @Excel(name = "创建时间") | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||||
|     private Date createtime; | ||||
|  | ||||
|     /** user对象 */ | ||||
|   | ||||
| @@ -1,326 +1,338 @@ | ||||
| package com.ruoyi.project.system.domain; | ||||
|  | ||||
| import java.util.Date; | ||||
| import java.util.List; | ||||
| import javax.validation.constraints.Email; | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import javax.validation.constraints.Size; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel.Type; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excels; | ||||
| import com.ruoyi.framework.web.domain.BaseEntity; | ||||
|  | ||||
| /** | ||||
|  * 用户对象 sys_user | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class SysUser extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 用户ID */ | ||||
|     @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号") | ||||
|     private Long userId; | ||||
|  | ||||
|     /** 部门ID */ | ||||
|     @Excel(name = "部门编号", type = Type.IMPORT) | ||||
|     private Long deptId; | ||||
|  | ||||
|     /** 用户账号 */ | ||||
|     @Excel(name = "登录名称") | ||||
|     private String userName; | ||||
|  | ||||
|     /** 用户昵称 */ | ||||
|     @Excel(name = "用户名称") | ||||
|     private String nickName; | ||||
|  | ||||
|     /** 用户邮箱 */ | ||||
|     @Excel(name = "用户邮箱") | ||||
|     private String email; | ||||
|  | ||||
|     /** 手机号码 */ | ||||
|     @Excel(name = "手机号码") | ||||
|     private String phonenumber; | ||||
|  | ||||
|     /** 用户性别 */ | ||||
|     @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") | ||||
|     private String sex; | ||||
|  | ||||
|     /** 用户头像 */ | ||||
|     private String avatar; | ||||
|  | ||||
|     /** 密码 */ | ||||
|     private String password; | ||||
|  | ||||
|     /** 盐加密 */ | ||||
|     private String salt; | ||||
|  | ||||
|     /** 帐号状态(0正常 1停用) */ | ||||
|     @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") | ||||
|     private String status; | ||||
|  | ||||
|     /** 删除标志(0代表存在 2代表删除) */ | ||||
|     private String delFlag; | ||||
|  | ||||
|     /** 最后登陆IP */ | ||||
|     @Excel(name = "最后登陆IP", type = Type.EXPORT) | ||||
|     private String loginIp; | ||||
|  | ||||
|     /** 最后登陆时间 */ | ||||
|     @Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) | ||||
|     private Date loginDate; | ||||
|  | ||||
|     /** 部门对象 */ | ||||
|     @Excels({ | ||||
|         @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), | ||||
|         @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) | ||||
|     }) | ||||
|     private SysDept dept; | ||||
|  | ||||
|     /** 角色对象 */ | ||||
|     private List<SysRole> roles; | ||||
|  | ||||
|     /** 角色组 */ | ||||
|     private Long[] roleIds; | ||||
|  | ||||
|     /** 岗位组 */ | ||||
|     private Long[] postIds; | ||||
|  | ||||
|     public SysUser() | ||||
|     { | ||||
|  | ||||
|     } | ||||
|  | ||||
|     public SysUser(Long userId) | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public Long getUserId() | ||||
|     { | ||||
|         return userId; | ||||
|     } | ||||
|  | ||||
|     public void setUserId(Long userId) | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public boolean isAdmin() | ||||
|     { | ||||
|         return isAdmin(this.userId); | ||||
|     } | ||||
|  | ||||
|     public static boolean isAdmin(Long userId) | ||||
|     { | ||||
|         return userId != null && 1L == userId; | ||||
|     } | ||||
|  | ||||
|     public Long getDeptId() | ||||
|     { | ||||
|         return deptId; | ||||
|     } | ||||
|  | ||||
|     public void setDeptId(Long deptId) | ||||
|     { | ||||
|         this.deptId = deptId; | ||||
|     } | ||||
|  | ||||
|     @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") | ||||
|     public String getNickName() | ||||
|     { | ||||
|         return nickName; | ||||
|     } | ||||
|  | ||||
|     public void setNickName(String nickName) | ||||
|     { | ||||
|         this.nickName = nickName; | ||||
|     } | ||||
|  | ||||
|     @NotBlank(message = "用户账号不能为空") | ||||
|     @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") | ||||
|     public String getUserName() | ||||
|     { | ||||
|         return userName; | ||||
|     } | ||||
|  | ||||
|     public void setUserName(String userName) | ||||
|     { | ||||
|         this.userName = userName; | ||||
|     } | ||||
|  | ||||
|     @Email(message = "邮箱格式不正确") | ||||
|     @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") | ||||
|     public String getEmail() | ||||
|     { | ||||
|         return email; | ||||
|     } | ||||
|  | ||||
|     public void setEmail(String email) | ||||
|     { | ||||
|         this.email = email; | ||||
|     } | ||||
|  | ||||
|     @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") | ||||
|     public String getPhonenumber() | ||||
|     { | ||||
|         return phonenumber; | ||||
|     } | ||||
|  | ||||
|     public void setPhonenumber(String phonenumber) | ||||
|     { | ||||
|         this.phonenumber = phonenumber; | ||||
|     } | ||||
|  | ||||
|     public String getSex() | ||||
|     { | ||||
|         return sex; | ||||
|     } | ||||
|  | ||||
|     public void setSex(String sex) | ||||
|     { | ||||
|         this.sex = sex; | ||||
|     } | ||||
|  | ||||
|     public String getAvatar() | ||||
|     { | ||||
|         return avatar; | ||||
|     } | ||||
|  | ||||
|     public void setAvatar(String avatar) | ||||
|     { | ||||
|         this.avatar = avatar; | ||||
|     } | ||||
|  | ||||
|     @JsonProperty | ||||
|     public String getPassword() | ||||
|     { | ||||
|         return password; | ||||
|     } | ||||
|  | ||||
|     public void setPassword(String password) | ||||
|     { | ||||
|         this.password = password; | ||||
|     } | ||||
|  | ||||
|     public String getSalt() | ||||
|     { | ||||
|         return salt; | ||||
|     } | ||||
|  | ||||
|     public void setSalt(String salt) | ||||
|     { | ||||
|         this.salt = salt; | ||||
|     } | ||||
|  | ||||
|     public String getStatus() | ||||
|     { | ||||
|         return status; | ||||
|     } | ||||
|  | ||||
|     public void setStatus(String status) | ||||
|     { | ||||
|         this.status = status; | ||||
|     } | ||||
|  | ||||
|     public String getDelFlag() | ||||
|     { | ||||
|         return delFlag; | ||||
|     } | ||||
|  | ||||
|     public void setDelFlag(String delFlag) | ||||
|     { | ||||
|         this.delFlag = delFlag; | ||||
|     } | ||||
|  | ||||
|     public String getLoginIp() | ||||
|     { | ||||
|         return loginIp; | ||||
|     } | ||||
|  | ||||
|     public void setLoginIp(String loginIp) | ||||
|     { | ||||
|         this.loginIp = loginIp; | ||||
|     } | ||||
|  | ||||
|     public Date getLoginDate() | ||||
|     { | ||||
|         return loginDate; | ||||
|     } | ||||
|  | ||||
|     public void setLoginDate(Date loginDate) | ||||
|     { | ||||
|         this.loginDate = loginDate; | ||||
|     } | ||||
|  | ||||
|     public SysDept getDept() | ||||
|     { | ||||
|         return dept; | ||||
|     } | ||||
|  | ||||
|     public void setDept(SysDept dept) | ||||
|     { | ||||
|         this.dept = dept; | ||||
|     } | ||||
|  | ||||
|     public List<SysRole> getRoles() | ||||
|     { | ||||
|         return roles; | ||||
|     } | ||||
|  | ||||
|     public void setRoles(List<SysRole> roles) | ||||
|     { | ||||
|         this.roles = roles; | ||||
|     } | ||||
|  | ||||
|     public Long[] getRoleIds() | ||||
|     { | ||||
|         return roleIds; | ||||
|     } | ||||
|  | ||||
|     public void setRoleIds(Long[] roleIds) | ||||
|     { | ||||
|         this.roleIds = roleIds; | ||||
|     } | ||||
|  | ||||
|     public Long[] getPostIds() | ||||
|     { | ||||
|         return postIds; | ||||
|     } | ||||
|  | ||||
|     public void setPostIds(Long[] postIds) | ||||
|     { | ||||
|         this.postIds = postIds; | ||||
|     } | ||||
|      | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("userId", getUserId()) | ||||
|             .append("deptId", getDeptId()) | ||||
|             .append("userName", getUserName()) | ||||
|             .append("nickName", getNickName()) | ||||
|             .append("email", getEmail()) | ||||
|             .append("phonenumber", getPhonenumber()) | ||||
|             .append("sex", getSex()) | ||||
|             .append("avatar", getAvatar()) | ||||
|             .append("password", getPassword()) | ||||
|             .append("salt", getSalt()) | ||||
|             .append("status", getStatus()) | ||||
|             .append("delFlag", getDelFlag()) | ||||
|             .append("loginIp", getLoginIp()) | ||||
|             .append("loginDate", getLoginDate()) | ||||
|             .append("createBy", getCreateBy()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .append("updateBy", getUpdateBy()) | ||||
|             .append("updateTime", getUpdateTime()) | ||||
|             .append("remark", getRemark()) | ||||
|             .append("dept", getDept()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| package com.ruoyi.project.system.domain; | ||||
|  | ||||
| import java.util.Date; | ||||
| import java.util.List; | ||||
| import javax.validation.constraints.Email; | ||||
| import javax.validation.constraints.NotBlank; | ||||
| import javax.validation.constraints.Size; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excel.Type; | ||||
| import com.ruoyi.framework.aspectj.lang.annotation.Excels; | ||||
| import com.ruoyi.framework.web.domain.BaseEntity; | ||||
|  | ||||
| /** | ||||
|  * 用户对象 sys_user | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class SysUser extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 用户ID */ | ||||
|     @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号") | ||||
|     private Long userId; | ||||
|  | ||||
|     /** 部门ID */ | ||||
|     @Excel(name = "部门编号", type = Type.IMPORT) | ||||
|     private Long deptId; | ||||
|  | ||||
|     /** 用户账号 */ | ||||
|     @Excel(name = "登录名称") | ||||
|     private String userName; | ||||
|  | ||||
|     /** 用户昵称 */ | ||||
|     @Excel(name = "用户名称") | ||||
|     private String nickName; | ||||
|  | ||||
|     /** 用户邮箱 */ | ||||
|     @Excel(name = "用户邮箱") | ||||
|     private String email; | ||||
|  | ||||
|     /** 手机号码 */ | ||||
|     @Excel(name = "手机号码") | ||||
|     private String phonenumber; | ||||
|  | ||||
|     /** 用户性别 */ | ||||
|     @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") | ||||
|     private String sex; | ||||
|  | ||||
|     /** 用户头像 */ | ||||
|     private String avatar; | ||||
|  | ||||
|     /** 密码 */ | ||||
|     private String password; | ||||
|  | ||||
|     /** 盐加密 */ | ||||
|     private String salt; | ||||
|  | ||||
|     /** 帐号状态(0正常 1停用) */ | ||||
|     @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") | ||||
|     private String status; | ||||
|  | ||||
|     /** 删除标志(0代表存在 2代表删除) */ | ||||
|     private String delFlag; | ||||
|  | ||||
|     /** 最后登陆IP */ | ||||
|     @Excel(name = "最后登陆IP", type = Type.EXPORT) | ||||
|     private String loginIp; | ||||
|  | ||||
|     /** 最后登陆时间 */ | ||||
|     @Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) | ||||
|     private Date loginDate; | ||||
|  | ||||
|     /** 部门对象 */ | ||||
|     @Excels({ | ||||
|         @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), | ||||
|         @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) | ||||
|     }) | ||||
|     private SysDept dept; | ||||
|  | ||||
|     /** 角色对象 */ | ||||
|     private List<SysRole> roles; | ||||
|  | ||||
|     /** 角色组 */ | ||||
|     private Long[] roleIds; | ||||
|  | ||||
|     /** 岗位组 */ | ||||
|     private Long[] postIds; | ||||
|  | ||||
|     /**教师对象*/ | ||||
|     private ByTeacherJbxx byTeacherJbxx; | ||||
|  | ||||
|     public SysUser() | ||||
|     { | ||||
|  | ||||
|     } | ||||
|  | ||||
|     public SysUser(Long userId) | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public Long getUserId() | ||||
|     { | ||||
|         return userId; | ||||
|     } | ||||
|  | ||||
|     public void setUserId(Long userId) | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public boolean isAdmin() | ||||
|     { | ||||
|         return isAdmin(this.userId); | ||||
|     } | ||||
|  | ||||
|     public static boolean isAdmin(Long userId) | ||||
|     { | ||||
|         return userId != null && 1L == userId; | ||||
|     } | ||||
|  | ||||
|     public Long getDeptId() | ||||
|     { | ||||
|         return deptId; | ||||
|     } | ||||
|  | ||||
|     public void setDeptId(Long deptId) | ||||
|     { | ||||
|         this.deptId = deptId; | ||||
|     } | ||||
|  | ||||
|     @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") | ||||
|     public String getNickName() | ||||
|     { | ||||
|         return nickName; | ||||
|     } | ||||
|  | ||||
|     public void setNickName(String nickName) | ||||
|     { | ||||
|         this.nickName = nickName; | ||||
|     } | ||||
|  | ||||
|     @NotBlank(message = "用户账号不能为空") | ||||
|     @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") | ||||
|     public String getUserName() | ||||
|     { | ||||
|         return userName; | ||||
|     } | ||||
|  | ||||
|     public void setUserName(String userName) | ||||
|     { | ||||
|         this.userName = userName; | ||||
|     } | ||||
|  | ||||
|     @Email(message = "邮箱格式不正确") | ||||
|     @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") | ||||
|     public String getEmail() | ||||
|     { | ||||
|         return email; | ||||
|     } | ||||
|  | ||||
|     public void setEmail(String email) | ||||
|     { | ||||
|         this.email = email; | ||||
|     } | ||||
|  | ||||
|     @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") | ||||
|     public String getPhonenumber() | ||||
|     { | ||||
|         return phonenumber; | ||||
|     } | ||||
|  | ||||
|     public void setPhonenumber(String phonenumber) | ||||
|     { | ||||
|         this.phonenumber = phonenumber; | ||||
|     } | ||||
|  | ||||
|     public String getSex() | ||||
|     { | ||||
|         return sex; | ||||
|     } | ||||
|  | ||||
|     public void setSex(String sex) | ||||
|     { | ||||
|         this.sex = sex; | ||||
|     } | ||||
|  | ||||
|     public String getAvatar() | ||||
|     { | ||||
|         return avatar; | ||||
|     } | ||||
|  | ||||
|     public void setAvatar(String avatar) | ||||
|     { | ||||
|         this.avatar = avatar; | ||||
|     } | ||||
|  | ||||
|     @JsonProperty | ||||
|     public String getPassword() | ||||
|     { | ||||
|         return password; | ||||
|     } | ||||
|  | ||||
|     public void setPassword(String password) | ||||
|     { | ||||
|         this.password = password; | ||||
|     } | ||||
|  | ||||
|     public String getSalt() | ||||
|     { | ||||
|         return salt; | ||||
|     } | ||||
|  | ||||
|     public void setSalt(String salt) | ||||
|     { | ||||
|         this.salt = salt; | ||||
|     } | ||||
|  | ||||
|     public String getStatus() | ||||
|     { | ||||
|         return status; | ||||
|     } | ||||
|  | ||||
|     public void setStatus(String status) | ||||
|     { | ||||
|         this.status = status; | ||||
|     } | ||||
|  | ||||
|     public String getDelFlag() | ||||
|     { | ||||
|         return delFlag; | ||||
|     } | ||||
|  | ||||
|     public void setDelFlag(String delFlag) | ||||
|     { | ||||
|         this.delFlag = delFlag; | ||||
|     } | ||||
|  | ||||
|     public String getLoginIp() | ||||
|     { | ||||
|         return loginIp; | ||||
|     } | ||||
|  | ||||
|     public void setLoginIp(String loginIp) | ||||
|     { | ||||
|         this.loginIp = loginIp; | ||||
|     } | ||||
|  | ||||
|     public Date getLoginDate() | ||||
|     { | ||||
|         return loginDate; | ||||
|     } | ||||
|  | ||||
|     public void setLoginDate(Date loginDate) | ||||
|     { | ||||
|         this.loginDate = loginDate; | ||||
|     } | ||||
|  | ||||
|     public SysDept getDept() | ||||
|     { | ||||
|         return dept; | ||||
|     } | ||||
|  | ||||
|     public void setDept(SysDept dept) | ||||
|     { | ||||
|         this.dept = dept; | ||||
|     } | ||||
|  | ||||
|     public List<SysRole> getRoles() | ||||
|     { | ||||
|         return roles; | ||||
|     } | ||||
|  | ||||
|     public void setRoles(List<SysRole> roles) | ||||
|     { | ||||
|         this.roles = roles; | ||||
|     } | ||||
|  | ||||
|     public Long[] getRoleIds() | ||||
|     { | ||||
|         return roleIds; | ||||
|     } | ||||
|  | ||||
|     public void setRoleIds(Long[] roleIds) | ||||
|     { | ||||
|         this.roleIds = roleIds; | ||||
|     } | ||||
|  | ||||
|     public Long[] getPostIds() | ||||
|     { | ||||
|         return postIds; | ||||
|     } | ||||
|  | ||||
|     public void setPostIds(Long[] postIds) | ||||
|     { | ||||
|         this.postIds = postIds; | ||||
|     } | ||||
|      | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("userId", getUserId()) | ||||
|             .append("deptId", getDeptId()) | ||||
|             .append("userName", getUserName()) | ||||
|             .append("nickName", getNickName()) | ||||
|             .append("email", getEmail()) | ||||
|             .append("phonenumber", getPhonenumber()) | ||||
|             .append("sex", getSex()) | ||||
|             .append("avatar", getAvatar()) | ||||
|             .append("password", getPassword()) | ||||
|             .append("salt", getSalt()) | ||||
|             .append("status", getStatus()) | ||||
|             .append("delFlag", getDelFlag()) | ||||
|             .append("loginIp", getLoginIp()) | ||||
|             .append("loginDate", getLoginDate()) | ||||
|             .append("createBy", getCreateBy()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .append("updateBy", getUpdateBy()) | ||||
|             .append("updateTime", getUpdateTime()) | ||||
|             .append("remark", getRemark()) | ||||
|             .append("dept", getDept()) | ||||
|             .append("byTeacherJbxx", getByTeacherJbxx()) | ||||
|             .toString(); | ||||
|     } | ||||
|  | ||||
|     public ByTeacherJbxx getByTeacherJbxx() { | ||||
|         return byTeacherJbxx; | ||||
|     } | ||||
|  | ||||
|     public void setByTeacherJbxx(ByTeacherJbxx byTeacherJbxx) { | ||||
|         this.byTeacherJbxx = byTeacherJbxx; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -43,9 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|  | ||||
|     <sql id="selectByTeacherJbxxVo"> | ||||
|         select t.id, t.userid, t.zjhm, t.csrq, t.byyx, t.zy, t.xl, t.xw, t.cjgzrq, t.zgzs, t.createuserid, t.createtime, | ||||
|         u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.sex, u.status as user_status | ||||
|         u.user_id, u.nick_name, u.status as user_status | ||||
|         from by_teacher_jbxx t | ||||
|             left join sys_user u on t.userid = u.user_id | ||||
|             right join sys_user u on t.userid = u.user_id | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectByTeacherJbxxList" parameterType="ByTeacherJbxx" resultMap="ByTeacherJbxxResult"> | ||||
|   | ||||
| @@ -58,11 +58,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
| 	 | ||||
| 	<select id="selectRoleAll" resultMap="SysRoleResult"> | ||||
| 		<include refid="selectRoleVo"/> | ||||
| 		WHERE r.del_flag = '0' | ||||
| 	</select> | ||||
|  | ||||
| 	<select id="selectYeyRoleAll" resultMap="SysRoleResult"> | ||||
| 		<include refid="selectRoleVo"/> | ||||
| 		where r.purpose = '1' | ||||
| 		where r.purpose = '1' and r.del_flag = '0' | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectRoleListByUserId" parameterType="Long" resultType="Integer"> | ||||
| @@ -70,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|         from sys_role r | ||||
| 	        left join sys_user_role ur on ur.role_id = r.role_id | ||||
| 	        left join sys_user u on u.user_id = ur.user_id | ||||
| 	    where u.user_id = #{userId} | ||||
| 	    where u.user_id = #{userId} and r.del_flag = '0' | ||||
| 	</select> | ||||
|  | ||||
| 	<select id="selectYeyRoleListByUserId" parameterType="Long" resultType="Integer"> | ||||
| @@ -78,12 +79,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
|         from sys_role r | ||||
| 	        left join sys_user_role ur on ur.role_id = r.role_id | ||||
| 	        left join sys_user u on u.user_id = ur.user_id | ||||
| 	    where r.purpose = '1' and u.user_id = #{userId} | ||||
| 	    where r.purpose = '1' and u.user_id = #{userId} and r.del_flag = '0' | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult"> | ||||
| 		<include refid="selectRoleVo"/> | ||||
| 		where r.role_id = #{roleId} | ||||
| 		where r.role_id = #{roleId} and r.del_flag = '0' | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user