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
f58b69a3
Commit
f58b69a3
authored
Nov 06, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
05c46c1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
ApplicationController.php
api/controllers/ApplicationController.php
+9
-1
CoinApplicateRank.php
common/models/psources/CoinApplicateRank.php
+10
-0
LotteryController.php
console/controllers/LotteryController.php
+1
-1
No files found.
api/controllers/ApplicationController.php
View file @
f58b69a3
...
...
@@ -10,6 +10,7 @@ namespace api\controllers;
use
api\base\BaseController
;
use
common\business\ApplicationBusiness
;
use
common\models\psources\CoinApplicateRank
;
use
Yii
;
...
...
@@ -82,6 +83,12 @@ class ApplicationController extends BaseController
*/
public
function
actionRankList
()
{
$request
=
Yii
::
$app
->
request
;
$type
=
$request
->
post
(
'type'
,
1
);
if
(
$id
){
return
CoinApplicateRank
::
appList
(
$type
);
}
else
{
return
[
'code'
=>
1
,
'data'
=>
[],
'msg'
=>
'id不能为空'
];
}
}
}
\ No newline at end of file
common/models/psources/CoinApplicateRank.php
View file @
f58b69a3
...
...
@@ -42,5 +42,14 @@ class CoinApplicateRank extends BaseActiveRecord
return
self
::
find
()
->
where
([
'relate_id'
=>
$relate_id
,
'type'
=>
$type
])
->
one
();
}
public
static
function
getAppList
(
$type
)
{
$applicate_rank_model
=
self
::
find
();
$data
=
$applicate_rank_model
->
JoinWith
([
'application'
],
false
)
->
select
(
'relate_id as id,sort,name,icon'
.
self
::
tableName
()
.
".type"
)
->
orderBy
(
self
::
tableName
()
.
'.sort asc'
)
->
where
([
self
::
tableName
()
.
'.type'
=>
$type
])
->
asArray
()
->
all
();
return
$data
;
}
}
\ No newline at end of file
console/controllers/LotteryController.php
View file @
f58b69a3
...
...
@@ -62,7 +62,7 @@ class LotteryController extends Controller
if
(
$last_header
[
'height'
]
>=
$start_height
+
$lottery_config
[
'period_total_step'
]){
//超过起始高度40个区块可以开奖
$lottery_result
=
LotteryBusiness
::
lottery
();
if
(
$lottery_result
[
'code'
]
==
0
){
//如果开奖操作成功
echo
date
(
'Y-m-d H:i:s'
)
.
': '
.
'开奖成功: '
.
PHP_EOL
;
}
else
{
echo
date
(
'Y-m-d H:i:s'
)
.
': '
.
'开奖异常: '
.
$lottery_result
[
'msg'
]
.
PHP_EOL
;
}
...
...
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