记得上下班打卡 | 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
a2a16461
Commit
a2a16461
authored
Mar 05, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
e5363362
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
30 deletions
+38
-30
IGoblinZhengzaiService.java
...service/goblin/service/manage/IGoblinZhengzaiService.java
+2
-1
GoblinInnerZhengzaiController.java
...oblin/controller/Inner/GoblinInnerZhengzaiController.java
+4
-3
GoblinZhengzaiController.java
...ce/goblin/controller/manage/GoblinZhengzaiController.java
+4
-3
GoblinZhengzaiServiceImpl.java
...goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
+8
-11
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+20
-12
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinZhengzaiService.java
View file @
a2a16461
package
com
.
liquidnet
.
service
.
goblin
.
service
.
manage
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStorePurchaseCommonParam
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiCommonParam
;
...
...
@@ -23,7 +24,7 @@ public interface IGoblinZhengzaiService {
* @param page 页数
* @return
*/
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
zhengzaiSpuList
(
String
marketId
,
String
storeId
,
int
page
);
ResponseDto
<
PageInfo
<
GoblinMarketSpuListVo
>>
zhengzaiSpuList
(
String
marketId
,
String
storeId
,
int
page
);
/**
* 获取活动内sku列表
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/Inner/GoblinInnerZhengzaiController.java
View file @
a2a16461
package
com
.
liquidnet
.
service
.
goblin
.
controller
.
Inner
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiCommonParam
;
import
com.liquidnet.service.goblin.dto.vo.*
;
...
...
@@ -50,9 +51,9 @@ public class GoblinInnerZhengzaiController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"selfMarketId"
,
value
=
"官方活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
example
=
"1"
)
})
public
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
zhengzaiStoreConfigSpuList
(
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"selfMarketId"
)
@Valid
String
selfMarketId
,
@RequestParam
(
"page"
)
@Valid
int
page
)
{
public
ResponseDto
<
PageInfo
<
GoblinMarketSpuListVo
>>
zhengzaiStoreConfigSpuList
(
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"selfMarketId"
)
@Valid
String
selfMarketId
,
@RequestParam
(
"page"
)
@Valid
int
page
)
{
return
goblinZhengzaiService
.
zhengzaiSpuList
(
selfMarketId
,
storeId
,
page
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinZhengzaiController.java
View file @
a2a16461
package
com
.
liquidnet
.
service
.
goblin
.
controller
.
manage
;
import
com.github.pagehelper.PageInfo
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiCommonParam
;
...
...
@@ -58,9 +59,9 @@ public class GoblinZhengzaiController {
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"selfMarketId"
,
value
=
"官方活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"Integer"
,
name
=
"page"
,
value
=
"页数"
,
example
=
"1"
)
})
public
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
zhengzaiStoreConfigSpuList
(
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"selfMarketId"
)
@Valid
String
selfMarketId
,
@RequestParam
(
"page"
)
@Valid
int
page
)
{
public
ResponseDto
<
PageInfo
<
GoblinMarketSpuListVo
>>
zhengzaiStoreConfigSpuList
(
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"selfMarketId"
)
@Valid
String
selfMarketId
,
@RequestParam
(
"page"
)
@Valid
int
page
)
{
return
goblinZhengzaiService
.
zhengzaiSpuList
(
selfMarketId
,
storeId
,
page
);
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
View file @
a2a16461
package
com
.
liquidnet
.
service
.
goblin
.
service
.
impl
.
manage
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
...
...
@@ -75,22 +76,16 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
}
@Override
public
ResponseDto
<
List
<
GoblinMarketSpuListVo
>>
zhengzaiSpuList
(
String
marketId
,
String
storeId
,
int
page
)
{
public
ResponseDto
<
PageInfo
<
GoblinMarketSpuListVo
>>
zhengzaiSpuList
(
String
marketId
,
String
storeId
,
int
page
)
{
int
size
=
20
;
List
<
GoblinStoreMarketIsConfigVo
>
spuIds
=
redisUtils
.
getStoreMarketIsConfig
(
marketId
,
storeId
);
List
<
String
>
marketSpuList
=
spuIds
.
stream
().
map
(
GoblinStoreMarketIsConfigVo:
:
getMarketSpuId
).
collect
(
Collectors
.
toList
());
List
<
GoblinMarketSpuListVo
>
voList
=
ObjectUtil
.
getGoblinMarketSpuListVoArrayList
();
int
count
=
page
*
size
;
int
startCount
=
(
page
-
1
)
*
size
;
if
(
count
>=
marketSpuList
.
size
())
{
count
=
marketSpuList
.
size
();
}
for
(
int
i
=
startCount
;
i
<
count
;
i
++)
{
List
<
GoblinGoodsInfoVo
>
list
=
mongoUtils
.
marketSpuList
(
marketId
,
storeId
,
startCount
,
size
);
for
(
GoblinGoodsInfoVo
spuVo
:
list
)
{
GoblinMarketSpuListVo
vo
=
GoblinMarketSpuListVo
.
getNew
();
String
marketSpuId
=
marketSpuList
.
get
(
i
);
GoblinGoodsInfoVo
spuVo
=
redisUtils
.
getGoodsInfoVo
(
marketSpuId
);
if
(
null
!=
spuVo
&&
spuVo
.
getDelFlg
().
equals
(
"0"
)
&&
spuVo
.
getShelvesStatus
().
equals
(
"3"
))
{
vo
.
setMarketSpuId
(
marketSpuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())[
0
]);
vo
.
setMarketSpuId
(
spuVo
.
getSpuId
()
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())[
0
]);
vo
.
setCoverPic
(
spuVo
.
getCoverPic
());
vo
.
setName
(
spuVo
.
getName
());
vo
.
setPriceGe
(
spuVo
.
getPriceGe
());
...
...
@@ -98,7 +93,9 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
voList
.
add
(
vo
);
}
}
return
ResponseDto
.
success
(
voList
);
PageInfo
pageInfo
=
new
PageInfo
(
voList
);
pageInfo
.
setTotal
(
spuIds
.
size
());
return
ResponseDto
.
success
(
pageInfo
);
}
@Override
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
a2a16461
...
...
@@ -793,6 +793,12 @@ public class GoblinMongoUtils {
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"backCode"
).
is
(
backCode
)),
GoblinBackOrderVo
.
class
,
GoblinBackOrderVo
.
class
.
getSimpleName
());
}
//获取 正在下单活动内容列表
public
List
<
GoblinGoodsInfoVo
>
marketSpuList
(
String
marketId
,
String
storeId
,
int
start
,
int
skip
)
{
List
<
GoblinGoodsInfoVo
>
list
=
mongoTemplate
.
find
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"marketId"
).
is
(
"ZZ"
+
marketId
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"shelvesStatus"
).
is
(
"3"
)).
with
(
Sort
.
by
(
Sort
.
Order
.
desc
(
"createdAt"
))).
skip
(
start
).
limit
(
skip
),
GoblinGoodsInfoVo
.
class
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
return
list
;
}
//店铺总收入
public
String
storeMoney
(
String
storeId
,
String
spuId
)
{
String
spuName
=
"店铺总收入"
;
...
...
@@ -904,16 +910,7 @@ public class GoblinMongoUtils {
//查询销量
int
size
=
20
;
int
skipCount
=
((
page
-
1
)
*
size
);
Criteria
criteria
=
Criteria
.
where
(
"status"
).
in
(
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_11
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_12
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_13
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_14
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_15
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_16
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_21
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_22
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_23
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_24
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_25
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_26
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_27
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_28
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_29
.
getValue
()
).
and
(
"spuId"
).
is
(
spuId
);
Criteria
criteria
=
Criteria
.
where
(
"spuId"
).
is
(
spuId
);
if
(
st
!=
null
&&
et
!=
null
)
{
criteria
=
criteria
.
and
(
"createdAt"
).
gte
(
st
).
lt
(
et
);
}
...
...
@@ -923,18 +920,29 @@ public class GoblinMongoUtils {
if
(
type
!=
null
)
{
switch
(
type
)
{
case
1
:
criteria
=
criteria
.
and
(
"orderType"
).
is
(
"order"
).
and
(
"status"
).
is
(
1
);
criteria
=
criteria
.
and
(
"orderType"
).
is
(
"order"
).
and
(
"status"
).
is
(
1
1
);
break
;
case
2
:
criteria
=
criteria
.
and
(
"orderType"
).
is
(
"order"
).
and
(
"status"
).
in
(
22
,
28
);
break
;
case
3
:
criteria
=
criteria
.
and
(
"orderType"
).
is
(
"zhengzai"
).
and
(
"status"
).
is
(
1
);
criteria
=
criteria
.
and
(
"orderType"
).
is
(
"zhengzai"
).
and
(
"status"
).
is
(
1
1
);
break
;
case
4
:
criteria
=
criteria
.
and
(
"orderType"
).
is
(
"zhengzai"
).
and
(
"status"
).
in
(
22
,
28
);
break
;
}
}
else
{
criteria
=
criteria
.
and
(
"status"
).
in
(
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_11
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_12
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_13
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_14
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_15
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_16
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_21
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_22
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_23
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_24
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_25
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_26
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_27
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_28
.
getValue
(),
GoblinStatusConst
.
Status
.
ORDER_LOG_STATUS_29
.
getValue
()
);
}
Query
query
=
Query
.
query
(
criteria
);
query
.
skip
(
skipCount
).
limit
(
size
);
...
...
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