记得上下班打卡 | 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
8dfbe68e
Commit
8dfbe68e
authored
Aug 10, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索接口修改
parent
8bbabb01
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
11 deletions
+35
-11
GoblinCommonController.java
...eb/controller/zhengzai/goblin/GoblinCommonController.java
+16
-4
IGoblinCommonService.java
...t/admin/zhengzai/goblin/service/IGoblinCommonService.java
+2
-2
GoblinCommonServiceImpl.java
...zhengzai/goblin/service/impl/GoblinCommonServiceImpl.java
+17
-5
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinCommonController.java
View file @
8dfbe68e
...
...
@@ -40,10 +40,18 @@ public class GoblinCommonController extends BaseController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"商品名称[模糊]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"商品类型[0-常规|1-数字藏品]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"shelvesStatus"
,
value
=
"上线状态"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuAppear"
,
value
=
"显示状态"
),
})
@ResponseBody
public
AjaxResult
goodsSearch
(
String
title
,
Integer
type
)
{
return
AjaxResult
.
success
(
goblinCommonService
.
goodsSearch
(
title
,
type
));
public
AjaxResult
goodsSearch
(
String
title
,
Integer
type
,
String
shelvesStatus
,
String
spuAppear
)
{
if
(
""
.
equals
(
shelvesStatus
)){
shelvesStatus
=
null
;
}
if
(
""
.
equals
(
spuAppear
)){
spuAppear
=
null
;
}
return
AjaxResult
.
success
(
goblinCommonService
.
goodsSearch
(
title
,
type
,
shelvesStatus
,
spuAppear
));
}
@Log
(
title
=
"商品搜索"
,
businessType
=
BusinessType
.
LIST
)
...
...
@@ -51,10 +59,14 @@ public class GoblinCommonController extends BaseController {
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"title"
,
value
=
"商品名称[模糊]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"商品类型[0-常规|1-数字藏品]"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"shelvesStatus"
,
value
=
"上线状态"
),
})
@ResponseBody
public
AjaxResult
skuSearch
(
String
title
,
Integer
type
)
{
return
AjaxResult
.
success
(
goblinCommonService
.
skuSearch
(
title
,
type
));
public
AjaxResult
skuSearch
(
String
title
,
Integer
type
,
String
shelvesStatus
)
{
if
(
""
.
equals
(
shelvesStatus
)){
shelvesStatus
=
null
;
}
return
AjaxResult
.
success
(
goblinCommonService
.
skuSearch
(
title
,
type
,
shelvesStatus
));
}
@Log
(
title
=
"混合售搜索"
,
businessType
=
BusinessType
.
LIST
)
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/IGoblinCommonService.java
View file @
8dfbe68e
...
...
@@ -14,9 +14,9 @@ public interface IGoblinCommonService {
List
<
GoblinStoreSearchDto
>
storeSearch
(
String
name
,
List
<
String
>
status
);
List
<
GoblinGoodsSearchDto
>
goodsSearch
(
String
name
,
Integer
type
);
List
<
GoblinGoodsSearchDto
>
goodsSearch
(
String
name
,
Integer
type
,
String
shelvesStatus
,
String
spuAppear
);
List
<
GoblinSkusSearchDto
>
skuSearch
(
String
name
,
Integer
type
);
List
<
GoblinSkusSearchDto
>
skuSearch
(
String
name
,
Integer
type
,
String
shelvesStatus
);
List
<
GoblinMixSearchDto
>
mixSearch
(
String
name
);
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/GoblinCommonServiceImpl.java
View file @
8dfbe68e
...
...
@@ -62,14 +62,22 @@ public class GoblinCommonServiceImpl implements IGoblinCommonService {
}
@Override
public
List
<
GoblinGoodsSearchDto
>
goodsSearch
(
String
name
,
Integer
type
)
{
public
List
<
GoblinGoodsSearchDto
>
goodsSearch
(
String
name
,
Integer
type
,
String
shelvesStatus
,
String
spuAppear
)
{
if
(
type
==
null
)
{
//普通商品
type
=
1
;
}
LambdaQueryWrapper
<
GoblinGoods
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinGoods
.
class
);
queryWrapper
.
ne
(
GoblinGoods:
:
getDelFlg
,
"1"
);
// queryWrapper.eq(GoblinGoods::getShelvesStatus, "3");
// queryWrapper.eq(GoblinGoods::getSpuAppear, "0");
if
(
shelvesStatus
!=
null
)
{
queryWrapper
.
eq
(
GoblinGoods:
:
getShelvesStatus
,
shelvesStatus
);
}
else
{
// queryWrapper.eq(GoblinGoods::getShelvesStatus, "3");
}
if
(
spuAppear
!=
null
)
{
queryWrapper
.
eq
(
GoblinGoods:
:
getSpuAppear
,
spuAppear
);
}
else
{
queryWrapper
.
eq
(
GoblinGoods:
:
getSpuAppear
,
"1"
);
}
queryWrapper
.
eq
(
GoblinGoods:
:
getSpuType
,
type
);
if
(
StringUtil
.
isNotBlank
(
name
))
{
queryWrapper
.
like
(
GoblinGoods:
:
getName
,
name
);
...
...
@@ -86,13 +94,17 @@ public class GoblinCommonServiceImpl implements IGoblinCommonService {
}
@Override
public
List
<
GoblinSkusSearchDto
>
skuSearch
(
String
name
,
Integer
type
)
{
public
List
<
GoblinSkusSearchDto
>
skuSearch
(
String
name
,
Integer
type
,
String
shelvesStatus
)
{
if
(
type
==
null
)
{
//普通商品
type
=
1
;
}
LambdaQueryWrapper
<
GoblinGoodsSku
>
queryWrapper
=
Wrappers
.
lambdaQuery
(
GoblinGoodsSku
.
class
);
queryWrapper
.
ne
(
GoblinGoodsSku:
:
getDelFlg
,
"1"
);
// queryWrapper.eq(GoblinGoodsSku::getShelvesStatus, "3");
if
(
shelvesStatus
!=
null
)
{
queryWrapper
.
eq
(
GoblinGoodsSku:
:
getShelvesStatus
,
shelvesStatus
);
}
else
{
// queryWrapper.eq(GoblinGoodsSku::getShelvesStatus, "3");
}
// queryWrapper.eq(GoblinGoodsSku::getSpuAppear, "0");
queryWrapper
.
eq
(
GoblinGoodsSku:
:
getSkuType
,
type
);
if
(
StringUtil
.
isNotBlank
(
name
))
{
...
...
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