Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
有来技术
youlai-mall
提交
fd3c0258
Y
youlai-mall
项目概览
有来技术
/
youlai-mall
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
youlai-mall
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fd3c0258
编写于
3月 01, 2021
作者:
H
haoxr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor:代码优化
上级
ee2969a3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
25 addition
and
23 deletion
+25
-23
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java
...com/youlai/mall/pms/controller/admin/BrandController.java
+1
-1
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/DeptController.java
...main/java/com/youlai/admin/controller/DeptController.java
+8
-7
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/DictController.java
...main/java/com/youlai/admin/controller/DictController.java
+1
-1
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/DictItemController.java
.../java/com/youlai/admin/controller/DictItemController.java
+1
-1
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/MenuController.java
...main/java/com/youlai/admin/controller/MenuController.java
+6
-10
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/MinIOController.java
...ain/java/com/youlai/admin/controller/MinIOController.java
+2
-2
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java
...main/java/com/youlai/admin/controller/UserController.java
+6
-1
未找到文件。
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java
浏览文件 @
fd3c0258
...
...
@@ -93,7 +93,7 @@ public class BrandController {
return
Result
.
judge
(
status
);
}
@ApiOperation
(
value
=
"修改品牌
(部分更新)
"
,
httpMethod
=
"PATCH"
)
@ApiOperation
(
value
=
"修改品牌"
,
httpMethod
=
"PATCH"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"用户id"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"brand"
,
value
=
"实体JSON对象"
,
required
=
true
,
paramType
=
"body"
,
dataType
=
"PmsBrand"
)
...
...
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/DeptController.java
浏览文件 @
fd3c0258
...
...
@@ -4,6 +4,8 @@ import cn.hutool.core.util.StrUtil;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.youlai.admin.common.constant.AdminConstant
;
import
com.youlai.admin.pojo.entity.SysDept
;
import
com.youlai.admin.pojo.vo.DeptVO
;
import
com.youlai.admin.pojo.vo.TreeVO
;
import
com.youlai.admin.service.ISysDeptService
;
import
com.youlai.common.enums.QueryModeEnum
;
import
com.youlai.common.result.Result
;
...
...
@@ -50,20 +52,19 @@ public class DeptController {
.
orderByDesc
(
SysDept:
:
getGmtCreate
);
QueryModeEnum
queryModeEnum
=
QueryModeEnum
.
getValue
(
queryMode
);
List
list
;
switch
(
queryModeEnum
)
{
case
LIST:
baseQuery
=
baseQuery
.
like
(
StrUtil
.
isNotBlank
(
name
),
SysDept:
:
getName
,
name
)
baseQuery
=
baseQuery
.
like
(
StrUtil
.
isNotBlank
(
name
),
SysDept:
:
getName
,
name
)
.
eq
(
status
!=
null
,
SysDept:
:
getStatus
,
status
);
list
=
iSysDeptService
.
listDeptVO
(
baseQuery
);
break
;
List
<
DeptVO
>
list
=
iSysDeptService
.
listDeptVO
(
baseQuery
);
return
Result
.
success
(
list
)
;
case
TREE:
l
ist
=
iSysDeptService
.
listTreeVO
(
baseQuery
);
break
;
List
<
TreeVO
>
treeL
ist
=
iSysDeptService
.
listTreeVO
(
baseQuery
);
return
Result
.
success
(
treeList
)
;
default
:
return
Result
.
failed
(
ResultCode
.
QUERY_MODE_IS_NULL
);
}
return
Result
.
success
(
list
);
}
@ApiOperation
(
value
=
"部门详情"
,
httpMethod
=
"GET"
)
...
...
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/DictController.java
浏览文件 @
fd3c0258
...
...
@@ -119,7 +119,7 @@ public class DictController {
return
Result
.
judge
(
status
);
}
@ApiOperation
(
value
=
"修改字典
(部分更新)
"
,
httpMethod
=
"PATCH"
)
@ApiOperation
(
value
=
"修改字典"
,
httpMethod
=
"PATCH"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"用户id"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"dictItem"
,
value
=
"实体JSON对象"
,
required
=
true
,
paramType
=
"body"
,
dataType
=
"SysDictItem"
)
...
...
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/DictItemController.java
浏览文件 @
fd3c0258
...
...
@@ -105,7 +105,7 @@ public class DictItemController {
}
@ApiOperation
(
value
=
"修改字典
(部分更新)
"
,
httpMethod
=
"PATCH"
)
@ApiOperation
(
value
=
"修改字典"
,
httpMethod
=
"PATCH"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"用户id"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"dictItem"
,
value
=
"实体JSON对象"
,
required
=
true
,
paramType
=
"body"
,
dataType
=
"SysDictItem"
)
...
...
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/MenuController.java
浏览文件 @
fd3c0258
...
...
@@ -98,27 +98,23 @@ public class MenuController {
}
@ApiOperation
(
value
=
"删除菜单"
,
httpMethod
=
"DELETE"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"id集合"
,
required
=
true
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"id集合
字符串,以,分割
"
,
required
=
true
,
paramType
=
"query"
,
dataType
=
"String"
)
@DeleteMapping
(
"/{ids}"
)
public
Result
delete
(
@PathVariable
(
"ids"
)
String
ids
)
{
boolean
status
=
iSysMenuService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
return
Result
.
judge
(
status
);
}
@ApiOperation
(
value
=
"修改菜单
【局部更新】
"
,
httpMethod
=
"PATCH"
)
@ApiOperation
(
value
=
"修改菜单"
,
httpMethod
=
"PATCH"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"用户id"
,
required
=
true
,
paramType
=
"path"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"menu"
,
value
=
"实体JSON对象"
,
required
=
true
,
paramType
=
"body"
,
dataType
=
"SysMenu"
)
})
@PatchMapping
(
value
=
"/{id}"
)
public
Result
patch
(
@PathVariable
Integer
id
,
@RequestBody
SysMenu
menu
)
{
LambdaUpdateWrapper
<
SysMenu
>
luw
=
new
LambdaUpdateWrapper
<
SysMenu
>().
eq
(
SysMenu:
:
getId
,
id
);
if
(
menu
.
getVisible
()
!=
null
)
{
// 状态更新
luw
.
set
(
SysMenu:
:
getVisible
,
menu
.
getVisible
());
}
else
{
return
Result
.
success
();
}
boolean
update
=
iSysMenuService
.
update
(
luw
);
return
Result
.
success
(
update
);
LambdaUpdateWrapper
<
SysMenu
>
updateWrapper
=
new
LambdaUpdateWrapper
<
SysMenu
>().
eq
(
SysMenu:
:
getId
,
id
);
updateWrapper
.
set
(
menu
.
getVisible
()
!=
null
,
SysMenu:
:
getVisible
,
menu
.
getVisible
());
boolean
result
=
iSysMenuService
.
update
(
updateWrapper
);
return
Result
.
judge
(
result
);
}
}
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/MinIOController.java
浏览文件 @
fd3c0258
...
...
@@ -27,11 +27,11 @@ public class MinIOController {
@ApiOperation
(
value
=
"文件上传"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"file"
,
value
=
"文件"
,
paramType
=
"form"
,
dataType
=
"__file"
),
@ApiImplicitParam
(
name
=
"bucket
_n
ame"
,
value
=
"桶名称"
,
paramType
=
"query"
,
dataType
=
"string"
)
@ApiImplicitParam
(
name
=
"bucket
N
ame"
,
value
=
"桶名称"
,
paramType
=
"query"
,
dataType
=
"string"
)
})
public
Result
<
String
>
upload
(
@RequestParam
(
value
=
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"bucket
_n
ame"
,
required
=
false
,
defaultValue
=
"default"
)
String
bucketName
@RequestParam
(
value
=
"bucket
N
ame"
,
required
=
false
,
defaultValue
=
"default"
)
String
bucketName
)
{
try
{
String
suffix
=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
)
+
1
);
...
...
youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java
浏览文件 @
fd3c0258
...
...
@@ -170,14 +170,19 @@ public class UserController extends BaseController {
public
Result
<
UserVO
>
getCurrentUser
()
{
UserVO
userVO
=
new
UserVO
();
// 用户基本信息
Long
userId
=
RequestUtils
.
getUserId
();
SysUser
user
=
iSysUserService
.
getById
(
userId
);
BeanUtil
.
copyProperties
(
user
,
userVO
);
// 用户角色信息
List
<
Long
>
roleIds
=
RequestUtils
.
getRoleIds
();
List
<
String
>
perms
=
iSysPermissionService
.
listPermsByRoleIds
(
roleIds
,
PermTypeEnum
.
BUTTON
.
getValue
());
userVO
.
setRoles
(
roleIds
);
// 用户按钮权限信息
List
<
String
>
perms
=
iSysPermissionService
.
listPermsByRoleIds
(
roleIds
,
PermTypeEnum
.
BUTTON
.
getValue
());
userVO
.
setPerms
(
perms
);
return
Result
.
success
(
userVO
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录