Commit 3df0353a authored by shajiaiming's avatar shajiaiming

fix

parent eb81f0ec
......@@ -16,13 +16,14 @@ class IssueCoinController extends BaseController
$page = \Yii::$app->request->get('page', 1);
$size = \Yii::$app->request->get('size', 10);
$status = \Yii::$app->request->get('status', '');
$owner = \Yii::$app->request->get('owner', '');
if (1 == $platform_id) {
$query = CoinIssueCoin::find()
->select('name, total, create_time, status, chain_id, owner, category, charge')
->select('name, total, status, chain_id, owner, category, charge, create_time')
->orderBy('create_time desc');
} else {
$query = CoinIssueCoin::find()
->select('name, total, create_time, status, chain_id, owner, category, charge')
->select('name, total, status, chain_id, owner, category, charge, create_time')
->where(['platform_id' => $platform_id])
->orderBy('create_time desc');
}
......@@ -31,6 +32,10 @@ class IssueCoinController extends BaseController
$query->where(['status' => $status]);
}
if (false != $owner) {
$query->where(['owner' => $owner]);
}
$countQuery = clone $query;
$pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize' => $size]);
$models = $query->offset($pages->offset)
......@@ -44,7 +49,7 @@ class IssueCoinController extends BaseController
'page' => [
'pageCount' => $pages->pageCount,
'pageSize' => $size,
'currentPage' => $page,
'currentPage' => (int)$page,
]
];
$msg = 'ok';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment