记得上下班打卡 | 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
15696cb6
Commit
15696cb6
authored
Dec 31, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 显示秒杀
parent
6d011830
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
20 deletions
+30
-20
GoblinStorePurchaseCommonParam.java
...ice/goblin/dto/manage/GoblinStorePurchaseCommonParam.java
+1
-1
GoblinStorePurchaseItemParam.java
...rvice/goblin/dto/manage/GoblinStorePurchaseItemParam.java
+1
-1
GoblinStorePurchaseSkuVo.java
...idnet/service/goblin/dto/vo/GoblinStorePurchaseSkuVo.java
+2
-2
IGoblinStorePurchasingService.java
.../goblin/service/manage/IGoblinStorePurchasingService.java
+2
-2
GoblinStorePurchasingController.java
...in/controller/manage/GoblinStorePurchasingController.java
+4
-4
GoblinStorePurchasingServiceImpl.java
...service/impl/manage/GoblinStorePurchasingServiceImpl.java
+19
-9
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+1
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStorePurchaseCommonParam.java
View file @
15696cb6
...
@@ -21,7 +21,7 @@ public class GoblinStorePurchaseCommonParam {
...
@@ -21,7 +21,7 @@ public class GoblinStorePurchaseCommonParam {
@ApiModelProperty
(
required
=
true
,
value
=
"spuId"
,
example
=
"1"
)
@ApiModelProperty
(
required
=
true
,
value
=
"spuId"
,
example
=
"1"
)
@NotBlank
(
message
=
"spuId不能空"
)
@NotBlank
(
message
=
"spuId不能空"
)
private
String
spuId
;
private
String
spuId
;
@ApiModelProperty
(
required
=
true
,
value
=
"相关配置"
,
example
=
"1"
)
@ApiModelProperty
(
required
=
true
,
value
=
"相关配置"
)
private
List
<
GoblinStorePurchaseItemParam
>
goblinStorePurchaseItemParam
;
private
List
<
GoblinStorePurchaseItemParam
>
goblinStorePurchaseItemParam
;
}
}
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStorePurchaseItemParam.java
View file @
15696cb6
...
@@ -18,7 +18,7 @@ public class GoblinStorePurchaseItemParam {
...
@@ -18,7 +18,7 @@ public class GoblinStorePurchaseItemParam {
private
BigDecimal
priceMarketing
;
private
BigDecimal
priceMarketing
;
@ApiModelProperty
(
required
=
true
,
value
=
"活动库存"
,
example
=
"1.00"
)
@ApiModelProperty
(
required
=
true
,
value
=
"活动库存"
,
example
=
"1.00"
)
@NotBlank
(
message
=
"活动库存不能为空"
)
@NotBlank
(
message
=
"活动库存不能为空"
)
private
String
stockMarketing
;
private
Integer
stockMarketing
;
@ApiModelProperty
(
required
=
true
,
value
=
"用户限购[0-不限购|x-限购数量]"
,
example
=
"1"
)
@ApiModelProperty
(
required
=
true
,
value
=
"用户限购[0-不限购|x-限购数量]"
,
example
=
"1"
)
@NotBlank
(
message
=
"用户限购类型不能为空"
)
@NotBlank
(
message
=
"用户限购类型不能为空"
)
private
Integer
buyLimit
;
private
Integer
buyLimit
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinStorePurchaseSkuVo.java
View file @
15696cb6
...
@@ -30,9 +30,9 @@ public class GoblinStorePurchaseSkuVo implements Serializable, Cloneable {
...
@@ -30,9 +30,9 @@ public class GoblinStorePurchaseSkuVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
6
,
value
=
"限量[0-无限制|X:限购数量]"
)
@ApiModelProperty
(
position
=
6
,
value
=
"限量[0-无限制|X:限购数量]"
)
private
Integer
buyLimit
;
private
Integer
buyLimit
;
@ApiModelProperty
(
position
=
7
,
value
=
"购买限制[0-全部用户|1-仅会员|2-指定用户]"
)
@ApiModelProperty
(
position
=
7
,
value
=
"购买限制[0-全部用户|1-仅会员|2-指定用户]"
)
private
Integer
buyFactor
;
private
String
buyFactor
;
@ApiModelProperty
(
position
=
8
,
value
=
"购买限制人员名单[购买限制为2-指定用户时必填]"
)
@ApiModelProperty
(
position
=
8
,
value
=
"购买限制人员名单[购买限制为2-指定用户时必填]"
)
private
Integer
buyRoster
;
private
String
buyRoster
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/service/manage/IGoblinStorePurchasingService.java
View file @
15696cb6
...
@@ -104,8 +104,8 @@ public interface IGoblinStorePurchasingService {
...
@@ -104,8 +104,8 @@ public interface IGoblinStorePurchasingService {
* 删除活动内sku
* 删除活动内sku
*
*
* @param marketId 活动秒杀id
* @param marketId 活动秒杀id
* @param s
kuId sk
uId
* @param s
puId sp
uId
* @return
* @return
*/
*/
ResponseDto
<
Boolean
>
purchasingS
kuDel
(
String
marketId
,
String
storeId
,
String
spuId
);
ResponseDto
<
Boolean
>
purchasingS
puDel
(
String
marketId
,
String
storeId
,
String
spuId
);
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStorePurchasingController.java
View file @
15696cb6
...
@@ -131,18 +131,18 @@ public class GoblinStorePurchasingController {
...
@@ -131,18 +131,18 @@ public class GoblinStorePurchasingController {
return
goblinStorePurchasingService
.
purchasingSkuUpdate
(
params
);
return
goblinStorePurchasingService
.
purchasingSkuUpdate
(
params
);
}
}
@DeleteMapping
(
"purchasing/s
k
u"
)
@DeleteMapping
(
"purchasing/s
p
u"
)
@ApiOperation
(
"活动详情-限时秒杀-s
k
u删除"
)
@ApiOperation
(
"活动详情-限时秒杀-s
p
u删除"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"marketId"
,
value
=
"活动id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"商铺id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"storeId"
,
value
=
"商铺id"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
,
example
=
"1"
)
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"String"
,
name
=
"spuId"
,
value
=
"spuId"
,
example
=
"1"
)
})
})
public
ResponseDto
<
Boolean
>
purchasingS
k
uDel
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
public
ResponseDto
<
Boolean
>
purchasingS
p
uDel
(
@RequestParam
(
"marketId"
)
@Valid
String
marketId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"storeId"
)
@Valid
String
storeId
,
@RequestParam
(
"spuId"
)
@Valid
String
spuId
)
{
@RequestParam
(
"spuId"
)
@Valid
String
spuId
)
{
return
goblinStorePurchasingService
.
purchasingS
k
uDel
(
marketId
,
storeId
,
spuId
);
return
goblinStorePurchasingService
.
purchasingS
p
uDel
(
marketId
,
storeId
,
spuId
);
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStorePurchasingServiceImpl.java
View file @
15696cb6
...
@@ -47,7 +47,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -47,7 +47,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
HashMap
<
String
,
Object
>
map
=
goblinMongoUtils
.
getStoreMarketList
(
page
,
purchaseName
,
status
,
st
,
et
,
ct
);
HashMap
<
String
,
Object
>
map
=
goblinMongoUtils
.
getStoreMarketList
(
page
,
purchaseName
,
status
,
st
,
et
,
ct
);
List
<
GoblinStoreMarketVo
>
list
=
(
List
<
GoblinStoreMarketVo
>)
map
.
get
(
"data"
);
List
<
GoblinStoreMarketVo
>
list
=
(
List
<
GoblinStoreMarketVo
>)
map
.
get
(
"data"
);
for
(
GoblinStoreMarketVo
item
:
list
)
{
for
(
GoblinStoreMarketVo
item
:
list
)
{
if
(
LocalDateTime
.
parse
(
item
.
getStartTime
(),
DTF_YMD_HMS
).
isAfter
(
now
))
{
if
(
item
.
getStatus
().
equals
(
7
))
{
item
.
setStatus
(
7
);
}
else
if
(
LocalDateTime
.
parse
(
item
.
getStartTime
(),
DTF_YMD_HMS
).
isAfter
(
now
))
{
item
.
setStatus
(
0
);
item
.
setStatus
(
0
);
}
else
if
(
LocalDateTime
.
parse
(
item
.
getEndTime
(),
DTF_YMD_HMS
).
isBefore
(
now
))
{
}
else
if
(
LocalDateTime
.
parse
(
item
.
getEndTime
(),
DTF_YMD_HMS
).
isBefore
(
now
))
{
item
.
setStatus
(
2
);
item
.
setStatus
(
2
);
...
@@ -178,7 +180,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -178,7 +180,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
GoblinMarketSpuListVo
vo
=
GoblinMarketSpuListVo
.
getNew
();
GoblinMarketSpuListVo
vo
=
GoblinMarketSpuListVo
.
getNew
();
String
marketSpuId
=
marketSpuList
.
get
(
i
);
String
marketSpuId
=
marketSpuList
.
get
(
i
);
GoblinGoodsInfoVo
spuVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
marketSpuId
);
GoblinGoodsInfoVo
spuVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
marketSpuId
);
vo
.
setMarketSpuId
(
marketSpuId
);
vo
.
setMarketSpuId
(
marketSpuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
())[
0
]
);
vo
.
setCoverPic
(
spuVo
.
getCoverPic
());
vo
.
setCoverPic
(
spuVo
.
getCoverPic
());
vo
.
setName
(
spuVo
.
getName
());
vo
.
setName
(
spuVo
.
getName
());
vo
.
setPriceGe
(
spuVo
.
getPriceGe
());
vo
.
setPriceGe
(
spuVo
.
getPriceGe
());
...
@@ -204,9 +206,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -204,9 +206,9 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
vo
.
setSkuStock
(
skuVo
.
getSkuStock
());
vo
.
setSkuStock
(
skuVo
.
getSkuStock
());
vo
.
setPriceMarketing
(
marketSkuVo
.
getPrice
());
vo
.
setPriceMarketing
(
marketSkuVo
.
getPrice
());
vo
.
setStockMarketing
(
marketSkuVo
.
getSkuStock
());
vo
.
setStockMarketing
(
marketSkuVo
.
getSkuStock
());
vo
.
setBuyFactor
(
v
o
.
getBuyFactor
());
vo
.
setBuyFactor
(
marketSkuV
o
.
getBuyFactor
());
vo
.
setBuyLimit
(
v
o
.
getBuyLimit
());
vo
.
setBuyLimit
(
marketSkuV
o
.
getBuyLimit
());
vo
.
setBuyRoster
(
v
o
.
getBuyRoster
());
vo
.
setBuyRoster
(
marketSkuV
o
.
getBuyRoster
());
voList
.
add
(
vo
);
voList
.
add
(
vo
);
}
}
return
ResponseDto
.
success
(
voList
);
return
ResponseDto
.
success
(
voList
);
...
@@ -224,6 +226,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -224,6 +226,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
sqls
.
add
(
SqlMapping
.
get
(
"goblin.store.market.insertRelation"
));
sqls
.
add
(
SqlMapping
.
get
(
"goblin.store.market.insertRelation"
));
LinkedList
<
Object
[]>
sqlsData
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
sqlsData
=
CollectionUtil
.
linkedListObjectArr
();
for
(
GoblinStorePurchaseItemParam
item
:
params
.
getGoblinStorePurchaseItemParam
())
{
for
(
GoblinStorePurchaseItemParam
item
:
params
.
getGoblinStorePurchaseItemParam
())
{
//todo 修改 相关vo 修改库存 判断库存
String
purchaseId
=
IDGenerator
.
nextMilliId2
();
String
purchaseId
=
IDGenerator
.
nextMilliId2
();
GoblinStoreMarketPurchasing
bean
=
GoblinStoreMarketPurchasing
.
getNew
();
GoblinStoreMarketPurchasing
bean
=
GoblinStoreMarketPurchasing
.
getNew
();
bean
.
setStoreId
(
params
.
getStoreId
());
bean
.
setStoreId
(
params
.
getStoreId
());
...
@@ -232,7 +235,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -232,7 +235,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
bean
.
setPurchaseId
(
purchaseId
);
bean
.
setPurchaseId
(
purchaseId
);
bean
.
setSkuId
(
item
.
getSkuId
());
bean
.
setSkuId
(
item
.
getSkuId
());
bean
.
setPriceMarketing
(
item
.
getPriceMarketing
());
bean
.
setPriceMarketing
(
item
.
getPriceMarketing
());
bean
.
setStockMarketing
(
item
.
hashCode
());
bean
.
setStockMarketing
(
item
.
getStockMarketing
());
bean
.
setBuyLimit
(
item
.
getBuyLimit
());
bean
.
setBuyLimit
(
item
.
getBuyLimit
());
bean
.
setBuyFactor
(
item
.
getBuyFactor
());
bean
.
setBuyFactor
(
item
.
getBuyFactor
());
bean
.
setBuyRoster
(
item
.
getBuyRoster
());
bean
.
setBuyRoster
(
item
.
getBuyRoster
());
...
@@ -249,6 +252,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -249,6 +252,7 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
skuVo
.
setBuyRoster
(
bean
.
getBuyRoster
());
skuVo
.
setBuyRoster
(
bean
.
getBuyRoster
());
skuVo
.
setBuyFactor
(
bean
.
getBuyFactor
().
toString
());
skuVo
.
setBuyFactor
(
bean
.
getBuyFactor
().
toString
());
skuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
().
concat
(
params
.
getStoreMarketId
()));
skuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
().
concat
(
params
.
getStoreMarketId
()));
goblinMongoUtils
.
setGoodsSkuInfoVo
(
skuVo
);
//redis
//redis
goblinRedisUtils
.
setGoodsSkuInfoVo
(
skuVo
);
goblinRedisUtils
.
setGoodsSkuInfoVo
(
skuVo
);
//mysql
//mysql
...
@@ -279,13 +283,15 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -279,13 +283,15 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
public
ResponseDto
<
Boolean
>
purchasingSkuUpdate
(
GoblinStorePurchaseCommonParam
params
)
{
public
ResponseDto
<
Boolean
>
purchasingSkuUpdate
(
GoblinStorePurchaseCommonParam
params
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
String
marketSpuId
=
params
.
getSpuId
().
concat
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
()).
concat
(
IDGenerator
.
marketGoodId
(
params
.
getStoreMarketId
()));
String
marketSpuId
=
params
.
getSpuId
().
concat
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
()).
concat
(
IDGenerator
.
marketGoodId
(
params
.
getStoreMarketId
()));
List
<
String
>
marketSkuList
=
CollectionUtil
.
arrayListString
();
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
sqls
.
add
(
SqlMapping
.
get
(
"goblin.store.market.updateRelation"
));
sqls
.
add
(
SqlMapping
.
get
(
"goblin.store.market.updateRelation"
));
LinkedList
<
Object
[]>
sqlsData
=
CollectionUtil
.
linkedListObjectArr
();
LinkedList
<
Object
[]>
sqlsData
=
CollectionUtil
.
linkedListObjectArr
();
for
(
GoblinStorePurchaseItemParam
item
:
params
.
getGoblinStorePurchaseItemParam
())
{
for
(
GoblinStorePurchaseItemParam
item
:
params
.
getGoblinStorePurchaseItemParam
())
{
//todo 修改 相关vo 修改库存 判断库存
GoblinStoreMarketPurchasing
bean
=
GoblinStoreMarketPurchasing
.
getNew
();
GoblinStoreMarketPurchasing
bean
=
GoblinStoreMarketPurchasing
.
getNew
();
bean
.
setPriceMarketing
(
item
.
getPriceMarketing
());
bean
.
setPriceMarketing
(
item
.
getPriceMarketing
());
bean
.
setStockMarketing
(
item
.
hashCode
());
bean
.
setStockMarketing
(
item
.
getStockMarketing
());
bean
.
setBuyLimit
(
item
.
getBuyLimit
());
bean
.
setBuyLimit
(
item
.
getBuyLimit
());
bean
.
setBuyFactor
(
item
.
getBuyFactor
());
bean
.
setBuyFactor
(
item
.
getBuyFactor
());
bean
.
setBuyRoster
(
item
.
getBuyRoster
());
bean
.
setBuyRoster
(
item
.
getBuyRoster
());
...
@@ -300,17 +306,20 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -300,17 +306,20 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
skuVo
.
setBuyRoster
(
bean
.
getBuyRoster
());
skuVo
.
setBuyRoster
(
bean
.
getBuyRoster
());
skuVo
.
setBuyFactor
(
bean
.
getBuyFactor
().
toString
());
skuVo
.
setBuyFactor
(
bean
.
getBuyFactor
().
toString
());
skuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
().
concat
(
params
.
getStoreMarketId
()));
skuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
().
concat
(
params
.
getStoreMarketId
()));
goblinMongoUtils
.
updateGoodsSkuInfoVo
(
skuVo
);
//redis
//redis
goblinRedisUtils
.
setGoodsSkuInfoVo
(
skuVo
);
goblinRedisUtils
.
setGoodsSkuInfoVo
(
skuVo
);
//mysql
//mysql
sqlsData
.
add
(
new
Object
[]{
bean
.
getPriceMarketing
(),
sqlsData
.
add
(
new
Object
[]{
bean
.
getPriceMarketing
(),
bean
.
getStockMarketing
(),
bean
.
getBuyFactor
(),
bean
.
getBuyRoster
(),
bean
.
getBuyLimit
(),
bean
.
getUpdatedAt
(),
params
.
getStoreMarketId
(),
params
.
getStoreId
()});
bean
.
getStockMarketing
(),
bean
.
getBuyFactor
(),
bean
.
getBuyRoster
(),
bean
.
getBuyLimit
(),
bean
.
getUpdatedAt
(),
params
.
getStoreMarketId
(),
params
.
getStoreId
()});
marketSkuList
.
add
(
skuVo
.
getSkuId
());
}
}
//mongo
//mongo
GoblinGoodsInfoVo
spuVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
params
.
getSpuId
());
GoblinGoodsInfoVo
spuVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
params
.
getSpuId
());
spuVo
.
setSpuId
(
marketSpuId
);
spuVo
.
setSpuId
(
marketSpuId
);
spuVo
.
setSkuIdList
(
marketSkuList
);
spuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
().
concat
(
params
.
getStoreMarketId
()));
spuVo
.
setMarketId
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
().
concat
(
params
.
getStoreMarketId
()));
goblinMongoUtils
.
set
GoodsInfoVo
(
spuVo
);
goblinMongoUtils
.
update
GoodsInfoVo
(
spuVo
);
//redis
//redis
goblinRedisUtils
.
setGoodsInfoVo
(
spuVo
);
goblinRedisUtils
.
setGoodsInfoVo
(
spuVo
);
// 执行sql
// 执行sql
...
@@ -321,7 +330,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
...
@@ -321,7 +330,8 @@ public class GoblinStorePurchasingServiceImpl implements IGoblinStorePurchasingS
}
}
@Override
@Override
public
ResponseDto
<
Boolean
>
purchasingSkuDel
(
String
marketId
,
String
storeId
,
String
spuId
)
{
public
ResponseDto
<
Boolean
>
purchasingSpuDel
(
String
marketId
,
String
storeId
,
String
spuId
)
{
//todo 修改 相关vo 修改库存 判断库存
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
String
marketSpuId
=
spuId
.
concat
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
()).
concat
(
IDGenerator
.
marketGoodId
(
marketId
));
String
marketSpuId
=
spuId
.
concat
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_PURCHASE
.
getValue
()).
concat
(
IDGenerator
.
marketGoodId
(
marketId
));
GoblinStoreMarketPurchasing
bean
=
GoblinStoreMarketPurchasing
.
getNew
();
GoblinStoreMarketPurchasing
bean
=
GoblinStoreMarketPurchasing
.
getNew
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
15696cb6
...
@@ -146,7 +146,7 @@ public class GoblinMongoUtils {
...
@@ -146,7 +146,7 @@ public class GoblinMongoUtils {
public
boolean
updateGoodsSkuInfoVo
(
GoblinGoodsSkuInfoVo
vo
)
{
public
boolean
updateGoodsSkuInfoVo
(
GoblinGoodsSkuInfoVo
vo
)
{
return
mongoTemplate
.
getCollection
(
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
())
return
mongoTemplate
.
getCollection
(
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
())
.
updateOne
(
.
updateOne
(
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
vo
.
getS
p
uId
())).
getQueryObject
(),
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
vo
.
getS
k
uId
())).
getQueryObject
(),
ObjectUtil
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
vo
))
ObjectUtil
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
vo
))
).
getModifiedCount
()
>
0
;
).
getModifiedCount
()
>
0
;
}
}
...
...
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