| | |
| | | } |
| | | |
| | | /** |
| | | * 获取部门管理管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取部门管理列表") |
| | | @PostMapping(value = "/list") |
| | | public R<List<TDept>> list() { |
| | | return R.ok(deptService.list()); |
| | | } |
| | | |
| | | /** |
| | | * 添加部门管理管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:department:add')") |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @PutMapping("/changeStatus") |
| | | public AjaxResult changeStatus(@RequestBody SysUserUpdateStatusDTO dto) |
| | | { |
| | | SysUser loginUser = tokenService.getLoginUser().getUser(); |
| | | SysUser user = new SysUser(); |
| | | user.setUserId(dto.getUserId()); |
| | | user.setStatus(String.valueOf(dto.getStatus())); |
| | | user.setRemark(dto.getRemark()); |
| | | // user.setRemark(dto.getRemark()); |
| | | user.setUpdateBy(getUsername()); |
| | | user.setDisableRemark(dto.getRemark()); |
| | | user.setOperatingTime(LocalDateTime.now()); |
| | | user.setOperatingPerson(loginUser.getNickName()+"("+loginUser.getUserName()+")"); |
| | | return AjaxResult.success(userService.updateUserStatus(user)); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.common.core.domain; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * Entity基类 |
| | |
| | | /** 备注 */ |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "禁用备注") |
| | | @TableField("disable_remark") |
| | | private String disableRemark; |
| | | |
| | | @ApiModelProperty(value = "操作时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField("operating_time") |
| | | private LocalDateTime operatingTime; |
| | | |
| | | @ApiModelProperty(value = "操作人 登录名(登录账号)") |
| | | @TableField("operating_person") |
| | | private String operatingPerson; |
| | | |
| | | public String getDisableRemark() { |
| | | return disableRemark; |
| | | } |
| | | |
| | | public void setDisableRemark(String disableRemark) { |
| | | this.disableRemark = disableRemark; |
| | | } |
| | | |
| | | public LocalDateTime getOperatingTime() { |
| | | return operatingTime; |
| | | } |
| | | |
| | | public void setOperatingTime(LocalDateTime operatingTime) { |
| | | this.operatingTime = operatingTime; |
| | | } |
| | | |
| | | public String getOperatingPerson() { |
| | | return operatingPerson; |
| | | } |
| | | |
| | | public void setOperatingPerson(String operatingPerson) { |
| | | this.operatingPerson = operatingPerson; |
| | | } |
| | | |
| | | /** 请求参数 */ |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | private Map<String, Object> params; |
| | |
| | | select * from sys_user |
| | | </select> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.SysUserVO"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar,u.disable_remark AS disableRemark, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.operating_time AS operatingTime,u.operating_person AS operatingPerson, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId, |
| | | r.role_id AS roleId, r.role_name AS roleName, r.role_key AS roleKey, r.role_sort AS roleSort, r.data_scope AS dataScope, r.status as role_status,u.deptName as deptName |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | left join t_dept_to_user tdtu on u.user_id = tdtu.user_id |
| | | WHERE u.del_flag = 0 |
| | | <if test="query.nickNameOrPhone != null and query.nickNameOrPhone != ''"> |
| | | AND (u.nick_name LIKE concat('%',#{query.nickNameOrPhone},'%') |
| | |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="ifBlack != null">ifBlack = #{ifBlack},</if> |
| | | <if test="districtId != null">districtId = #{districtId},</if> |
| | | <if test="disableRemark != null">disable_remark = #{disableRemark},</if> |
| | | <if test="operatingTime != null">operating_time = #{operatingTime},</if> |
| | | <if test="operatingPerson != null">operating_person = #{operatingPerson},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |