1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\user\controller;
- use library\Controller;
- use think\Db;
- /**
- * 会员元石
- * Class Crystal
- * @package app\user\controller
- */
- class Crystal extends Controller
- {
- protected $table ="CrystalInfo";
- /**
- * 元石变更列表
- * @auth true
- * @menu true
- */
- public function index()
- {
- $this->title = '元石列表';
- $query = $this->_query($this->table);
- $where= [];
- $int_type = Db::table('crystal_type')->where('status',1)->select();
- $this->int_type = array_column($int_type,null,'id');
- if($this->request->request('phone')) $where[]= ['m.phone','=',$this->request->request('phone')];
- $where[]= ['i.is_deleted','=',0];
- $query->alias('i')
- ->field('i.* ,m.headimg,m.name,m.phone')
- ->join('store_member m',' m.id = i.user_id ','LEFT');
- if(!empty($where)) $query->where($where);
- $query ->order('i.id desc')->page();
- }
- /**
- * 删除元石日志
- * @auth true
- * @menu true
- */
- public function del()
- {
- $this->_save($this->table, ['is_deleted' => 1]);
- }
- }
|