Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
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
wallet
token
Commits
904ef54c
Commit
904ef54c
authored
May 17, 2022
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
usdt ticker See merge request
!508
parents
47b6815b
d4407e9e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+11
-3
No files found.
common/business/ExchangeBusiness.php
View file @
904ef54c
...
@@ -297,9 +297,17 @@ class ExchangeBusiness
...
@@ -297,9 +297,17 @@ class ExchangeBusiness
}
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'USDT'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'USDT'
]))
{
$exchange
=
ExchangeFactory
::
createExchange
(
"Rate"
);
// $exchange = ExchangeFactory::createExchange("Rate");
$quotation
=
$exchange
->
getTicker
(
"CNY"
,
"USD"
);
// $quotation = $exchange->getTicker("CNY", "USD");
$quotation
[
'rmb'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]);
// $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
$cny_usd_rate_low
=
Yii
::
$app
->
redis_currency
->
hmget
(
'quotation_currency_USD_CNY'
,
'low'
);
$quotation
[
'low'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$cny_usd_rate_low
[
0
]);
$cny_usd_rate_high
=
Yii
::
$app
->
redis_currency
->
hmget
(
'quotation_currency_USD_CNY'
,
'high'
);
$quotation
[
'high'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$cny_usd_rate_high
[
0
]);
$cny_usd_rate_last
=
Yii
::
$app
->
redis_currency
->
hmget
(
'quotation_currency_USD_CNY'
,
'last'
);
$quotation
[
'last'
]
=
$quotation
[
'rmb'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$cny_usd_rate_last
[
0
]);
goto
doEnd
;
goto
doEnd
;
}
}
...
...
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