64 lines
993 B
PHP
64 lines
993 B
PHP
<?php
|
|
namespace app\member\model;
|
|
|
|
use app\BaseModel;
|
|
use think\facade\Db;
|
|
|
|
class CashRecord extends BaseModel
|
|
{
|
|
//定义表名
|
|
protected $name = 'longbing_card_member_cash_record';
|
|
|
|
protected $resultSetType = 'collection';
|
|
|
|
|
|
|
|
|
|
/**
|
|
* @author chenniang
|
|
* @DataTime: 2020-09-29 11:06
|
|
* @功能说明:列表
|
|
*/
|
|
public function dataList($dis,$page){
|
|
|
|
|
|
$data = $this->alias('a')
|
|
->join('longbing_card_user b','a.user_id = b.id')
|
|
->where($dis)
|
|
->field('a.*,b.nickName,b.avatarUrl')
|
|
->group('a.id')
|
|
->order('a.id desc')
|
|
->paginate($page)
|
|
->toArray();
|
|
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @author chenniang
|
|
* @DataTime: 2020-11-30 19:09
|
|
* @功能说明:详情
|
|
*/
|
|
public function dataInfo($dis){
|
|
|
|
$data = $this->where($dis)->find();
|
|
|
|
return !empty($data)?$data->toArray():[];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |