记得上下班打卡 | 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
71d2d59e
Commit
71d2d59e
authored
Jan 25, 2022
by
zhanggb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~ADMIN:标签管理:+校验;
parent
a52faff3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
4 deletions
+50
-4
GoblinSelfCategoryAdminController.java
...er/zhengzai/goblin/GoblinSelfCategoryAdminController.java
+8
-1
GoblinSelfExtagAdminController.java
...oller/zhengzai/goblin/GoblinSelfExtagAdminController.java
+16
-1
GoblinSelfTagAdminController.java
...troller/zhengzai/goblin/GoblinSelfTagAdminController.java
+26
-2
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 @
71d2d59e
...
@@ -92,7 +92,8 @@ public class GoblinSelfCategoryAdminController extends BaseController {
...
@@ -92,7 +92,8 @@ public class GoblinSelfCategoryAdminController extends BaseController {
@PostMapping
(
"addSave"
)
@PostMapping
(
"addSave"
)
@ResponseBody
@ResponseBody
public
AjaxResult
addSave
(
GoblinSelfGoodsCategory
selfGoodsCategory
)
{
public
AjaxResult
addSave
(
GoblinSelfGoodsCategory
selfGoodsCategory
)
{
if
(
StringUtils
.
isBlank
(
selfGoodsCategory
.
getName
()))
{
String
name
=
selfGoodsCategory
.
getName
();
if
(
StringUtils
.
isBlank
(
name
))
{
return
AjaxResult
.
warn
(
"分类名称不能为空"
);
return
AjaxResult
.
warn
(
"分类名称不能为空"
);
}
}
String
grade
=
selfGoodsCategory
.
getGrade
();
String
grade
=
selfGoodsCategory
.
getGrade
();
...
@@ -127,6 +128,12 @@ public class GoblinSelfCategoryAdminController extends BaseController {
...
@@ -127,6 +128,12 @@ public class GoblinSelfCategoryAdminController extends BaseController {
default
:
default
:
return
AjaxResult
.
warn
(
"分类层级无效"
);
return
AjaxResult
.
warn
(
"分类层级无效"
);
}
}
queryWrapper
.
clear
();
queryWrapper
.
eq
(
GoblinSelfGoodsCategory:
:
getDelFlg
,
"0"
);
queryWrapper
.
eq
(
GoblinSelfGoodsCategory:
:
getName
,
name
.
trim
());
if
(
goblinSelfGoodsCategoryService
.
count
(
queryWrapper
)
>
0
)
{
return
AjaxResult
.
warn
(
"分类名称重复,请核实"
);
}
selfGoodsCategory
.
setCateId
(
IDGenerator
.
nextMilliId2
());
selfGoodsCategory
.
setCateId
(
IDGenerator
.
nextMilliId2
());
selfGoodsCategory
.
setDelFlg
(
"0"
);
selfGoodsCategory
.
setDelFlg
(
"0"
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfExtagAdminController.java
View file @
71d2d59e
...
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Controller;
...
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Controller;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
@Api
(
tags
=
"音乐人标签库"
)
@Api
(
tags
=
"音乐人标签库"
)
...
@@ -92,10 +93,24 @@ public class GoblinSelfExtagAdminController extends BaseController {
...
@@ -92,10 +93,24 @@ public class GoblinSelfExtagAdminController extends BaseController {
@PostMapping
(
"addSave"
)
@PostMapping
(
"addSave"
)
@ResponseBody
@ResponseBody
public
AjaxResult
addSave
(
String
tagName
,
String
tagPic
,
String
tagType
)
{
public
AjaxResult
addSave
(
String
tagName
,
String
tagPic
,
String
tagType
)
{
if
(
StringUtils
.
isBlank
(
tagName
)
||
StringUtils
.
isBlank
(
tagPic
)
||
StringUtils
.
isBlank
(
tagType
))
{
return
AjaxResult
.
warn
(
"参数有误,请核实"
);
}
if
(
Arrays
.
asList
(
"1"
,
"2"
,
"3"
,
"4"
).
contains
(
tagType
))
{
return
AjaxResult
.
warn
(
"无效参数:标签类型"
);
}
LambdaQueryWrapper
<
GoblinSelfTag
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinSelfTag
.
class
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getDelFlg
,
"0"
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getTagBelong
,
"1"
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getTagName
,
tagName
.
trim
());
if
(
goblinSelfTagService
.
count
(
queryWrapper
)
>
0
)
{
return
AjaxResult
.
warn
(
"标签名称重复,请核实"
);
}
GoblinSelfTag
selfTag
=
new
GoblinSelfTag
();
GoblinSelfTag
selfTag
=
new
GoblinSelfTag
();
selfTag
.
setTagId
(
IDGenerator
.
nextMilliId2
());
selfTag
.
setTagId
(
IDGenerator
.
nextMilliId2
());
selfTag
.
setTagName
(
tagName
);
selfTag
.
setTagName
(
tagName
.
trim
()
);
selfTag
.
setTagPic
(
tagPic
);
selfTag
.
setTagPic
(
tagPic
);
selfTag
.
setTagType
(
tagType
);
selfTag
.
setTagType
(
tagType
);
selfTag
.
setTagBelong
(
tagBelong
);
selfTag
.
setTagBelong
(
tagBelong
);
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinSelfTagAdminController.java
View file @
71d2d59e
...
@@ -88,10 +88,21 @@ public class GoblinSelfTagAdminController extends BaseController {
...
@@ -88,10 +88,21 @@ public class GoblinSelfTagAdminController extends BaseController {
@PostMapping
(
"addSave"
)
@PostMapping
(
"addSave"
)
@ResponseBody
@ResponseBody
public
AjaxResult
addSave
(
String
tagName
,
String
tagPic
)
{
public
AjaxResult
addSave
(
String
tagName
,
String
tagPic
)
{
if
(
StringUtils
.
isBlank
(
tagName
)
||
StringUtils
.
isBlank
(
tagPic
))
{
return
AjaxResult
.
warn
(
"参数有误,请核实"
);
}
LambdaQueryWrapper
<
GoblinSelfTag
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinSelfTag
.
class
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getDelFlg
,
"0"
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getTagBelong
,
"0"
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getTagName
,
tagName
.
trim
());
if
(
goblinSelfTagService
.
count
(
queryWrapper
)
>
0
)
{
return
AjaxResult
.
warn
(
"标签名称重复,请核实"
);
}
GoblinSelfTag
selfTag
=
new
GoblinSelfTag
();
GoblinSelfTag
selfTag
=
new
GoblinSelfTag
();
selfTag
.
setTagId
(
IDGenerator
.
nextMilliId2
());
selfTag
.
setTagId
(
IDGenerator
.
nextMilliId2
());
selfTag
.
setTagName
(
tagName
);
selfTag
.
setTagName
(
tagName
.
trim
()
);
selfTag
.
setTagPic
(
tagPic
);
selfTag
.
setTagPic
(
tagPic
);
selfTag
.
setTagType
(
"0"
);
selfTag
.
setTagType
(
"0"
);
selfTag
.
setDelFlg
(
"0"
);
selfTag
.
setDelFlg
(
"0"
);
...
@@ -107,8 +118,21 @@ public class GoblinSelfTagAdminController extends BaseController {
...
@@ -107,8 +118,21 @@ public class GoblinSelfTagAdminController extends BaseController {
@PostMapping
(
"editSave"
)
@PostMapping
(
"editSave"
)
@ResponseBody
@ResponseBody
public
AjaxResult
editSave
(
GoblinSelfTag
selfTag
)
{
public
AjaxResult
editSave
(
GoblinSelfTag
selfTag
)
{
if
(
StringUtils
.
isBlank
(
selfTag
.
getTagName
())
||
StringUtils
.
isBlank
(
selfTag
.
getTagPic
()))
{
return
AjaxResult
.
warn
(
"参数有误,请核实"
);
}
selfTag
.
setTagName
(
selfTag
.
getTagName
().
trim
());
LambdaQueryWrapper
<
GoblinSelfTag
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinSelfTag
.
class
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getDelFlg
,
"0"
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getTagBelong
,
"0"
);
queryWrapper
.
eq
(
GoblinSelfTag:
:
getTagName
,
selfTag
.
getTagName
());
if
(
goblinSelfTagService
.
count
(
queryWrapper
)
>
0
)
{
return
AjaxResult
.
warn
(
"标签名称重复,请核实"
);
}
selfTag
.
setTagBelong
(
tagBelong
);
selfTag
.
setTagBelong
(
tagBelong
);
// TODO: 2022/1/13 zhanggb valid
selfTag
.
setTagType
(
"0"
);
return
toAjax
(
goblinSelfTagService
.
editSave
(
selfTag
));
return
toAjax
(
goblinSelfTagService
.
editSave
(
selfTag
));
}
}
...
...
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