Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
f78fd95b
Commit
f78fd95b
authored
Jul 04, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
7a491135
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
engine-fee/app/base/service/impl/account/accountSve.js
+7
-6
No files found.
engine-fee/app/base/service/impl/account/accountSve.js
View file @
f78fd95b
...
@@ -89,7 +89,7 @@ class AccountService extends ServiceBase {
...
@@ -89,7 +89,7 @@ class AccountService extends ServiceBase {
}
}
async
trade
(
params
)
{
async
trade
(
params
)
{
let
accountId
=
params
.
account_id
;
let
accountId
=
Number
(
params
.
account_id
)
;
let
trade_no
=
this
.
trim
(
params
.
trade_no
);
let
trade_no
=
this
.
trim
(
params
.
trade_no
);
let
trade_type
=
params
.
trade_type
;
let
trade_type
=
params
.
trade_type
;
let
trade_amt
=
Number
(
params
.
trade_amt
||
0
);
let
trade_amt
=
Number
(
params
.
trade_amt
||
0
);
...
@@ -120,12 +120,13 @@ class AccountService extends ServiceBase {
...
@@ -120,12 +120,13 @@ class AccountService extends ServiceBase {
let
res
=
await
this
.
db
.
transaction
(
async
t
=>
{
let
res
=
await
this
.
db
.
transaction
(
async
t
=>
{
//更新oorder订单记录
//更新oorder订单记录
let
bres
=
await
this
.
dao
.
incrementBalance
(
accountId
,
balance_amt
,
t
);
if
(
trade_amt
!=
0
)
{
console
.
log
(
bres
);
let
bres
=
await
this
.
dao
.
incrementBalance
(
accountId
,
balance_amt
,
t
);
if
(
bres
===
0
)
{
console
.
log
(
bres
);
return
system
.
getResult
(
null
,
"余额不足"
);
if
(
bres
===
0
)
{
return
system
.
getResult
(
null
,
"余额不足"
);
}
}
}
//创建orderdeliver记录
//创建orderdeliver记录
let
trade
=
await
this
.
accounttradeDao
.
create
({
let
trade
=
await
this
.
accounttradeDao
.
create
({
account_id
:
accountId
,
account_id
:
accountId
,
...
...
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