From 3ba8323cb7cc42f1441a41d998dad3e5512dbbae Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: 星期一, 30 一月 2023 20:10:16 +0800 Subject: [PATCH] update 修改 BaseEntity 创建人, 修改人字段类型, 修改相关 LambdaQueryWrapper 类型判断 ; update 修改 CreateAndUpdateMetaObjectHandler#insertFill 字段填充保存相关参数id ; --- ruoyi-ui/src/api/system/user.js | 279 +++++++++++++++++++++++++++---------------------------- 1 files changed, 135 insertions(+), 144 deletions(-) diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index 85bdc19..f2f76ef 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -1,144 +1,135 @@ -import request from '@/utils/request' -import { praseStrEmpty } from "@/utils/ruoyi"; - -// 鏌ヨ鐢ㄦ埛鍒楄〃 -export function listUser(query) { - return request({ - url: '/system/user/list', - method: 'get', - params: query - }) -} - -// 鏌ヨ鐢ㄦ埛璇︾粏 -export function getUser(userId) { - return request({ - url: '/system/user/' + praseStrEmpty(userId), - method: 'get' - }) -} - -// 鏂板鐢ㄦ埛 -export function addUser(data) { - return request({ - url: '/system/user', - method: 'post', - data: data - }) -} - -// 淇敼鐢ㄦ埛 -export function updateUser(data) { - return request({ - url: '/system/user', - method: 'put', - data: data - }) -} - -// 鍒犻櫎鐢ㄦ埛 -export function delUser(userId) { - return request({ - url: '/system/user/' + userId, - method: 'delete' - }) -} - -// 瀵煎嚭鐢ㄦ埛 -export function exportUser(query) { - return request({ - url: '/system/user/export', - method: 'get', - params: query - }) -} - -// 鐢ㄦ埛瀵嗙爜閲嶇疆 -export function resetUserPwd(userId, password) { - const data = { - userId, - password - } - return request({ - url: '/system/user/resetPwd', - method: 'put', - data: data - }) -} - -// 鐢ㄦ埛鐘舵�佷慨鏀� -export function changeUserStatus(userId, status) { - const data = { - userId, - status - } - return request({ - url: '/system/user/changeStatus', - method: 'put', - data: data - }) -} - -// 鏌ヨ鐢ㄦ埛涓汉淇℃伅 -export function getUserProfile() { - return request({ - url: '/system/user/profile', - method: 'get' - }) -} - -// 淇敼鐢ㄦ埛涓汉淇℃伅 -export function updateUserProfile(data) { - return request({ - url: '/system/user/profile', - method: 'put', - data: data - }) -} - -// 鐢ㄦ埛瀵嗙爜閲嶇疆 -export function updateUserPwd(oldPassword, newPassword) { - const data = { - oldPassword, - newPassword - } - return request({ - url: '/system/user/profile/updatePwd', - method: 'put', - params: data - }) -} - -// 鐢ㄦ埛澶村儚涓婁紶 -export function uploadAvatar(data) { - return request({ - url: '/system/user/profile/avatar', - method: 'post', - data: data - }) -} - -// 涓嬭浇鐢ㄦ埛瀵煎叆妯℃澘 -export function importTemplate() { - return request({ - url: '/system/user/importTemplate', - method: 'get' - }) -} - -// 鏌ヨ鎺堟潈瑙掕壊 -export function getAuthRole(userId) { - return request({ - url: '/system/user/authRole/' + userId, - method: 'get' - }) -} - -// 淇濆瓨鎺堟潈瑙掕壊 -export function updateAuthRole(data) { - return request({ - url: '/system/user/authRole', - method: 'put', - params: data - }) -} +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi"; + +// 鏌ヨ鐢ㄦ埛鍒楄〃 +export function listUser(query) { + return request({ + url: '/system/user/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鐢ㄦ埛璇︾粏 +export function getUser(userId) { + return request({ + url: '/system/user/' + parseStrEmpty(userId), + method: 'get' + }) +} + +// 鏂板鐢ㄦ埛 +export function addUser(data) { + return request({ + url: '/system/user', + method: 'post', + data: data + }) +} + +// 淇敼鐢ㄦ埛 +export function updateUser(data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鐢ㄦ埛 +export function delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + +// 鐢ㄦ埛瀵嗙爜閲嶇疆 +export function resetUserPwd(userId, password) { + const data = { + userId, + password + } + return request({ + url: '/system/user/resetPwd', + method: 'put', + data: data + }) +} + +// 鐢ㄦ埛鐘舵�佷慨鏀� +export function changeUserStatus(userId, status) { + const data = { + userId, + status + } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) +} + +// 鏌ヨ鐢ㄦ埛涓汉淇℃伅 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 淇敼鐢ㄦ埛涓汉淇℃伅 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 鐢ㄦ埛瀵嗙爜閲嶇疆 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + params: data + }) +} + +// 鐢ㄦ埛澶村儚涓婁紶 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + data: data + }) +} + +// 鏌ヨ鎺堟潈瑙掕壊 +export function getAuthRole(userId) { + return request({ + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 淇濆瓨鎺堟潈瑙掕壊 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + +// 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� +export function deptTreeSelect() { + return request({ + url: '/system/user/deptTree', + method: 'get' + }) +} -- Gitblit v1.9.3