Browse Source

增加id

master
chenx 2 years ago
parent
commit
6f0c851e88
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      app/controller/api/coin/CoinController.php

+ 6
- 2
app/controller/api/coin/CoinController.php View File

@@ -37,11 +37,15 @@ class CoinController extends BaseServices
$uid = $request->uid();
$CoinLog = new CoinLog();
$where = $request->getMore([
['type', '']
['type', ''],
['id', 0]
]);
if ($where['type'] === '') {
unset($where['type']);
}
if ($where['id'] === 0) {
unset($where['id']);
}
[$page, $limit] = $this->getPageValue();
if ($where['type'] == 3) {
$where['uid'] = $uid;
@@ -49,7 +53,7 @@ class CoinController extends BaseServices
$where['receive_uid'] = $uid;
unset($where['type']);
}
$result = $CoinLog->with(['getWechatUserOneData', 'getWechatUserOneData2'])->page($page)->limit($limit)->where($where)->select()->toArray();
$result = $CoinLog->with(['getWechatUserOneData', 'getWechatUserOneData2'])->limit($page, $limit)->where($where)->select()->toArray();
$site_url = sys_config('site_url');
foreach ($result as $k => $v) {
if (!isset($where['receive_uid'])) {

Loading…
Cancel
Save