Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
yimu
mall-server
Commits
fc983665
Commit
fc983665
authored
Dec 27, 2021
by
wlx@33.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正退款
parent
c2fa5543
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
AssetServiceImpl.java
...mall/server/admin/user/service/impl/AssetServiceImpl.java
+5
-6
No files found.
mall-server-admin/src/main/java/com/fzm/mall/server/admin/user/service/impl/AssetServiceImpl.java
View file @
fc983665
...
...
@@ -36,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
...
...
@@ -112,7 +111,6 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
//判断商品是否为NFT
GoodsSpuVO
goodsSpu
=
spuMapper
.
readByCoin
(
merchantId
,
coin
);
goodsSpu
.
initTokenId
();
boolean
isSalesNFTCopy
=
goodsSpu
.
getNftSalesType
().
equals
(
Spu
.
NFT_SALES_TYPE_COPY
);
boolean
commodityPassAuto
=
goodsSpu
.
getCommodityPass
().
equals
(
Spu
.
COMMODITY_PASS_AUTO
);
/**
...
...
@@ -123,7 +121,7 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
* NFT商品为“使用权销售时”,根据订单购买的编号重置为未使用
*/
List
<
Integer
>
serialNoList
=
JSON
.
parseArray
(
serialNo
,
int
.
class
);
if
(
updateSkuSerialNo
){
if
(
updateSkuSerialNo
)
{
updateSkuSerialNo
(
serialNoList
,
merchantId
,
coin
,
isSalesNFTCopy
);
}
//根据开关判断是否走链,默认不走链
...
...
@@ -131,12 +129,12 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
/**
* NFT商品为“使用权销售”,tokenId+编号,循环转账操作
*/
if
(
isSalesNFTCopy
){
if
(
isSalesNFTCopy
)
{
serialNoList
.
forEach
(
index
->
{
Long
tokenId
=
Long
.
valueOf
(
index
);
payInChain
(
tableType
,
tableId
,
fromAddr
,
toAddr
,
coin
,
1
,
tokenId
,
commodityPassAuto
,
isSalesNFTCopy
);
});
}
else
{
}
else
{
payInChain
(
tableType
,
tableId
,
fromAddr
,
toAddr
,
coin
,
number
,
goodsSpu
.
getTokenId
(),
commodityPassAuto
,
isSalesNFTCopy
);
}
}
...
...
@@ -234,7 +232,7 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
}
private
void
payInChain
(
int
tableType
,
String
tableId
,
String
fromAddr
,
String
toAddr
,
String
coin
,
int
number
,
Long
tokenId
,
boolean
commodityPassAuto
,
boolean
isSalesNFTCopy
){
Long
tokenId
,
boolean
commodityPassAuto
,
boolean
isSalesNFTCopy
)
{
TranDto
tranDto
=
new
TranDto
();
tranDto
.
setFromAddr
(
fromAddr
);
tranDto
.
setToAddr
(
toAddr
);
...
...
@@ -243,6 +241,7 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
tranDto
.
setAmount
(
new
BigDecimal
(
number
));
tranDto
.
setTableId
(
tableId
);
tranDto
.
setTableType
(
tableType
);
tranDto
.
setTokenId
(
tokenId
);
String
hash
;
/**
* 一幕所有的nft都是内部nft
...
...
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