初始化代码
This commit is contained in:
79
app/member/model/RightsLog.php
Normal file
79
app/member/model/RightsLog.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
namespace app\member\model;
|
||||
|
||||
use app\BaseModel;
|
||||
use think\facade\Db;
|
||||
|
||||
class RightsLog extends BaseModel
|
||||
{
|
||||
//会员权益表
|
||||
protected $name = 'longbing_card_v2_member_rights_log';
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-07-15 09:49
|
||||
* @功能说明:添加
|
||||
*/
|
||||
public function rightsAdd($data){
|
||||
|
||||
$res = $this->insert($data);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-04-26 17:12
|
||||
* @功能说明:列表
|
||||
*/
|
||||
public function rightsList($dis,$page){
|
||||
|
||||
$data = $this->where($dis)->order('id desc')->paginate($page)->toArray();
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-04-26 17:08
|
||||
* @功能说明:详情
|
||||
*/
|
||||
public function rightsInfo($dis){
|
||||
|
||||
$data = $this->where($dis)->find();
|
||||
|
||||
return !empty($data)?$data->toArray():[];
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-04-26 17:13
|
||||
* @功能说明:删除直播
|
||||
*/
|
||||
public function rightsUpdate($dis,$data){
|
||||
|
||||
$data['update_time'] = time();
|
||||
|
||||
$res = $this->where($dis)->update($data);
|
||||
|
||||
return $res;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user