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
09cc5714
Commit
09cc5714
authored
Feb 28, 2022
by
wlx@33.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正盲盒下单
parent
8bc10a90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
OrderServiceImpl.java
...all/server/front/order/service/impl/OrderServiceImpl.java
+2
-2
mall_create.sql
mall-sql/mall_create.sql
+5
-2
No files found.
mall-server-front/src/main/java/com/fzm/mall/server/front/order/service/impl/OrderServiceImpl.java
View file @
09cc5714
...
...
@@ -1519,8 +1519,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
*/
BigDecimal
avilableNum
=
payableAmount
.
divide
(
price
,
2
,
RoundingMode
.
UP
);
result
=
avilableNum
.
compareTo
(
orderVo
.
getCoinNumber
())
==
CommonConst
.
BIEDICIMAL_LEFT_GREATER
?
orderVo
.
getCoinNumber
()
:
avilableNum
;
payableAmount
=
payableAmount
.
subtract
(
orderVo
.
getCoinNumber
().
multiply
(
price
).
setScale
(
2
,
RoundingMode
.
DOWN
))
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConst
.
BIEDICIMAL_LEFT_GREATER
?
payableAmount
:
BigDecimal
.
ZERO
;
payableAmount
=
payableAmount
.
subtract
(
orderVo
.
getCoinNumber
().
multiply
(
price
).
setScale
(
2
,
RoundingMode
.
DOWN
))
;
payableAmount
=
payableAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConst
.
BIEDICIMAL_LEFT_GREATER
?
payableAmount
:
BigDecimal
.
ZERO
;
saveUserAssetRecord
(
uid
,
orderVo
,
result
,
payId
);
}
return
result
;
...
...
mall-sql/mall_create.sql
View file @
09cc5714
...
...
@@ -2522,4 +2522,7 @@ ALTER TABLE `order_detail`
ADD
COLUMN
`goods_coin`
VARCHAR
(
32
)
NOT
NULL
DEFAULT
'0'
COMMENT
'商品coin'
;
update
user_asset
set
goods_coin
=
coin
;
ALTER
TABLE
`user_asset_record`
ADD
COLUMN
`goods_coin`
varchar
(
32
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NOT
NULL
DEFAULT
''
COMMENT
'商品coin'
;
\ No newline at end of file
ALTER
TABLE
`user_asset_record`
ADD
COLUMN
`goods_coin`
varchar
(
32
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NOT
NULL
DEFAULT
''
COMMENT
'商品coin'
;
ALTER
TABLE
`merchant_integral`
ADD
COLUMN
`price`
decimal
(
20
,
2
)
unsigned
NOT
NULL
DEFAULT
'0.00'
COMMENT
'行情 1积分=n人民币'
;
\ No newline at end of file
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