记得上下班打卡 | 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
8a5d9b29
Commit
8a5d9b29
authored
Jul 08, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口 查看活动名称是否重复
parent
568db638
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
IGoblinMixService.java
...dnet/service/goblin/service/manage/IGoblinMixService.java
+2
-0
GoblinMixController.java
...service/goblin/controller/manage/GoblinMixController.java
+9
-0
GoblinMixServiceImpl.java
...vice/goblin/service/impl/manage/GoblinMixServiceImpl.java
+12
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinMixService.java
View file @
8a5d9b29
...
@@ -26,4 +26,6 @@ public interface IGoblinMixService {
...
@@ -26,4 +26,6 @@ public interface IGoblinMixService {
ResponseDto
<
Boolean
>
mixUpdate
(
GoblinMixUpdateParam
param
);
ResponseDto
<
Boolean
>
mixUpdate
(
GoblinMixUpdateParam
param
);
ResponseDto
<
Boolean
>
mixLine
(
String
mixId
,
Integer
status
);
ResponseDto
<
Boolean
>
mixLine
(
String
mixId
,
Integer
status
);
ResponseDto
<
Boolean
>
nameCount
(
String
name
);
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinMixController.java
View file @
8a5d9b29
...
@@ -84,4 +84,13 @@ public class GoblinMixController {
...
@@ -84,4 +84,13 @@ public class GoblinMixController {
return
goblinMixService
.
mixLine
(
mixId
,
status
);
return
goblinMixService
.
mixLine
(
mixId
,
status
);
}
}
@ApiOperation
(
value
=
"查看活动名称是否重复"
)
@PostMapping
(
"nameCount"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"name"
,
value
=
"活动名称"
),
})
public
ResponseDto
<
Boolean
>
create
(
@NotBlank
(
message
=
"活动名称不能为空"
)
@RequestParam
String
name
)
{
return
goblinMixService
.
nameCount
(
name
);
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinMixServiceImpl.java
View file @
8a5d9b29
...
@@ -153,7 +153,7 @@ public class GoblinMixServiceImpl implements IGoblinMixService {
...
@@ -153,7 +153,7 @@ public class GoblinMixServiceImpl implements IGoblinMixService {
//判断活动名称
//判断活动名称
int
count
=
(
int
)
mongoUtils
.
getMixNameCount
(
param
.
getName
());
int
count
=
(
int
)
mongoUtils
.
getMixNameCount
(
param
.
getName
());
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResponseDto
.
failure
(
"活动名称重复"
);
return
ResponseDto
.
failure
(
"活动名称重复"
);
}
}
...
@@ -266,6 +266,17 @@ public class GoblinMixServiceImpl implements IGoblinMixService {
...
@@ -266,6 +266,17 @@ public class GoblinMixServiceImpl implements IGoblinMixService {
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
@Override
public
ResponseDto
<
Boolean
>
nameCount
(
String
name
)
{
//判断活动名称
int
count
=
(
int
)
mongoUtils
.
getMixNameCount
(
name
);
if
(
count
>
0
)
{
return
ResponseDto
.
success
(
true
);
}
else
{
return
ResponseDto
.
success
(
false
);
}
}
//库存管理
//库存管理
private
List
<
String
>
initStock
(
List
<
GoblinMixDetailsItemParam
>
data
,
String
mixId
,
int
stock
)
{
private
List
<
String
>
initStock
(
List
<
GoblinMixDetailsItemParam
>
data
,
String
mixId
,
int
stock
)
{
List
<
String
>
errorNameList
=
CollectionUtil
.
linkedListString
();
//库存异常的 sku名称
List
<
String
>
errorNameList
=
CollectionUtil
.
linkedListString
();
//库存异常的 sku名称
...
...
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