记得上下班打卡 | 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
ab5ae604
Commit
ab5ae604
authored
Sep 02, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hjc_nft_details' into pre
parents
1235e166
b542bf89
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
9 deletions
+149
-9
GoblinMixAppListVo.java
...m/liquidnet/service/goblin/dto/vo/GoblinMixAppListVo.java
+2
-0
GoblinMixDetailsItemVo.java
...quidnet/service/goblin/dto/vo/GoblinMixDetailsItemVo.java
+4
-0
GoblinNftGoodsSkuInfoVo.java
...uidnet/service/goblin/dto/vo/GoblinNftGoodsSkuInfoVo.java
+5
-0
GoblinNftGoodsSkuListVo.java
...uidnet/service/goblin/dto/vo/GoblinNftGoodsSkuListVo.java
+26
-0
GoblinMixAppServiceImpl.java
.../service/goblin/service/impl/GoblinMixAppServiceImpl.java
+50
-1
GoblinNftGoodsAppServiceImpl.java
...ice/goblin/service/impl/GoblinNftGoodsAppServiceImpl.java
+48
-2
GoblinListServiceImpl.java
...ice/goblin/service/impl/manage/GoblinListServiceImpl.java
+5
-0
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+4
-2
MixOrderServiceImpl.java
...idnet/service/order/service/impl/MixOrderServiceImpl.java
+5
-4
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinMixAppListVo.java
View file @
ab5ae604
...
@@ -39,6 +39,8 @@ public class GoblinMixAppListVo implements Serializable, Cloneable {
...
@@ -39,6 +39,8 @@ public class GoblinMixAppListVo implements Serializable, Cloneable {
private
String
shelvesTime
;
private
String
shelvesTime
;
@ApiModelProperty
(
position
=
23
,
value
=
"预约开启标识[0:未开启,1开启]"
)
@ApiModelProperty
(
position
=
23
,
value
=
"预约开启标识[0:未开启,1开启]"
)
private
int
reserve
;
private
int
reserve
;
@ApiModelProperty
(
position
=
24
,
value
=
"是否可转债[0-否|1-是]"
)
private
Integer
transferable
;
private
static
final
GoblinMixAppListVo
obj
=
new
GoblinMixAppListVo
();
private
static
final
GoblinMixAppListVo
obj
=
new
GoblinMixAppListVo
();
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinMixDetailsItemVo.java
View file @
ab5ae604
...
@@ -41,6 +41,10 @@ public class GoblinMixDetailsItemVo implements Serializable, Cloneable {
...
@@ -41,6 +41,10 @@ public class GoblinMixDetailsItemVo implements Serializable, Cloneable {
private
String
productId
;
private
String
productId
;
@ApiModelProperty
(
value
=
"组合件数[数字藏品不能大于1]"
)
@ApiModelProperty
(
value
=
"组合件数[数字藏品不能大于1]"
)
private
Integer
count
;
private
Integer
count
;
@ApiModelProperty
(
value
=
"NFT路由[zxinchain-至信链|xuper-百度超级链]"
)
private
String
routeType
;
@ApiModelProperty
(
value
=
"转赠时间[单位秒]"
)
private
Long
transferTimeLimit
;
private
static
final
GoblinMixDetailsItemVo
obj
=
new
GoblinMixDetailsItemVo
();
private
static
final
GoblinMixDetailsItemVo
obj
=
new
GoblinMixDetailsItemVo
();
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinNftGoodsSkuInfoVo.java
View file @
ab5ae604
...
@@ -120,6 +120,11 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
...
@@ -120,6 +120,11 @@ public class GoblinNftGoodsSkuInfoVo implements Serializable, Cloneable {
@ApiModelProperty
(
position
=
74
,
value
=
"第一个分批购结束时间"
)
@ApiModelProperty
(
position
=
74
,
value
=
"第一个分批购结束时间"
)
private
LocalDateTime
firstSaleEndTime
;
private
LocalDateTime
firstSaleEndTime
;
@ApiModelProperty
(
position
=
75
,
value
=
"NFT路由[zxinchain-至信链|xuper-百度超级链]"
)
private
String
routeType
;
@ApiModelProperty
(
position
=
76
,
value
=
"转赠时间[单位秒]"
)
private
Long
transferTimeLimit
;
private
static
final
GoblinNftGoodsSkuInfoVo
obj
=
new
GoblinNftGoodsSkuInfoVo
();
private
static
final
GoblinNftGoodsSkuInfoVo
obj
=
new
GoblinNftGoodsSkuInfoVo
();
public
static
GoblinNftGoodsSkuInfoVo
getNew
()
{
public
static
GoblinNftGoodsSkuInfoVo
getNew
()
{
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinNftGoodsSkuListVo.java
View file @
ab5ae604
...
@@ -34,6 +34,9 @@ public class GoblinNftGoodsSkuListVo implements Serializable, Cloneable {
...
@@ -34,6 +34,9 @@ public class GoblinNftGoodsSkuListVo implements Serializable, Cloneable {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
27
,
value
=
"开售时间"
)
@ApiModelProperty
(
position
=
27
,
value
=
"开售时间"
)
private
LocalDateTime
saleStartTime
;
private
LocalDateTime
saleStartTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
28
,
value
=
"创建时间"
)
private
LocalDateTime
createdAt
;
@ApiModelProperty
(
position
=
55
,
value
=
"spu相关信息"
)
@ApiModelProperty
(
position
=
55
,
value
=
"spu相关信息"
)
...
@@ -52,6 +55,28 @@ public class GoblinNftGoodsSkuListVo implements Serializable, Cloneable {
...
@@ -52,6 +55,28 @@ public class GoblinNftGoodsSkuListVo implements Serializable, Cloneable {
private
Integer
state
;
private
Integer
state
;
@ApiModelProperty
(
position
=
62
,
value
=
"标签[0-提前购买|1-分段购买]"
)
@ApiModelProperty
(
position
=
62
,
value
=
"标签[0-提前购买|1-分段购买]"
)
private
Integer
tagType
;
private
Integer
tagType
;
@ApiModelProperty
(
position
=
63
,
value
=
"NFT路由[zxinchain-至信链|xuper-百度超级链]"
)
private
String
routeType
;
@ApiModelProperty
(
position
=
64
,
value
=
"转赠时间[单位秒]"
)
private
Long
transferTimeLimit
;
@ApiModelProperty
(
position
=
65
,
value
=
"是否可转债[0-否|1-是]"
)
private
Integer
transferable
;
@ApiModelProperty
(
position
=
70
,
value
=
"分批购活动id"
)
private
String
listId
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
71
,
value
=
"sku正常开售时间"
)
private
LocalDateTime
baseSaleStartTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
72
,
value
=
"下个分段购开始时间,如果为null则没有"
)
private
LocalDateTime
nextSaleStartTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
73
,
value
=
"第一个分批购开始时间"
)
private
LocalDateTime
firstSaleStartTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
DateUtil
.
DATE_FULL_STR
)
@ApiModelProperty
(
position
=
74
,
value
=
"第一个分批购结束时间"
)
private
LocalDateTime
firstSaleEndTime
;
private
static
final
GoblinNftGoodsSkuListVo
obj
=
new
GoblinNftGoodsSkuListVo
();
private
static
final
GoblinNftGoodsSkuListVo
obj
=
new
GoblinNftGoodsSkuListVo
();
...
@@ -73,6 +98,7 @@ public class GoblinNftGoodsSkuListVo implements Serializable, Cloneable {
...
@@ -73,6 +98,7 @@ public class GoblinNftGoodsSkuListVo implements Serializable, Cloneable {
this
.
setSaleStartTime
(
source
.
getSaleStartTime
());
this
.
setSaleStartTime
(
source
.
getSaleStartTime
());
this
.
setSoldoutStatus
(
source
.
getSoldoutStatus
());
this
.
setSoldoutStatus
(
source
.
getSoldoutStatus
());
this
.
setUnbox
(
source
.
getUnbox
());
this
.
setUnbox
(
source
.
getUnbox
());
this
.
setCreatedAt
(
source
.
getCreatedAt
());
return
this
;
return
this
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinMixAppServiceImpl.java
View file @
ab5ae604
...
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
...
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
import
static
com
.
liquidnet
.
commons
.
lang
.
util
.
DateUtil
.
DTF_YMD_HMS
;
...
@@ -51,7 +52,26 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
...
@@ -51,7 +52,26 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
for
(
String
mixId
:
startList
)
{
for
(
String
mixId
:
startList
)
{
GoblinMixDetailsVo
vo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixDetailsVo
vo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixAppListVo
itemVo
=
GoblinMixAppListVo
.
getNew
().
copy
(
vo
,
nowTime
);
GoblinMixAppListVo
itemVo
=
GoblinMixAppListVo
.
getNew
().
copy
(
vo
,
nowTime
);
LocalDateTime
nt
=
LocalDateTime
.
now
();
LocalDateTime
st
=
LocalDateTime
.
parse
(
itemVo
.
getTimeStart
(),
DTF_YMD_HMS
);
LocalDateTime
et
=
LocalDateTime
.
parse
(
itemVo
.
getTimeEnd
(),
DTF_YMD_HMS
);
if
(
nt
.
isBefore
(
st
))
{
itemVo
.
setStatus
(
9
);
}
else
if
(
nt
.
isAfter
(
et
))
{
itemVo
.
setStatus
(
10
);
}
else
{
itemVo
.
setStatus
(
6
);
itemVo
.
setStatus
(
6
);
}
// itemVo.setStatus(6);
for
(
GoblinMixDetailsItemVo
data:
vo
.
getItem
()){
String
spuId
=
data
.
getSpuId
();
if
(
redisUtils
.
getGoodsInfoVo
(
spuId
).
getSpuType
()==
1
){
itemVo
.
setTransferable
(
1
);
break
;
}
else
{
itemVo
.
setTransferable
(
0
);
}
}
voList
.
add
(
itemVo
);
voList
.
add
(
itemVo
);
}
}
...
@@ -59,6 +79,15 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
...
@@ -59,6 +79,15 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
GoblinMixDetailsVo
vo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixDetailsVo
vo
=
redisUtils
.
getMixDetails
(
mixId
);
GoblinMixAppListVo
itemVo
=
GoblinMixAppListVo
.
getNew
().
copy
(
vo
,
nowTime
);
GoblinMixAppListVo
itemVo
=
GoblinMixAppListVo
.
getNew
().
copy
(
vo
,
nowTime
);
itemVo
.
setStatus
(
8
);
itemVo
.
setStatus
(
8
);
for
(
GoblinMixDetailsItemVo
data:
vo
.
getItem
()){
String
spuId
=
data
.
getSpuId
();
if
(
redisUtils
.
getGoodsInfoVo
(
spuId
).
getSpuType
()==
1
){
itemVo
.
setTransferable
(
1
);
break
;
}
else
{
itemVo
.
setTransferable
(
0
);
}
}
voList
.
add
(
itemVo
);
voList
.
add
(
itemVo
);
}
}
...
@@ -87,14 +116,34 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
...
@@ -87,14 +116,34 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
item
.
setStock
(
0
);
item
.
setStock
(
0
);
item
.
setSkuName
(
skuInfoVo
.
getName
());
item
.
setSkuName
(
skuInfoVo
.
getName
());
item
.
setSpuName
(
spuInfoVo
.
getName
());
item
.
setSpuName
(
spuInfoVo
.
getName
());
String
routeType
=
""
;
if
(
skuInfoVo
.
getUnbox
().
equals
(
"1"
))
{
if
(
skuInfoVo
.
getUnbox
().
equals
(
"1"
))
{
List
<
String
>
relationIds
=
redisUtils
.
getGoblinMixRelationBox
(
item
.
getSkuId
(),
vo
.
getMixId
());
List
<
String
>
relationIds
=
redisUtils
.
getGoblinMixRelationBox
(
item
.
getSkuId
(),
vo
.
getMixId
());
for
(
String
skuId
:
relationIds
)
{
for
(
String
skuId
:
relationIds
)
{
stock
+=
redisUtils
.
getSkuStock
(
vo
.
getMixId
(),
skuId
);
stock
+=
redisUtils
.
getSkuStock
(
vo
.
getMixId
(),
skuId
);
}
}
for
(
String
routeSkuId
:
spuInfoVo
.
getSkuIdList
())
{
if
(
""
.
equals
(
routeType
))
{
routeType
=
redisUtils
.
getGoodsSkuInfoVo
(
routeSkuId
).
getRouteType
();
}
else
{
break
;
}
}
}
else
{
}
else
{
stock
+=
redisUtils
.
getSkuStock
(
vo
.
getMixId
(),
item
.
getSkuId
());
stock
+=
redisUtils
.
getSkuStock
(
vo
.
getMixId
(),
item
.
getSkuId
());
routeType
=
skuInfoVo
.
getRouteType
();
}
}
//转赠时间
if
(
skuInfoVo
.
getSkuType
()==
1
)
{
Map
<
String
,
Long
>
artworkTransferConfMap
=
redisUtils
.
getUserDigitalArtworkTransferConfMap
();
item
.
setRouteType
(
routeType
);
item
.
setTransferTimeLimit
(
artworkTransferConfMap
.
get
(
routeType
));
}
else
{
item
.
setRouteType
(
""
);
item
.
setTransferTimeLimit
(
0L
);
}
}
}
if
(
stock
==
0
)
{
if
(
stock
==
0
)
{
vo
.
setStatus
(
8
);
vo
.
setStatus
(
8
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinNftGoodsAppServiceImpl.java
View file @
ab5ae604
...
@@ -21,6 +21,7 @@ import java.time.LocalDateTime;
...
@@ -21,6 +21,7 @@ import java.time.LocalDateTime;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
...
@@ -72,17 +73,47 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -72,17 +73,47 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
HashMap
<
String
,
Object
>
map
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
now
,
skuId
);
HashMap
<
String
,
Object
>
map
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
now
,
skuId
);
GoblinGoodsSkuInfoVo
skuInfoVo
=
(
GoblinGoodsSkuInfoVo
)
map
.
get
(
"vo"
);
GoblinGoodsSkuInfoVo
skuInfoVo
=
(
GoblinGoodsSkuInfoVo
)
map
.
get
(
"vo"
);
Integer
tagType
=
(
Integer
)
map
.
get
(
"tagType"
);
Integer
tagType
=
(
Integer
)
map
.
get
(
"tagType"
);
String
listId
=
(
String
)
map
.
get
(
"listId"
);
LocalDateTime
baseSaleStartTime
=
(
LocalDateTime
)
map
.
get
(
"baseSaleStartTime"
);
LocalDateTime
nextSaleStartTime
=
(
LocalDateTime
)
map
.
get
(
"nextSaleStartTime"
);
LocalDateTime
firstSaleStartTime
=
(
LocalDateTime
)
map
.
get
(
"firstSaleStartTime"
);
LocalDateTime
firstSaleEndTime
=
(
LocalDateTime
)
map
.
get
(
"firstSaleEndTime"
);
GoblinNftGoodsSkuListVo
goblinNftGoodsSkuListVo
=
GoblinNftGoodsSkuListVo
.
getNew
().
copy
(
skuInfoVo
);
GoblinNftGoodsSkuListVo
goblinNftGoodsSkuListVo
=
GoblinNftGoodsSkuListVo
.
getNew
().
copy
(
skuInfoVo
);
// spu信息
// spu信息
Object
spuInfoMap
=
spuInfoList
.
get
(
skuInfoVo
.
getSpuId
());
Object
spuInfoMap
=
spuInfoList
.
get
(
skuInfoVo
.
getSpuId
());
if
(
null
==
spuInfoMap
)
{
GoblinGoodsInfoVo
goodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
skuInfoVo
.
getSpuId
());
GoblinGoodsInfoVo
goodsInfoVo
=
goblinRedisUtils
.
getGoodsInfoVo
(
skuInfoVo
.
getSpuId
());
if
(
null
==
spuInfoMap
)
{
GoblinNftGoodsSpuInfoVo
nftGoodsSpuInfoVo
=
GoblinNftGoodsSpuInfoVo
.
getNew
().
copy
(
goodsInfoVo
);
GoblinNftGoodsSpuInfoVo
nftGoodsSpuInfoVo
=
GoblinNftGoodsSpuInfoVo
.
getNew
().
copy
(
goodsInfoVo
);
spuInfoList
.
put
(
skuInfoVo
.
getSpuId
(),
nftGoodsSpuInfoVo
);
spuInfoList
.
put
(
skuInfoVo
.
getSpuId
(),
nftGoodsSpuInfoVo
);
goblinNftGoodsSkuListVo
.
setGoblinNftGoodsSpuInfoVo
(
nftGoodsSpuInfoVo
);
goblinNftGoodsSkuListVo
.
setGoblinNftGoodsSpuInfoVo
(
nftGoodsSpuInfoVo
);
}
else
{
}
else
{
goblinNftGoodsSkuListVo
.
setGoblinNftGoodsSpuInfoVo
((
GoblinNftGoodsSpuInfoVo
)
spuInfoMap
);
goblinNftGoodsSkuListVo
.
setGoblinNftGoodsSpuInfoVo
((
GoblinNftGoodsSpuInfoVo
)
spuInfoMap
);
}
}
// 链
String
routeType
=
""
;
if
(
skuInfoVo
.
getUnbox
().
equals
(
"1"
))
{
for
(
String
routeSkuId
:
goodsInfoVo
.
getSkuIdList
())
{
if
(
""
.
equals
(
routeType
))
{
routeType
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
routeSkuId
).
getRouteType
();
}
else
{
break
;
}
}
}
else
{
routeType
=
skuInfoVo
.
getRouteType
();
}
//转赠时间
Map
<
String
,
Long
>
artworkTransferConfMap
=
goblinRedisUtils
.
getUserDigitalArtworkTransferConfMap
();
goblinNftGoodsSkuListVo
.
setRouteType
(
routeType
);
goblinNftGoodsSkuListVo
.
setTransferTimeLimit
(
artworkTransferConfMap
.
get
(
routeType
));
goblinNftGoodsSkuListVo
.
setTransferable
(
1
);
goblinNftGoodsSkuListVo
.
setListId
(
listId
);
goblinNftGoodsSkuListVo
.
setBaseSaleStartTime
(
baseSaleStartTime
);
goblinNftGoodsSkuListVo
.
setNextSaleStartTime
(
nextSaleStartTime
);
goblinNftGoodsSkuListVo
.
setFirstSaleEndTime
(
firstSaleEndTime
);
goblinNftGoodsSkuListVo
.
setFirstSaleStartTime
(
firstSaleStartTime
);
// 库存、预约
// 库存、预约
if
(
soldOutSkuIdList
.
contains
(
skuId
))
{
// 是售罄的
if
(
soldOutSkuIdList
.
contains
(
skuId
))
{
// 是售罄的
goblinNftGoodsSkuListVo
.
setIsStock
(
0
);
goblinNftGoodsSkuListVo
.
setIsStock
(
0
);
...
@@ -176,10 +207,25 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -176,10 +207,25 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
// 库存
// 库存
HashMap
<
String
,
Integer
>
stockHashMap
=
goblinOrderUtils
.
getIsStock
(
listId
,
skuId
,
skuInfoVo
.
getUnbox
(),
skuInfoVo
.
getSoldoutStatus
(),
goodsInfoVo
.
getSkuIdList
());
HashMap
<
String
,
Integer
>
stockHashMap
=
goblinOrderUtils
.
getIsStock
(
listId
,
skuId
,
skuInfoVo
.
getUnbox
(),
skuInfoVo
.
getSoldoutStatus
(),
goodsInfoVo
.
getSkuIdList
());
nftGoodsSkuInfoVo
.
setIsStock
(
stockHashMap
.
get
(
"isStock"
));
nftGoodsSkuInfoVo
.
setIsStock
(
stockHashMap
.
get
(
"isStock"
));
// 总库存
// 总库存&链
String
routeType
=
""
;
if
(
skuInfoVo
.
getUnbox
().
equals
(
"1"
))
{
if
(
skuInfoVo
.
getUnbox
().
equals
(
"1"
))
{
nftGoodsSkuInfoVo
.
setSkuStock
(
stockHashMap
.
get
(
"totalStock"
));
nftGoodsSkuInfoVo
.
setSkuStock
(
stockHashMap
.
get
(
"totalStock"
));
for
(
String
routeSkuId
:
goodsInfoVo
.
getSkuIdList
())
{
if
(
""
.
equals
(
routeType
))
{
routeType
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
routeSkuId
).
getRouteType
();
}
else
{
break
;
}
}
}
}
else
{
routeType
=
skuInfoVo
.
getRouteType
();
}
//转赠时间
Map
<
String
,
Long
>
artworkTransferConfMap
=
goblinRedisUtils
.
getUserDigitalArtworkTransferConfMap
();
nftGoodsSkuInfoVo
.
setRouteType
(
routeType
);
nftGoodsSkuInfoVo
.
setTransferTimeLimit
(
artworkTransferConfMap
.
get
(
routeType
));
// 系统时间
// 系统时间
nftGoodsSkuInfoVo
.
setSystime
(
LocalDateTime
.
now
());
nftGoodsSkuInfoVo
.
setSystime
(
LocalDateTime
.
now
());
nftGoodsSkuInfoVo
.
setTagType
(
tagType
);
nftGoodsSkuInfoVo
.
setTagType
(
tagType
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinListServiceImpl.java
View file @
ab5ae604
...
@@ -274,6 +274,11 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -274,6 +274,11 @@ public class GoblinListServiceImpl implements IGoblinListService {
redisUtils
.
addGoblinListRelationBox
(
itemVo
.
getSkuId
(),
vo
.
getListId
(),
key
);
redisUtils
.
addGoblinListRelationBox
(
itemVo
.
getSkuId
(),
vo
.
getListId
(),
key
);
}
}
}
}
for
(
String
relationSkuId
:
spuInfoVo
.
getSkuIdList
())
{
if
(
redisUtils
.
getGoodsSkuInfoVo
(
relationSkuId
).
getUnbox
().
equals
(
"0"
))
{
redisUtils
.
addGoblinListRelationBox
(
itemVo
.
getSkuId
(),
vo
.
getListId
(),
relationSkuId
);
}
}
}
else
{
//非盲盒逻辑
}
else
{
//非盲盒逻辑
//库存
//库存
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
ab5ae604
...
@@ -2467,9 +2467,11 @@ public class GoblinRedisUtils {
...
@@ -2467,9 +2467,11 @@ public class GoblinRedisUtils {
public
void
addGoblinListRelationBox
(
String
skuId
,
String
listId
,
String
relationSkuId
)
{
public
void
addGoblinListRelationBox
(
String
skuId
,
String
listId
,
String
relationSkuId
)
{
String
rdk
=
GoblinRedisConst
.
LIST_RELATION_BOX
.
concat
(
skuId
).
concat
(
":"
+
listId
);
String
rdk
=
GoblinRedisConst
.
LIST_RELATION_BOX
.
concat
(
skuId
).
concat
(
":"
+
listId
);
ArrayList
<
String
>
list
=
getGoblinListRelationBox
(
skuId
,
listId
);
ArrayList
<
String
>
list
=
getGoblinListRelationBox
(
skuId
,
listId
);
if
(!
list
.
contains
(
relationSkuId
))
{
list
.
add
(
relationSkuId
);
list
.
add
(
relationSkuId
);
redisUtil
.
set
(
rdk
,
list
);
redisUtil
.
set
(
rdk
,
list
);
}
}
}
/**
/**
* 获取 盲盒skuId 关联 的skuId
* 获取 盲盒skuId 关联 的skuId
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/MixOrderServiceImpl.java
View file @
ab5ae604
...
@@ -195,6 +195,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -195,6 +195,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
return
ResponseDto
.
success
(
payOrder
(
nftOrderList
,
preParam
,
orderMasterCode
,
param
.
getShowUrl
(),
param
.
getReturnUrl
(),
param
.
getDeviceFrom
(),
param
.
getPayType
(),
mixId
,
mixVo
.
getName
(),
param
.
getOpenId
(),
nt
,
storeName
));
return
ResponseDto
.
success
(
payOrder
(
nftOrderList
,
preParam
,
orderMasterCode
,
param
.
getShowUrl
(),
param
.
getReturnUrl
(),
param
.
getDeviceFrom
(),
param
.
getPayType
(),
mixId
,
mixVo
.
getName
(),
param
.
getOpenId
(),
nt
,
storeName
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"mixOrder ERROR MESSAGE:{},EXCEPTION:{}"
,
e
.
getMessage
(),
e
);
initStock
(
canBuyIds
,
mixId
,
isUseLimit
,
uid
);
initStock
(
canBuyIds
,
mixId
,
isUseLimit
,
uid
);
return
ResponseDto
.
failure
();
return
ResponseDto
.
failure
();
}
}
...
@@ -457,7 +458,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -457,7 +458,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
nftItem
.
getNum
(),
nftItem
.
getStoreId
(),
nftItem
.
getStoreName
(),
nftItem
.
getOrderCode
(),
nftItem
.
getUserId
(),
nftItem
.
getUserName
(),
nftItem
.
getUserMobile
(),
nftItem
.
getPriceTotal
(),
nftItem
.
getPriceCoupon
(),
nftItem
.
getNum
(),
nftItem
.
getStoreId
(),
nftItem
.
getStoreName
(),
nftItem
.
getOrderCode
(),
nftItem
.
getUserId
(),
nftItem
.
getUserName
(),
nftItem
.
getUserMobile
(),
nftItem
.
getPriceTotal
(),
nftItem
.
getPriceCoupon
(),
nftItem
.
getStorePriceCoupon
(),
nftItem
.
getPriceRedEnvelope
(),
nftItem
.
getPriceVoucher
(),
nftItem
.
getPriceActual
(),
nftItem
.
getUcouponId
(),
nftItem
.
getStoreCouponId
(),
nftItem
.
getRedEnvelopeCode
(),
nftItem
.
getStatus
(),
nftItem
.
getSource
(),
nftItem
.
getStorePriceCoupon
(),
nftItem
.
getPriceRedEnvelope
(),
nftItem
.
getPriceVoucher
(),
nftItem
.
getPriceActual
(),
nftItem
.
getUcouponId
(),
nftItem
.
getStoreCouponId
(),
nftItem
.
getRedEnvelopeCode
(),
nftItem
.
getStatus
(),
nftItem
.
getSource
(),
nftItem
.
getOrderType
(),
nftItem
.
getPayType
(),
nftItem
.
getDeviceFrom
(),
nftItem
.
getVersion
(),
nftItem
.
getPayCountdownMinute
(),
nftItem
.
getIpAddress
(),
nftItem
.
getCreatedAt
(),
nftItem
.
getPayCode
(),
nftItem
.
getOrderType
(),
nftItem
.
getPayType
(),
nftItem
.
getDeviceFrom
(),
nftItem
.
getVersion
(),
nftItem
.
getPayCountdownMinute
(),
nftItem
.
getIpAddress
(),
nftItem
.
getCreatedAt
(),
nftItem
.
getPayCode
(),
nftItem
.
getSkuTitle
(),
nftItem
.
getListId
(),
nftItem
.
getExCode
(),
mixId
,
masterCode
nftItem
.
getSkuTitle
(),
nftItem
.
getListId
(),
nftItem
.
getExCode
(),
mixId
,
masterCode
});
});
// 订单vo redis
// 订单vo redis
GoblinNftOrderVo
orderVo
=
GoblinNftOrderVo
.
getNew
().
copyMix
(
nftItem
,
mixId
,
mixName
);
GoblinNftOrderVo
orderVo
=
GoblinNftOrderVo
.
getNew
().
copyMix
(
nftItem
,
mixId
,
mixName
);
...
@@ -490,7 +491,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -490,7 +491,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
sqlDataGoblin
.
add
(
new
Object
[]{
sqlDataGoblin
.
add
(
new
Object
[]{
storeOrder
.
getMasterOrderCode
(),
storeOrder
.
getOrderId
(),
storeOrder
.
getStoreId
(),
storeOrder
.
getStoreName
(),
storeOrder
.
getOrderCode
(),
storeOrder
.
getUserId
(),
storeOrder
.
getUserName
(),
storeOrder
.
getUserMobile
(),
storeOrder
.
getPriceTotal
(),
storeOrder
.
getPayCode
(),
storeOrder
.
getMasterOrderCode
(),
storeOrder
.
getOrderId
(),
storeOrder
.
getStoreId
(),
storeOrder
.
getStoreName
(),
storeOrder
.
getOrderCode
(),
storeOrder
.
getUserId
(),
storeOrder
.
getUserName
(),
storeOrder
.
getUserMobile
(),
storeOrder
.
getPriceTotal
(),
storeOrder
.
getPayCode
(),
storeOrder
.
getPriceActual
(),
storeOrder
.
getPriceRefund
(),
storeOrder
.
getPriceExpress
(),
storeOrder
.
getPriceCoupon
(),
storeOrder
.
getStorePriceCoupon
(),
storeOrder
.
getPriceVoucher
(),
storeOrder
.
getStatus
(),
storeOrder
.
getUcouponId
(),
storeOrder
.
getStoreCouponId
(),
storeOrder
.
getPayType
(),
storeOrder
.
getDeviceFrom
(),
storeOrder
.
getPriceActual
(),
storeOrder
.
getPriceRefund
(),
storeOrder
.
getPriceExpress
(),
storeOrder
.
getPriceCoupon
(),
storeOrder
.
getStorePriceCoupon
(),
storeOrder
.
getPriceVoucher
(),
storeOrder
.
getStatus
(),
storeOrder
.
getUcouponId
(),
storeOrder
.
getStoreCouponId
(),
storeOrder
.
getPayType
(),
storeOrder
.
getDeviceFrom
(),
storeOrder
.
getSource
(),
storeOrder
.
getVersion
(),
storeOrder
.
getIsMember
(),
storeOrder
.
getOrderType
(),
storeOrder
.
getWriteOffCode
(),
storeOrder
.
getPayCountdownMinute
(),
storeOrder
.
getIpAddress
(),
storeOrder
.
getMarketId
(),
storeOrder
.
getMarketType
(),
storeOrder
.
getCreatedAt
(),
mixId
,
masterCode
storeOrder
.
getSource
(),
storeOrder
.
getVersion
(),
storeOrder
.
getIsMember
(),
storeOrder
.
getOrderType
(),
storeOrder
.
getWriteOffCode
(),
storeOrder
.
getPayCountdownMinute
(),
storeOrder
.
getIpAddress
(),
storeOrder
.
getMarketId
(),
storeOrder
.
getMarketType
(),
storeOrder
.
getCreatedAt
(),
mixId
,
masterCode
});
});
GoblinOrderAttr
orderAttr
=
preParam
.
getOrderAttr
();
GoblinOrderAttr
orderAttr
=
preParam
.
getOrderAttr
();
sqlDataAttr
.
add
(
new
Object
[]{
sqlDataAttr
.
add
(
new
Object
[]{
...
@@ -813,7 +814,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -813,7 +814,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
break
;
break
;
}
}
String
nftR
=
nftCheck
(
uid
,
orderId
);
String
nftR
=
nftCheck
(
uid
,
orderId
);
if
(
vo
.
getMixId
()==
null
)
{
if
(
vo
.
getMixId
()
==
null
)
{
vo
.
setMixId
(
nftOrderUtils
.
getNftOrder
(
orderId
).
getMixId
());
vo
.
setMixId
(
nftOrderUtils
.
getNftOrder
(
orderId
).
getMixId
());
}
}
if
(
"订单不存在"
.
equals
(
nftR
))
{
if
(
"订单不存在"
.
equals
(
nftR
))
{
...
@@ -828,7 +829,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
...
@@ -828,7 +829,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
break
;
break
;
}
}
String
goblinR
=
goblinCheck
(
uid
,
orderId
);
String
goblinR
=
goblinCheck
(
uid
,
orderId
);
if
(
vo
.
getMixId
()==
null
)
{
if
(
vo
.
getMixId
()
==
null
)
{
vo
.
setMixId
(
redisUtils
.
getGoblinOrder
(
orderId
).
getMixId
());
vo
.
setMixId
(
redisUtils
.
getGoblinOrder
(
orderId
).
getMixId
());
}
}
if
(
"订单不存在"
.
equals
(
goblinR
))
{
if
(
"订单不存在"
.
equals
(
goblinR
))
{
...
...
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