记得上下班打卡 | 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
1b42b4d0
Commit
1b42b4d0
authored
Mar 02, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 正在下单逻辑
parent
089ad2e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
GoblinZhengzaiServiceImpl.java
...goblin/service/impl/manage/GoblinZhengzaiServiceImpl.java
+2
-2
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+14
-1
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 @
1b42b4d0
...
...
@@ -182,7 +182,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
skuVo
.
setBuyRoster
(
bean
.
getBuyRoster
());
skuVo
.
setBuyFactor
(
bean
.
getBuyFactor
().
toString
());
skuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
().
concat
(
params
.
getSelfMarketId
()));
mongoUtils
.
se
tGoodsSkuInfoVo
(
skuVo
);
mongoUtils
.
upser
tGoodsSkuInfoVo
(
skuVo
);
//redis
redisUtils
.
setGoodsSkuInfoVo
(
skuVo
);
//mysql
...
...
@@ -208,7 +208,7 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
spuVo
.
setSpecMode
(
"2"
);
spuVo
.
setPriceLe
(
priceList
.
get
(
priceList
.
size
()
-
1
));
spuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
().
concat
(
params
.
getSelfMarketId
()));
mongoUtils
.
se
tGoodsInfoVo
(
spuVo
);
mongoUtils
.
upser
tGoodsInfoVo
(
spuVo
);
//redis
redisUtils
.
setGoodsInfoVo
(
spuVo
);
relationVo
.
setSkuList
(
skuList
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
1b42b4d0
...
...
@@ -306,6 +306,12 @@ public class GoblinMongoUtils {
return
mongoTemplate
.
insert
(
vo
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
}
public
void
upsertGoodsInfoVo
(
GoblinGoodsInfoVo
vo
)
{
Document
document
=
(
Document
)
mongoConverter
.
convertToMongoType
(
vo
);
Update
update
=
Update
.
fromDocument
(
document
);
mongoTemplate
.
upsert
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
vo
.
getStoreId
()).
and
(
"spuId"
).
is
(
vo
.
getSpuId
())),
update
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
}
public
boolean
delGoodsInfoVo
(
String
spuId
)
{
return
mongoTemplate
.
getCollection
(
GoblinGoodsInfoVo
.
class
.
getSimpleName
()).
updateOne
(
Query
.
query
(
Criteria
.
where
(
"spuId"
).
is
(
spuId
).
and
(
"delFlg"
).
is
(
"0"
)).
getQueryObject
(),
...
...
@@ -505,6 +511,12 @@ public class GoblinMongoUtils {
return
mongoTemplate
.
insert
(
vo
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
}
public
void
upsertGoodsSkuInfoVo
(
GoblinGoodsSkuInfoVo
vo
)
{
Document
document
=
(
Document
)
mongoConverter
.
convertToMongoType
(
vo
);
Update
update
=
Update
.
fromDocument
(
document
);
mongoTemplate
.
upsert
(
Query
.
query
(
Criteria
.
where
(
"storeId"
).
is
(
vo
.
getStoreId
()).
and
(
"skuId"
).
is
(
vo
.
getSkuId
())),
update
,
GoblinGoodsInfoVo
.
class
.
getSimpleName
());
}
// SKU信息
public
List
<
GoblinGoodsSkuInfoVo
>
setGoodsSkuInfoVos
(
List
<
GoblinGoodsSkuInfoVo
>
vos
)
{
return
(
List
<
GoblinGoodsSkuInfoVo
>)
mongoTemplate
.
insert
(
vos
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
...
...
@@ -971,7 +983,8 @@ public class GoblinMongoUtils {
criteria
=
criteria
.
and
(
"backOrderSkuVos.spuName"
).
regex
(
".*?\\"
+
spuName
);
}
Query
query
=
Query
.
query
(
criteria
);
query
.
skip
(
skipCount
).
limit
(
size
).
with
(
Sort
.
by
(
Sort
.
Order
.
desc
(
"createdAt"
)));;
query
.
skip
(
skipCount
).
limit
(
size
).
with
(
Sort
.
by
(
Sort
.
Order
.
desc
(
"createdAt"
)));
;
query
.
fields
().
include
(
"backCode"
).
include
(
"orderCode"
).
include
(
"backOrderId"
).
include
(
"type"
).
include
(
"status"
).
include
(
"realBackPrice"
).
include
(
"createdAt"
)
.
include
(
"backOrderSkuVos.spuName"
).
include
(
"backOrderSkuVos.skuName"
).
include
(
"backOrderSkuVos.spuPic"
).
include
(
"backOrderSkuVos.skuPic"
)
.
include
(
"backOrderSkuVos.skuSpecs"
).
include
(
"backOrderSkuVos.skuId"
).
include
(
"backOrderSkuVos.spuId"
).
include
(
"backOrderSkuVos.orderSkuId"
)
...
...
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