记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
471ba942
Commit
471ba942
authored
Jan 14, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+API:店铺管理:商品分类:筛选;
parent
d06b5b8c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
GoblinSelfCategoryAdminController.java
...er/zhengzai/goblin/GoblinSelfCategoryAdminController.java
+33
-1
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfCategoryAdminController.java
View file @
471ba942
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
goblin
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.github.pagehelper.PageHelper
;
import
com.liquidnet.client.admin.common.annotation.Log
;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
...
...
@@ -44,6 +46,37 @@ public class GoblinSelfCategoryAdminController extends BaseController {
return
getDataTable
(
goblinSelfGoodsCategoryService
.
listForForMultiGrade
());
}
@ApiOperation
(
value
=
"筛选"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"grade"
,
value
=
"分类层级[1-一级|2-二级|3-三级]"
,
allowableValues
=
"1,2,3"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
false
,
dataType
=
"String"
,
name
=
"cateId"
,
value
=
"分类父ID[30]"
),
})
@Log
(
title
=
"店铺管理:商品分类:筛选"
,
businessType
=
BusinessType
.
DELETE
)
@RequiresPermissions
(
"goblin:category:select"
)
@PostMapping
(
"select"
)
@ResponseBody
public
AjaxResult
select
(
@RequestParam
String
grade
,
@RequestParam
String
cateId
)
{
LambdaQueryWrapper
<
GoblinSelfGoodsCategory
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinSelfGoodsCategory
.
class
);
switch
(
grade
)
{
case
"1"
:
break
;
case
"2"
:
case
"3"
:
if
(
StringUtils
.
isBlank
(
cateId
))
{
return
AjaxResult
.
warn
(
"请指定商品分类"
);
}
queryWrapper
.
eq
(
GoblinSelfGoodsCategory:
:
getCatePid
,
cateId
);
default
:
logger
.
warn
(
"店铺管理:商品分类:筛选:无效参数[grade={},cateId={}]"
,
grade
,
cateId
);
return
AjaxResult
.
warn
(
"无效参数"
);
}
queryWrapper
.
eq
(
GoblinSelfGoodsCategory:
:
getGrade
,
grade
);
queryWrapper
.
select
(
GoblinSelfGoodsCategory:
:
getCateId
,
GoblinSelfGoodsCategory:
:
getName
,
GoblinSelfGoodsCategory:
:
getIcon
,
GoblinSelfGoodsCategory:
:
getNeIsbn
);
queryWrapper
.
orderByAsc
(
GoblinSelfGoodsCategory:
:
getCateId
);
return
AjaxResult
.
success
(
goblinSelfGoodsCategoryService
.
list
(
queryWrapper
));
}
@ApiOperation
(
value
=
"新建"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"grade"
,
value
=
"分类层级[1-一级|2-二级|3-三级]"
,
allowableValues
=
"1,2,3"
),
...
...
@@ -86,5 +119,4 @@ public class GoblinSelfCategoryAdminController extends BaseController {
}
return
toAjax
(
goblinSelfGoodsCategoryService
.
remove
(
Convert
.
toStrArray
(
cateId
)));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment