From bc77c6476965d0cb93550606e6ebeab9a0227f7b Mon Sep 17 00:00:00 2001 From: dengbw Date: Fri, 10 Sep 2021 15:42:44 +0800 Subject: [PATCH] bobing_910_4 --- admin/controllers/app/bobing/Member.php | 44 ++++++++++++++++---- admin/views/app/bobing/member/lists.php | 39 ++++++++++++++++- admin/views/app/bobing/member/lists_logs.php | 2 + api/controllers/plan/Bobing.php | 2 +- 4 files changed, 75 insertions(+), 12 deletions(-) diff --git a/admin/controllers/app/bobing/Member.php b/admin/controllers/app/bobing/Member.php index d6842395..a76fbdc1 100644 --- a/admin/controllers/app/bobing/Member.php +++ b/admin/controllers/app/bobing/Member.php @@ -9,6 +9,7 @@ class Member extends HD_Controller private $ifkzAry = array(0 => '未开', 1 => '已开'); private $levelNameAry = array(13 => "状元插金花", 12 => "六勃红", 11 => "遍地锦", 10 => "六抔黑", 9 => "五红", 8 => "五子带一秀", 7 => "五子", 6 => "状元", 5 => "对堂", 4 => "三红", 3 => "四进", 2 => "二举", 1 => "一秀", 0 => "罚黑"); + private $carGoldAry = array(1 => '博饼500', 2 => '企微500', 3 => '排名1000'); public function __construct() { @@ -81,9 +82,24 @@ class Member extends HD_Controller } else { $params['if_kz'] = -99; } + if ($params['car_gold']) { + if ($params['car_gold'] == 1) { + $where['car_gold>='] = 500; + } elseif ($params['car_gold'] == 2) { + $where['buy_car_gold>='] = 500; + } elseif ($params['car_gold'] == 3) { + $where['lotter_gold>='] = 1000; + } + } + $params['credit_sort'] = $params['credit_sort'] ? intval($params['credit_sort']) : -1; + if ($params['credit_sort'] > -1) { + $order = $params['credit_sort'] == 1 ? "credit desc" : 'credit asc'; + } else { + $order = "id desc"; + } $count = $this->mdBobingUser->count(array_merge($this->where, $where)); if ($count) { - $res = $this->mdBobingUser->select(array_merge($this->where, $where), 'id desc', $params['page'], $params['size']); + $res = $this->mdBobingUser->select(array_merge($this->where, $where), $order, $params['page'], $params['size']); $uids = array_column($res, 'uid'); $res_u = $this->user_service->select(array('id in (' . implode(',', $uids) . ')' => null), 'id DESC', 0, 0, 'id,nickname,mobile'); foreach ($res_u as $key => $value) { @@ -110,13 +126,15 @@ class Member extends HD_Controller $this->data['menuAry'] = $menuAry; $this->data['wxqyAry'] = $this->wxqyAry; $this->data['ifkzAry'] = $this->ifkzAry; + $this->data['carGoldAry'] = $this->carGoldAry; $this->data['_title'] = '博饼用户'; $this->data['pager'] = array('count' => ceil($count / $params['size']), 'curr' => $params['page'], 'totle' => $count); return $this->show_view('/app/bobing/member/lists', true); } //博饼记录 - public function lists_logs() + public + function lists_logs() { $params = $this->input->get(); $params['page'] = $params['page'] ? intval($params['page']) : 1; @@ -156,6 +174,7 @@ class Member extends HD_Controller $type_name = '个人博'; } $setValue['type_name'] = $type_name; + $setValue['c_time'] = $value["c_time"] ? date('Y-m-d H:i:s', $value["c_time"]) : ''; $lists[] = $setValue; } } @@ -166,7 +185,8 @@ class Member extends HD_Controller return $this->show_view('/app/bobing/member/lists_logs', true); } - public function lists_day() + public + function lists_day() { $params = $this->input->get(); $params['page'] = $params['page'] ? intval($params['page']) : 1; @@ -195,34 +215,40 @@ class Member extends HD_Controller } //展示单条数据 - public function get() + public + function get() { } //添加单条数据 - public function add() + public + function add() { } //编辑单条数据 - public function edit() + public + function edit() { } //删除单条数据 - public function del() + public + function del() { } //批量操作(默认修改状态) - public function batch() + public + function batch() { } //导出数据列表 - public function export() + public + function export() { } diff --git a/admin/views/app/bobing/member/lists.php b/admin/views/app/bobing/member/lists.php index 2bceefe2..a08175d6 100644 --- a/admin/views/app/bobing/member/lists.php +++ b/admin/views/app/bobing/member/lists.php @@ -19,6 +19,7 @@