记得上下班打卡 | 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
a8d026ca
Commit
a8d026ca
authored
Feb 17, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 删除正在下单商品 同事删除sku
parent
2267e5f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
GoblinZhengzaiServiceImpl.java
...goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
+2
-0
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+11
-4
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
View file @
a8d026ca
...
...
@@ -319,6 +319,8 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
int
restStock
=
redisUtils
.
getSkuStock
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
(),
marketSkuId
);
int
restStockDe
=
redisUtils
.
decrSkuStock
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
(),
marketSkuId
,
restStock
);
redisUtils
.
incrSkuStock
(
null
,
skuId
,
restStock
+
restStockDe
);
mongoUtils
.
delGoodsSkuInfoVo
(
marketSkuId
);
redisUtils
.
delGoodsSkuInfoVo
(
marketSkuId
);
}
//mongo
mongoUtils
.
delGoodsInfoVo
(
marketSpuId
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
a8d026ca
...
...
@@ -279,12 +279,12 @@ public class GoblinMongoUtils {
GoblinStoreInfoVo
.
class
,
GoblinStoreInfoVo
.
class
.
getSimpleName
());
}
public
ArrayList
<
String
>
getStoreInfoVoRegexName
(
String
storeName
)
{
public
ArrayList
<
String
>
getStoreInfoVoRegexName
(
String
storeName
)
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"storeName"
).
regex
(
"^.*"
+
storeName
+
".*$"
).
and
(
"delFlg"
).
is
(
"0"
).
and
(
"status"
).
in
(
"3"
,
"5"
));
query
.
fields
().
include
(
"storeId"
);
List
<
GoblinStoreInfoVo
>
voList
=
mongoTemplate
.
find
(
query
,
GoblinStoreInfoVo
.
class
,
GoblinStoreInfoVo
.
class
.
getSimpleName
());
ArrayList
<
String
>
list
=
CollectionUtil
.
arrayListString
();
for
(
GoblinStoreInfoVo
goblinStoreInfoVo:
voList
)
{
for
(
GoblinStoreInfoVo
goblinStoreInfoVo
:
voList
)
{
list
.
add
(
goblinStoreInfoVo
.
getStoreId
());
}
return
list
;
...
...
@@ -303,14 +303,19 @@ public class GoblinMongoUtils {
}
public
boolean
delGoodsInfoVo
(
String
spuId
)
{
// return mongoTemplate.remove(Query.query(Criteria.where("spuId").is(spuId).and("delFlg").is("0")),
// GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()).getDeletedCount() > 0;
return
mongoTemplate
.
getCollection
(
GoblinGoodsInfoVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"spuId"
).
is
(
spuId
).
and
(
"delFlg"
).
is
(
"0"
)).
getQueryObject
(),
Update
.
update
(
"delFlg"
,
"1"
).
getUpdateObject
()
).
getModifiedCount
()
>
0
;
}
public
boolean
delGoodsSkuInfoVo
(
String
spuId
)
{
return
mongoTemplate
.
getCollection
(
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
spuId
).
and
(
"delFlg"
).
is
(
"0"
)).
getQueryObject
(),
Update
.
update
(
"delFlg"
,
"1"
).
getUpdateObject
()
).
getModifiedCount
()
>
0
;
}
public
boolean
delGoodsInfoVoBySpuIds
(
String
storeId
,
List
<
String
>
spuIdList
,
String
uid
,
LocalDateTime
time
)
{
return
mongoTemplate
.
updateMulti
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
storeId
).
and
(
"spuId"
).
in
(
spuIdList
.
toArray
()).
and
(
"delFlg"
).
is
(
"0"
)),
...
...
@@ -897,11 +902,13 @@ public class GoblinMongoUtils {
query
.
skip
(
skipCount
).
limit
(
size
).
with
(
Sort
.
by
(
Sort
.
Order
.
desc
(
"createdAt"
)));
return
mongoTemplate
.
find
(
query
,
GoblinStoreOrderVo
.
class
,
GoblinStoreOrderVo
.
class
.
getSimpleName
());
}
public
List
<
GoblinFrontBanner
>
getListBanner
()
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"delTag"
).
is
(
0
).
and
(
"bannerType"
).
is
(
1
));
return
mongoTemplate
.
find
(
query
,
GoblinFrontBanner
.
class
,
GoblinFrontBanner
.
class
.
getSimpleName
());
}
public
List
<
GoblinFrontBanner
>
getMiddleBanner
()
{
Query
query
=
Query
.
query
(
Criteria
.
where
(
"delTag"
).
is
(
0
).
and
(
"bannerType"
).
is
(
2
));
return
mongoTemplate
.
find
(
query
,
...
...
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