记得上下班打卡 | 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
baf9e389
Commit
baf9e389
authored
Jan 18, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 无可参加的活动时500
parent
3b7de285
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
GoblinStoreZhengzaiServiceImpl.java
...e/goblin/service/impl/GoblinStoreZhengzaiServiceImpl.java
+3
-1
GoblinZhengzaiServiceImpl.java
...goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
+5
-4
errors.properties
...-service-goblin-impl/src/main/resources/errors.properties
+1
-1
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinStoreZhengzaiServiceImpl.java
View file @
baf9e389
package
com
.
liquidnet
.
service
.
goblin
.
service
.
impl
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.dto.vo.*
;
...
...
@@ -43,7 +44,8 @@ public class GoblinStoreZhengzaiServiceImpl implements IGoblinStoreZhengzaiServi
List
<
GoblinSelfMarketingVo
>
voList
=
ObjectUtil
.
getGoblinSelfMarketingVoList
();
LocalDateTime
now
=
LocalDateTime
.
now
();
for
(
GoblinSelfMarketingVo
item
:
list
)
{
if
(
LocalDateTime
.
parse
(
item
.
getStartTime
(),
DTF_YMD_HMS
).
isBefore
(
now
)
&&
LocalDateTime
.
parse
(
item
.
getEndTime
(),
DTF_YMD_HMS
).
isAfter
(
now
))
{
GoblinMarketingZhengzaiRelationVo
zhengzaiRelationVo
=
redisUtils
.
getZhengzaiRelation
(
item
.
getSelfMarketId
(),
storeId
);
if
(
LocalDateTime
.
parse
(
item
.
getEndTime
(),
DTF_YMD_HMS
).
isAfter
(
now
)
&&
zhengzaiRelationVo
!=
null
)
{
if
(
marketIds
.
contains
(
item
.
getSelfMarketId
()))
{
List
<
GoblinMarketRelationVo
>
relationVo
=
redisUtils
.
getMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
(),
item
.
getSelfMarketId
());
List
<
String
>
storeIdList
=
relationVo
.
stream
().
map
(
GoblinMarketRelationVo:
:
getStoreId
).
distinct
().
collect
(
Collectors
.
toList
());
//配置了商铺的店铺
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
View file @
baf9e389
...
...
@@ -185,7 +185,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
priceList
.
add
(
item
.
getPriceMarketing
());
}
if
(
errorNameList
.
size
()
==
params
.
getGoblinStoreZhengzaiItemParams
().
size
())
{
return
ResponseDto
.
failure
(
JsonUtils
.
toJson
(
errorNameList
));
return
ResponseDto
.
failure
(
"148001"
,
JsonUtils
.
toJson
(
errorNameList
));
}
//mongo
GoblinGoodsInfoVo
spuVo
=
redisUtils
.
getGoodsInfoVo
(
params
.
getSpuId
());
...
...
@@ -201,6 +201,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
redisUtils
.
setGoodsInfoVo
(
spuVo
);
relationVo
.
setSkuList
(
skuList
);
relationVo
.
setSpuId
(
spuVo
.
getSpuId
());
relationVo
.
setStoreId
(
params
.
getStoreId
());
redisUtils
.
addMarketRelation
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
(),
params
.
getSelfMarketId
(),
relationVo
);
redisUtils
.
addStoreMarketIsConfig
(
params
.
getSelfMarketId
(),
params
.
getStoreId
(),
params
.
getSpuId
(),
marketSpuId
);
// 执行sql
...
...
@@ -208,7 +209,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_SELF_MARKET
.
getKey
(),
sqlData
);
if
(
errorNameList
.
size
()
>
0
)
{
return
ResponseDto
.
failure
(
JsonUtils
.
toJson
(
errorNameList
));
return
ResponseDto
.
failure
(
"148001"
,
JsonUtils
.
toJson
(
errorNameList
));
}
return
ResponseDto
.
success
();
}
...
...
@@ -267,7 +268,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
priceList
.
add
(
bean
.
getPriceMarketing
());
}
if
(
errorNameList
.
size
()
==
params
.
getGoblinStoreZhengzaiItemParams
().
size
())
{
return
ResponseDto
.
failure
(
JsonUtils
.
toJson
(
errorNameList
));
return
ResponseDto
.
failure
(
"148001"
,
JsonUtils
.
toJson
(
errorNameList
));
}
//mongo
GoblinGoodsInfoVo
spuVo
=
redisUtils
.
getGoodsInfoVo
(
params
.
getSpuId
());
...
...
@@ -286,7 +287,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
GOBLIN_SELF_MARKET
.
getKey
(),
sqlData
);
if
(
errorNameList
.
size
()
>
0
)
{
return
ResponseDto
.
failure
(
JsonUtils
.
toJson
(
errorNameList
));
return
ResponseDto
.
failure
(
"148001"
,
JsonUtils
.
toJson
(
errorNameList
));
}
return
ResponseDto
.
success
();
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/resources/errors.properties
View file @
baf9e389
...
...
@@ -30,6 +30,6 @@
149013
=
SKU编辑失败
149014
=
SKU添加失败,重复的规格信息
148001
=
库存不足
149035
=
\ No newline at end of file
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