mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-19 22:02:49 +00:00
52 lines
1.9 KiB
PHP
52 lines
1.9 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | Niucloud-admin 企业快速开发的saas管理平台
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网址:https://www.niucloud-admin.com
|
||
// +----------------------------------------------------------------------
|
||
// | niucloud团队 版权所有 开源版本可自由商用
|
||
// +----------------------------------------------------------------------
|
||
// | Author: Niucloud Team
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\service\api\member;
|
||
|
||
use app\model\member\MemberAccountLog;
|
||
use app\service\api\BaseApiService;
|
||
|
||
/**
|
||
* 会员账户流水服务层(会员个人账户通过会员服务层查询)
|
||
* Class MemberAccountService
|
||
* @package app\service\admin\member
|
||
*/
|
||
class MemberAccountService extends BaseApiService
|
||
{
|
||
public function __construct()
|
||
{
|
||
parent::__construct();
|
||
$this->model = new MemberAccountLog();
|
||
}
|
||
|
||
/**
|
||
* 会员账户流水列表
|
||
* @param array $where
|
||
* @return mixed
|
||
*/
|
||
public function getPage(array $where = [])
|
||
{
|
||
$where[] = [['site_id', '=', $this->site_id], ['member_id', '=', $this->member_id]];
|
||
$field = 'id, member_id, site_id, account_type, account_data, from_type, related_id, create_time, memo';
|
||
return $this->getPageList($this->model, $where, $field, 'create_time desc', ['from_type_name', 'account_type_name']);
|
||
}
|
||
|
||
/**
|
||
* 账户流水详情
|
||
* @param int $id
|
||
* @return array
|
||
*/
|
||
public function getInfo(int $id)
|
||
{
|
||
$field = 'id, member_id, site_id, account_type, account_data, from_type, related_id, create_time, memo';
|
||
return $this->model->where([['id', '=', $id], ['site_id', '=', $this->site_id]])->field($field)->append(['from_type_name', 'account_type_name'])->findOrEmpty()->toArray();
|
||
}
|
||
} |