Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yizhi_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
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
data_server
yizhi_server
Commits
6d0b8de5
Commit
6d0b8de5
authored
Apr 21, 2020
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
number
parent
ed2914f7
Pipeline
#21982
passed with stage
in 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
user.js
app/service/user.js
+7
-7
No files found.
app/service/user.js
View file @
6d0b8de5
...
...
@@ -111,15 +111,15 @@ class UserService extends Service {
],
where
:
{
user_id
,
day
:
last_day
},
})
lastday_info
.
use_amount
=
lastday_data
.
amount
||
0
;
lastday_info
.
use_money
=
lastday_data
.
cost
||
0
;
lastday_info
.
use_amount
=
lastday_data
&&
lastday_data
.
amount
?
Number
((
lastday_data
.
amount
).
toFixed
(
2
))
:
0
;
lastday_info
.
use_money
=
lastday_data
&&
lastday_data
.
cost
?
Number
((
lastday_data
.
cost
).
toFixed
(
2
))
:
0
;
const
left_money
=
await
ctx
.
dataModel
.
YzbillBalance
.
findOne
({
attributes
:
[
'balance_fn'
],
where
:
{
user_id
,
month
:
last_month
},
})
lastday_info
.
left_money
=
left_money
&&
left_money
.
balance_fn
?
left_money
.
balance_fn
:
0
;
lastday_info
.
left_money
=
left_money
&&
left_money
.
balance_fn
?
Number
((
left_money
.
balance_fn
).
toFixed
(
2
))
:
0
;
const
detail
=
[]
const
bill
=
await
ctx
.
dataModel
.
YzbillBalance
.
findAll
({
...
...
@@ -131,10 +131,10 @@ class UserService extends Service {
detail
.
push
({
name
:
bill
[
i
].
company
,
date
:
bill
[
i
].
month
,
start_left
:
bill
[
i
].
balance_bg
,
middle_recharge
:
bill
[
i
].
recharge_m
,
middlefee
:
bill
[
i
].
cost_m
,
endfee
:
bill
[
i
].
balance_fn
,
start_left
:
Number
((
bill
[
i
].
balance_bg
).
toFixed
(
2
))
,
middle_recharge
:
Number
((
bill
[
i
].
recharge_m
).
toFixed
(
2
))
,
middlefee
:
Number
((
bill
[
i
].
cost_m
).
toFixed
(
2
))
,
endfee
:
Number
((
bill
[
i
].
balance_fn
).
toFixed
(
2
))
,
})
}
...
...
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