Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
有来技术
youlai-mall
提交
f4146766
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 搜索 >>
提交
f4146766
编写于
7月 11, 2022
作者:
郝
郝先瑞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 商品分类API路径修改
上级
cce6b8f2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
9 deletion
+11
-9
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/PmsCategoryController.java
...ulai/mall/pms/controller/admin/PmsCategoryController.java
+9
-7
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsCategoryService.java
...java/com/youlai/mall/pms/service/IPmsCategoryService.java
+1
-1
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/impl/PmsCategoryServiceImpl.java
.../youlai/mall/pms/service/impl/PmsCategoryServiceImpl.java
+1
-1
未找到文件。
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/PmsCategoryController.java
浏览文件 @
f4146766
...
...
@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.AllArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -29,11 +30,11 @@ import java.util.List;
@Api
(
tags
=
"「管理端」商品分类"
)
@RestController
@RequestMapping
(
"/api/v1/categories"
)
@
All
ArgsConstructor
@
Required
ArgsConstructor
public
class
PmsCategoryController
{
private
IPmsCategoryService
iPmsCategoryService
;
private
IPmsAttributeService
iPmsAttributeService
;
private
final
IPmsCategoryService
iPmsCategoryService
;
private
final
IPmsAttributeService
iPmsAttributeService
;
@ApiOperation
(
value
=
"商品分类列表"
)
@GetMapping
...
...
@@ -43,9 +44,9 @@ public class PmsCategoryController {
}
@ApiOperation
(
value
=
"商品分类级联列表"
)
@GetMapping
(
"/
cascade
"
)
public
Result
listCa
scadeCategorie
s
()
{
List
list
=
iPmsCategoryService
.
listCa
scadeCategorie
s
();
@GetMapping
(
"/
options
"
)
public
Result
listCa
tegoryOption
s
()
{
List
list
=
iPmsCategoryService
.
listCa
tegoryOption
s
();
return
Result
.
success
(
list
);
}
...
...
@@ -82,7 +83,8 @@ public class PmsCategoryController {
@CacheEvict
(
value
=
"pms"
,
key
=
"'categoryList'"
)
public
Result
delete
(
@PathVariable
String
ids
)
{
List
<
String
>
categoryIds
=
Arrays
.
asList
(
ids
.
split
(
","
));
iPmsAttributeService
.
remove
(
new
LambdaQueryWrapper
<
PmsCategoryAttribute
>().
in
(
CollectionUtil
.
isNotEmpty
(
categoryIds
),
PmsCategoryAttribute:
:
getCategoryId
,
categoryIds
));
iPmsAttributeService
.
remove
(
new
LambdaQueryWrapper
<
PmsCategoryAttribute
>().
in
(
CollectionUtil
.
isNotEmpty
(
categoryIds
),
PmsCategoryAttribute:
:
getCategoryId
,
categoryIds
));
boolean
result
=
iPmsCategoryService
.
removeByIds
(
categoryIds
);
return
Result
.
judge
(
result
);
}
...
...
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsCategoryService.java
浏览文件 @
f4146766
...
...
@@ -28,7 +28,7 @@ public interface IPmsCategoryService extends IService<PmsCategory> {
* 分类列表(级联)
* @return
*/
List
<
Option
>
listCa
scadeCategorie
s
();
List
<
Option
>
listCa
tegoryOption
s
();
/**
...
...
mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/impl/PmsCategoryServiceImpl.java
浏览文件 @
f4146766
...
...
@@ -68,7 +68,7 @@ public class PmsCategoryServiceImpl extends ServiceImpl<PmsCategoryMapper, PmsCa
* @return
*/
@Override
public
List
<
Option
>
listCa
scadeCategorie
s
()
{
public
List
<
Option
>
listCa
tegoryOption
s
()
{
List
<
PmsCategory
>
categoryList
=
this
.
list
(
new
LambdaQueryWrapper
<
PmsCategory
>()
.
eq
(
PmsCategory:
:
getVisible
,
GlobalConstants
.
STATUS_YES
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录