记得上下班打卡 | 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
c4443c8d
Commit
c4443c8d
authored
Jul 23, 2022
by
Administrator
🎨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pre' into 'master'
Pre See merge request
!280
parents
f38f88bc
143a8a49
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
110 additions
and
65 deletions
+110
-65
application-dev.yml
liquidnet-bus-config/liquidnet-config/application-dev.yml
+2
-2
application-test.yml
liquidnet-bus-config/liquidnet-config/application-test.yml
+2
-2
AbstractOrderCloseReceiver.java
...e/consumer/kylin/receiver/AbstractOrderCloseReceiver.java
+12
-6
AbstractOrderCloseReceiver.java
...e/consumer/order/receiver/AbstractOrderCloseReceiver.java
+12
-6
XuperTradeCommonBiz.java
.../service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
+1
-1
XuperArtworkBiz.java
...dnet/service/galaxy/router/xuper/biz/XuperArtworkBiz.java
+1
-1
GoblinCouponImpl.java
...quidnet/service/goblin/service/impl/GoblinCouponImpl.java
+12
-3
GoblinUserDigitalArtworkServiceImpl.java
...lin/service/impl/GoblinUserDigitalArtworkServiceImpl.java
+34
-30
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+7
-5
GoblinMongoUtils.java
...a/com/liquidnet/service/order/utils/GoblinMongoUtils.java
+11
-5
GoblinNftOrderUtils.java
...om/liquidnet/service/order/utils/GoblinNftOrderUtils.java
+4
-1
GoblinOrderUtils.java
...a/com/liquidnet/service/order/utils/GoblinOrderUtils.java
+12
-3
No files found.
liquidnet-bus-config/liquidnet-config/application-dev.yml
View file @
c4443c8d
...
@@ -139,8 +139,8 @@ liquidnet:
...
@@ -139,8 +139,8 @@ liquidnet:
xuper
:
xuper
:
nftApiUrl
:
http://120.48.16.137:8360
nftApiUrl
:
http://120.48.16.137:8360
appId
:
110353
appId
:
110353
accessKeyID
:
4
4b69914377ed77613824781da9e8653
accessKeyID
:
4
e99daf33303efc8c822daa90c925389
secretAccessKey
:
99b946f9dba244e7a3d5bc7a1862ef39
secretAccessKey
:
ac77c0e94424edd98ea8a23b342e877a
nftPlatformMnemonic
:
person lucky trophy wall kangaroo body bounce coach unable sister second goat guitar virus tree security acoustic ankle kiss deputy sunny message weapon believe
nftPlatformMnemonic
:
person lucky trophy wall kangaroo body bounce coach unable sister second goat guitar virus tree security acoustic ankle kiss deputy sunny message weapon believe
nftPlatformAddress
:
YqsYxgBSP74piDhNQHTjWMH9wXnXxZbt8
nftPlatformAddress
:
YqsYxgBSP74piDhNQHTjWMH9wXnXxZbt8
other
:
other
:
...
...
liquidnet-bus-config/liquidnet-config/application-test.yml
View file @
c4443c8d
...
@@ -139,8 +139,8 @@ liquidnet:
...
@@ -139,8 +139,8 @@ liquidnet:
xuper
:
xuper
:
nftApiUrl
:
http://120.48.16.137:8360
nftApiUrl
:
http://120.48.16.137:8360
appId
:
110353
appId
:
110353
accessKeyID
:
4
4b69914377ed77613824781da9e8653
accessKeyID
:
4
e99daf33303efc8c822daa90c925389
secretAccessKey
:
99b946f9dba244e7a3d5bc7a1862ef39
secretAccessKey
:
ac77c0e94424edd98ea8a23b342e877a
nftPlatformMnemonic
:
person lucky trophy wall kangaroo body bounce coach unable sister second goat guitar virus tree security acoustic ankle kiss deputy sunny message weapon believe
nftPlatformMnemonic
:
person lucky trophy wall kangaroo body bounce coach unable sister second goat guitar virus tree security acoustic ankle kiss deputy sunny message weapon believe
nftPlatformAddress
:
YqsYxgBSP74piDhNQHTjWMH9wXnXxZbt8
nftPlatformAddress
:
YqsYxgBSP74piDhNQHTjWMH9wXnXxZbt8
other
:
other
:
...
...
liquidnet-bus-service/liquidnet-service-consumer-all/liquidnet-service-consumer-kylin/src/main/java/com/liquidnet/service/consumer/kylin/receiver/AbstractOrderCloseReceiver.java
View file @
c4443c8d
...
@@ -23,6 +23,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
...
@@ -23,6 +23,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Update
;
import
org.springframework.data.redis.connection.stream.MapRecord
;
import
org.springframework.data.redis.connection.stream.MapRecord
;
import
org.springframework.data.redis.connection.stream.StreamRecords
;
import
org.springframework.data.redis.connection.stream.StreamRecords
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
...
@@ -293,7 +294,10 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -293,7 +294,10 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
vo
.
setState
(
1
);
vo
.
setState
(
1
);
vo
.
setUsedFor
(
""
);
vo
.
setUsedFor
(
""
);
setUserCouponVos
(
params
.
getUid
(),
voList
);
setUserCouponVos
(
params
.
getUid
(),
voList
);
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
1
);
basicVo
.
setUsedFor
(
""
);
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
@@ -337,11 +341,13 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -337,11 +341,13 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
return
vos
;
return
vos
;
}
}
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponVo
vo
)
{
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponBasicVo
vo
)
{
return
mongoTemplate
.
getCollection
(
GoblinUserCouponVo
.
class
.
getSimpleName
())
return
mongoTemplate
.
getCollection
(
GoblinUserCouponBasicVo
.
class
.
getSimpleName
()).
updateOne
(
.
updateOne
(
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
vo
))
Update
.
update
(
"state"
,
vo
.
getState
())
).
getModifiedCount
()
>
0
;
.
set
(
"usedFor"
,
vo
.
getUsedFor
())
.
getUpdateObject
()
).
getModifiedCount
()
>
0
;
}
}
public
boolean
setUserCouponVos
(
String
uid
,
List
<
GoblinUserCouponVo
>
vos
)
{
public
boolean
setUserCouponVos
(
String
uid
,
List
<
GoblinUserCouponVo
>
vos
)
{
...
...
liquidnet-bus-service/liquidnet-service-consumer-all/liquidnet-service-consumer-order/src/main/java/com/liquidnet/service/consumer/order/receiver/AbstractOrderCloseReceiver.java
View file @
c4443c8d
...
@@ -32,6 +32,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
...
@@ -32,6 +32,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Update
;
import
org.springframework.data.redis.connection.stream.MapRecord
;
import
org.springframework.data.redis.connection.stream.MapRecord
;
import
org.springframework.data.redis.connection.stream.StreamRecords
;
import
org.springframework.data.redis.connection.stream.StreamRecords
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
...
@@ -495,7 +496,10 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -495,7 +496,10 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
vo
.
setState
(
1
);
vo
.
setState
(
1
);
vo
.
setUsedFor
(
""
);
vo
.
setUsedFor
(
""
);
setUserCouponVos
(
params
.
getUid
(),
voList
);
setUserCouponVos
(
params
.
getUid
(),
voList
);
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
1
);
basicVo
.
setUsedFor
(
""
);
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
@@ -545,11 +549,13 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -545,11 +549,13 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
return
(
int
)
redisUtil
.
decr
(
rdk
,
1
);
return
(
int
)
redisUtil
.
decr
(
rdk
,
1
);
}
}
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponVo
vo
)
{
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponBasicVo
vo
)
{
return
mongoTemplate
.
getCollection
(
GoblinUserCouponVo
.
class
.
getSimpleName
())
return
mongoTemplate
.
getCollection
(
GoblinUserCouponBasicVo
.
class
.
getSimpleName
()).
updateOne
(
.
updateOne
(
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
vo
))
Update
.
update
(
"state"
,
vo
.
getState
())
).
getModifiedCount
()
>
0
;
.
set
(
"usedFor"
,
vo
.
getUsedFor
())
.
getUpdateObject
()
).
getModifiedCount
()
>
0
;
}
}
public
boolean
setUserCouponVos
(
String
uid
,
List
<
GoblinUserCouponVo
>
vos
)
{
public
boolean
setUserCouponVos
(
String
uid
,
List
<
GoblinUserCouponVo
>
vos
)
{
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperTradeCommonBiz.java
View file @
c4443c8d
...
@@ -573,7 +573,7 @@ public class XuperTradeCommonBiz {
...
@@ -573,7 +573,7 @@ public class XuperTradeCommonBiz {
GalaxyNftPublishResultQueryRespDto
nftPublishResultQueryRespDto
=
GalaxyNftPublishResultQueryRespDto
.
getNew
();
GalaxyNftPublishResultQueryRespDto
nftPublishResultQueryRespDto
=
GalaxyNftPublishResultQueryRespDto
.
getNew
();
nftPublishResultQueryRespDto
.
setNftIdBegin
(
nftOrderBo
.
getNftId
());
nftPublishResultQueryRespDto
.
setNftIdBegin
(
nftOrderBo
.
getNftId
());
nftPublishResultQueryRespDto
.
setTaskMsg
(
nftOrderBo
.
getNftId
());
nftPublishResultQueryRespDto
.
setTaskMsg
(
nftOrderBo
.
getNftId
());
nftPublishResultQueryRespDto
.
setTxHash
(
nftOrderBo
.
getNftPublishTradeHash
());
nftPublishResultQueryRespDto
.
setTxHash
(
assetMeta
.
getTxId
());
nftPublishResultQueryRespDto
.
setChainTimestamp
(
nftPublishChainTimestampStr
);
nftPublishResultQueryRespDto
.
setChainTimestamp
(
nftPublishChainTimestampStr
);
nftPublishResultQueryRespDto
.
setTaskStatus
(
Integer
.
valueOf
(
nftPublishStatusStr
));
nftPublishResultQueryRespDto
.
setTaskStatus
(
Integer
.
valueOf
(
nftPublishStatusStr
));
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/galaxy/router/xuper/biz/XuperArtworkBiz.java
View file @
c4443c8d
...
@@ -342,7 +342,7 @@ public class XuperArtworkBiz {
...
@@ -342,7 +342,7 @@ public class XuperArtworkBiz {
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
log
.
error
(
"sys error msg "
+
e
.
getMessage
(),
e
);
}
}
log
.
info
(
"seriesClaimResultQuery resp : "
+
JsonUtils
.
toJson
(
respDto
));
log
.
info
(
"seriesClaimResultQuery resp : "
+
JsonUtils
.
toJson
(
respDto
));
if
(
respDto
.
getErrNo
()
==
Integer
.
parseInt
(
ErrorCode
.
SUCCESS
.
getCode
())){
if
(
StringUtil
.
isNotNull
(
respDto
)&&
respDto
.
getErrNo
()
==
Integer
.
parseInt
(
ErrorCode
.
SUCCESS
.
getCode
())){
if
(
respDto
.
getMeta
().
getStatus
()
==
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
())){
if
(
respDto
.
getMeta
().
getStatus
()
==
Integer
.
parseInt
(
XuperEnum
.
AssetPublishStatusEnum
.
INIT
.
getCode
())){
//设置系列声明状态
//设置系列声明状态
seriesInfoBo
.
setSeriesClaimStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
SUCCESS
.
getCode
());
seriesInfoBo
.
setSeriesClaimStatus
(
GalaxyEnum
.
SeriesClaimStatusEnum
.
SUCCESS
.
getCode
());
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinCouponImpl.java
View file @
c4443c8d
...
@@ -345,7 +345,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -345,7 +345,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
}
vo
.
setState
(
5
);
vo
.
setState
(
5
);
vo
.
setUsedFor
(
content
);
vo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
5
);
basicVo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
break
;
break
;
...
@@ -374,7 +377,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -374,7 +377,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
}
vo
.
setState
(
5
);
vo
.
setState
(
5
);
vo
.
setUsedFor
(
content
);
vo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
5
);
basicVo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
@@ -402,7 +408,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
...
@@ -402,7 +408,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
vo
.
setState
(
1
);
vo
.
setState
(
1
);
vo
.
setUsedFor
(
""
);
vo
.
setUsedFor
(
""
);
goblinRedisUtils
.
setUserCouponVos
(
item
.
getUid
(),
voList
);
goblinRedisUtils
.
setUserCouponVos
(
item
.
getUid
(),
voList
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
1
);
basicVo
.
setUsedFor
(
""
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinUserDigitalArtworkServiceImpl.java
View file @
c4443c8d
...
@@ -358,36 +358,40 @@ public class GoblinUserDigitalArtworkServiceImpl implements IGoblinUserDigitalAr
...
@@ -358,36 +358,40 @@ public class GoblinUserDigitalArtworkServiceImpl implements IGoblinUserDigitalAr
private
void
updateUserDigitalArtworkByChainTrade
(
GoblinUserDigitalArtworkVo
userDigitalArtworkVo
,
GoblinUserDigitalArtworkListVo
listVo
,
private
void
updateUserDigitalArtworkByChainTrade
(
GoblinUserDigitalArtworkVo
userDigitalArtworkVo
,
GoblinUserDigitalArtworkListVo
listVo
,
String
routerType
,
LocalDateTime
now
)
{
String
routerType
,
LocalDateTime
now
)
{
GalaxyNftPublishAndBuyResultQueryReqDto
nftTradeQueryReqDto
=
GalaxyNftPublishAndBuyResultQueryReqDto
.
getNew
();
try
{
nftTradeQueryReqDto
.
setUserId
(
userDigitalArtworkVo
.
getUid
());
GalaxyNftPublishAndBuyResultQueryReqDto
nftTradeQueryReqDto
=
GalaxyNftPublishAndBuyResultQueryReqDto
.
getNew
();
nftTradeQueryReqDto
.
setNftOrderPayId
(
userDigitalArtworkVo
.
getOrderId
());
nftTradeQueryReqDto
.
setUserId
(
userDigitalArtworkVo
.
getUid
());
nftTradeQueryReqDto
.
setRouterType
(
routerType
);
nftTradeQueryReqDto
.
setNftOrderPayId
(
userDigitalArtworkVo
.
getOrderId
());
ResponseDto
<
GalaxyNftPublishAndBuyResultQueryRespDto
>
nftTradeQueryRespDto
=
galaxyTradeService
.
nftPublishAndBuyResultQuery
(
nftTradeQueryReqDto
);
nftTradeQueryReqDto
.
setRouterType
(
routerType
);
if
(
nftTradeQueryRespDto
.
isSuccess
())
{
ResponseDto
<
GalaxyNftPublishAndBuyResultQueryRespDto
>
nftTradeQueryRespDto
=
galaxyTradeService
.
nftPublishAndBuyResultQuery
(
nftTradeQueryReqDto
);
GalaxyNftPublishAndBuyResultQueryRespDto
nftTradeQueryRespDtoData
=
nftTradeQueryRespDto
.
getData
();
if
(
nftTradeQueryRespDto
.
isSuccess
())
{
String
nftId
=
nftTradeQueryRespDtoData
.
getNftId
();
GalaxyNftPublishAndBuyResultQueryRespDto
nftTradeQueryRespDtoData
=
nftTradeQueryRespDto
.
getData
();
String
nftId
=
nftTradeQueryRespDtoData
.
getNftId
();
listVo
.
setState
(
1
);
listVo
.
setEditionSn
(
Integer
.
valueOf
(
nftId
.
substring
(
nftId
.
indexOf
(
"_"
)
+
1
)));
listVo
.
setState
(
1
);
listVo
.
setEditionSn
(
Integer
.
valueOf
(
nftId
.
substring
(
nftId
.
indexOf
(
"_"
)
+
1
)));
userDigitalArtworkVo
.
setEditionSn
(
listVo
.
getEditionSn
());
userDigitalArtworkVo
.
setNftId
(
nftId
);
userDigitalArtworkVo
.
setEditionSn
(
listVo
.
getEditionSn
());
userDigitalArtworkVo
.
setReleaseAt
(
nftTradeQueryRespDtoData
.
getNftPublishChainTimestamp
());
userDigitalArtworkVo
.
setNftId
(
nftId
);
userDigitalArtworkVo
.
setReleaseTxhash
(
nftTradeQueryRespDtoData
.
getNftPublishTradeHash
());
userDigitalArtworkVo
.
setReleaseAt
(
nftTradeQueryRespDtoData
.
getNftPublishChainTimestamp
());
userDigitalArtworkVo
.
setTradingAt
(
nftTradeQueryRespDtoData
.
getNftBuyChainTimestamp
());
userDigitalArtworkVo
.
setReleaseTxhash
(
nftTradeQueryRespDtoData
.
getNftPublishTradeHash
());
userDigitalArtworkVo
.
setTradingTxhash
(
nftTradeQueryRespDtoData
.
getNftBuyTradeHash
());
userDigitalArtworkVo
.
setTradingAt
(
nftTradeQueryRespDtoData
.
getNftBuyChainTimestamp
());
userDigitalArtworkVo
.
setState
(
1
);
userDigitalArtworkVo
.
setTradingTxhash
(
nftTradeQueryRespDtoData
.
getNftBuyTradeHash
());
userDigitalArtworkVo
.
setUpdatedAt
(
now
);
userDigitalArtworkVo
.
setState
(
1
);
userDigitalArtworkVo
.
setUpdatedAt
(
now
);
goblinRedisUtils
.
setUserDigitalArtworkVo
(
userDigitalArtworkVo
);
goblinMongoUtils
.
updateUserDigitalArtworkVoByChainTrade
(
userDigitalArtworkVo
);
goblinRedisUtils
.
setUserDigitalArtworkVo
(
userDigitalArtworkVo
);
goblinMongoUtils
.
updateUserDigitalArtworkVoByChainTrade
(
userDigitalArtworkVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_ARTWORK_GEN
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_digital_artwork.update_for_chain"
,
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_ARTWORK_GEN
.
getKey
(),
userDigitalArtworkVo
.
getEditionSn
(),
userDigitalArtworkVo
.
getNftId
(),
userDigitalArtworkVo
.
getReleaseTxhash
(),
SqlMapping
.
get
(
"goblin_user_digital_artwork.update_for_chain"
,
userDigitalArtworkVo
.
getReleaseAt
(),
userDigitalArtworkVo
.
getTradingTxhash
(),
userDigitalArtworkVo
.
getTradingAt
(),
userDigitalArtworkVo
.
getEditionSn
(),
userDigitalArtworkVo
.
getNftId
(),
userDigitalArtworkVo
.
getReleaseTxhash
(),
userDigitalArtworkVo
.
getState
(),
userDigitalArtworkVo
.
getUpdatedAt
(),
userDigitalArtworkVo
.
getArtworkId
())
userDigitalArtworkVo
.
getReleaseAt
(),
userDigitalArtworkVo
.
getTradingTxhash
(),
userDigitalArtworkVo
.
getTradingAt
(),
);
userDigitalArtworkVo
.
getState
(),
userDigitalArtworkVo
.
getUpdatedAt
(),
userDigitalArtworkVo
.
getArtworkId
())
);
}
}
catch
(
NumberFormatException
e
)
{
log
.
error
(
"Ex.我的藏品列表:藏品上链结果查询处理失败[uid={},orderId={}]"
,
userDigitalArtworkVo
.
getUid
(),
userDigitalArtworkVo
.
getOrderId
(),
e
);
}
}
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
c4443c8d
...
@@ -1567,11 +1567,13 @@ public class GoblinMongoUtils {
...
@@ -1567,11 +1567,13 @@ public class GoblinMongoUtils {
return
mongoTemplate
.
insert
(
vo
,
GoblinUserCouponBasicVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
insert
(
vo
,
GoblinUserCouponBasicVo
.
class
.
getSimpleName
());
}
}
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponVo
vo
)
{
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponBasicVo
vo
)
{
return
mongoTemplate
.
getCollection
(
GoblinUserCouponVo
.
class
.
getSimpleName
())
return
mongoTemplate
.
getCollection
(
GoblinUserCouponBasicVo
.
class
.
getSimpleName
()).
updateOne
(
.
updateOne
(
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
ObjectUtil
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
vo
))
Update
.
update
(
"state"
,
vo
.
getState
())
).
getModifiedCount
()
>
0
;
.
set
(
"usedFor"
,
vo
.
getUsedFor
())
.
getUpdateObject
()
).
getModifiedCount
()
>
0
;
}
}
/* ---------------------------------------- 我的藏品 ---------------------------------------- */
/* ---------------------------------------- 我的藏品 ---------------------------------------- */
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinMongoUtils.java
View file @
c4443c8d
...
@@ -8,6 +8,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
...
@@ -8,6 +8,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.convert.MongoConverter
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Update
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -43,6 +44,7 @@ public class GoblinMongoUtils {
...
@@ -43,6 +44,7 @@ public class GoblinMongoUtils {
public
GoblinStoreOrderVo
insertGoblinStoreOrderVo
(
GoblinStoreOrderVo
vo
)
{
public
GoblinStoreOrderVo
insertGoblinStoreOrderVo
(
GoblinStoreOrderVo
vo
)
{
return
mongoTemplate
.
insert
(
vo
,
GoblinStoreOrderVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
insert
(
vo
,
GoblinStoreOrderVo
.
class
.
getSimpleName
());
}
}
public
void
insertGoblinStoreOrderVos
(
List
<
GoblinStoreOrderVo
>
vos
)
{
public
void
insertGoblinStoreOrderVos
(
List
<
GoblinStoreOrderVo
>
vos
)
{
mongoTemplate
.
insert
(
vos
,
GoblinStoreOrderVo
.
class
.
getSimpleName
());
mongoTemplate
.
insert
(
vos
,
GoblinStoreOrderVo
.
class
.
getSimpleName
());
}
}
...
@@ -89,11 +91,13 @@ public class GoblinMongoUtils {
...
@@ -89,11 +91,13 @@ public class GoblinMongoUtils {
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"backCode"
).
is
(
backCode
)),
GoblinBackOrderVo
.
class
,
GoblinBackOrderVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"backCode"
).
is
(
backCode
)),
GoblinBackOrderVo
.
class
,
GoblinBackOrderVo
.
class
.
getSimpleName
());
}
}
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponVo
vo
)
{
public
Boolean
changeCouponVos
(
String
ucouponId
,
GoblinUserCouponBasicVo
vo
)
{
return
mongoTemplate
.
getCollection
(
GoblinUserCouponVo
.
class
.
getSimpleName
())
return
mongoTemplate
.
getCollection
(
GoblinUserCouponBasicVo
.
class
.
getSimpleName
()).
updateOne
(
.
updateOne
(
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
Query
.
query
(
Criteria
.
where
(
"ucouponId"
).
is
(
ucouponId
)).
getQueryObject
(),
ObjectUtil
.
cloneBasicDBObject
().
append
(
"$set"
,
mongoConverter
.
convertToMongoType
(
vo
))
Update
.
update
(
"state"
,
vo
.
getState
())
).
getModifiedCount
()
>
0
;
.
set
(
"usedFor"
,
vo
.
getUsedFor
())
.
getUpdateObject
()
).
getModifiedCount
()
>
0
;
}
}
public
GoblinStoreCouponBasicVo
getMgtStoreCouponBasicVo
(
String
storeCouponId
)
{
public
GoblinStoreCouponBasicVo
getMgtStoreCouponBasicVo
(
String
storeCouponId
)
{
...
@@ -126,10 +130,12 @@ public class GoblinMongoUtils {
...
@@ -126,10 +130,12 @@ public class GoblinMongoUtils {
public
GoblinNftOrderRefundVo
insertGoblinNftOrderRefundVo
(
GoblinNftOrderRefundVo
vo
)
{
public
GoblinNftOrderRefundVo
insertGoblinNftOrderRefundVo
(
GoblinNftOrderRefundVo
vo
)
{
return
mongoTemplate
.
insert
(
vo
,
GoblinNftOrderRefundVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
insert
(
vo
,
GoblinNftOrderRefundVo
.
class
.
getSimpleName
());
}
}
//获取 订单退款数据
//获取 订单退款数据
public
GoblinNftOrderRefundVo
getGoblinNftOrderRefundVo
(
String
refundCode
)
{
public
GoblinNftOrderRefundVo
getGoblinNftOrderRefundVo
(
String
refundCode
)
{
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"refundCode"
).
is
(
refundCode
)),
GoblinNftOrderRefundVo
.
class
,
GoblinNftOrderRefundVo
.
class
.
getSimpleName
());
return
mongoTemplate
.
findOne
(
Query
.
query
(
Criteria
.
where
(
"refundCode"
).
is
(
refundCode
)),
GoblinNftOrderRefundVo
.
class
,
GoblinNftOrderRefundVo
.
class
.
getSimpleName
());
}
}
//修改 订单退款数据
//修改 订单退款数据
public
UpdateResult
updateGoblinNftOrderRefundVo
(
String
orderRefundId
,
HashMap
<
String
,
Object
>
data
)
{
public
UpdateResult
updateGoblinNftOrderRefundVo
(
String
orderRefundId
,
HashMap
<
String
,
Object
>
data
)
{
return
mongoTemplate
.
getCollection
(
GoblinNftOrderRefundVo
.
class
.
getSimpleName
()).
updateOne
(
return
mongoTemplate
.
getCollection
(
GoblinNftOrderRefundVo
.
class
.
getSimpleName
()).
updateOne
(
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinNftOrderUtils.java
View file @
c4443c8d
...
@@ -310,7 +310,10 @@ public class GoblinNftOrderUtils {
...
@@ -310,7 +310,10 @@ public class GoblinNftOrderUtils {
// 更新券信息
// 更新券信息
vo
.
setState
(
5
);
vo
.
setState
(
5
);
vo
.
setUsedFor
(
content
);
vo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
5
);
basicVo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinOrderUtils.java
View file @
c4443c8d
...
@@ -273,7 +273,10 @@ public class GoblinOrderUtils {
...
@@ -273,7 +273,10 @@ public class GoblinOrderUtils {
}
}
vo
.
setState
(
5
);
vo
.
setState
(
5
);
vo
.
setUsedFor
(
content
);
vo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
5
);
basicVo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
break
;
break
;
...
@@ -321,7 +324,10 @@ public class GoblinOrderUtils {
...
@@ -321,7 +324,10 @@ public class GoblinOrderUtils {
}
}
vo
.
setState
(
5
);
vo
.
setState
(
5
);
vo
.
setUsedFor
(
content
);
vo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
5
);
basicVo
.
setUsedFor
(
content
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
@@ -352,7 +358,10 @@ public class GoblinOrderUtils {
...
@@ -352,7 +358,10 @@ public class GoblinOrderUtils {
vo
.
setState
(
1
);
vo
.
setState
(
1
);
vo
.
setUsedFor
(
""
);
vo
.
setUsedFor
(
""
);
redisUtils
.
setUserCouponVos
(
item
.
getUid
(),
voList
);
redisUtils
.
setUserCouponVos
(
item
.
getUid
(),
voList
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
vo
);
GoblinUserCouponBasicVo
basicVo
=
GoblinUserCouponBasicVo
.
getNew
();
basicVo
.
setState
(
1
);
basicVo
.
setUsedFor
(
""
);
goblinMongoUtils
.
changeCouponVos
(
vo
.
getUcouponId
(),
basicVo
);
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
queueUtils
.
sendMsgByRedis
(
MQConst
.
GoblinQueue
.
SQL_COUPON
.
getKey
(),
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
SqlMapping
.
get
(
"goblin_user_coupon.updateState"
,
vo
.
getState
(),
vo
.
getUsedFor
(),
LocalDateTime
.
now
(),
vo
.
getUcouponId
()));
}
}
...
...
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