| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- // +----------------------------------------------------------------------
- // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 LARAVEL研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: laravel开发员 <laravel.qq.com>
- // +----------------------------------------------------------------------
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\AccountService;
- /**
- * 财务明细管理-控制器(基于 account_logs 表)
- * @author laravel开发员
- * @since 2020/11/11
- * Class AccountController
- * @package App\Http\Controllers
- */
- class AccountController extends Backend
- {
- /**
- * 列表
- */
- public function index()
- {
- $service = new AccountService();
- $params = request()->all();
- // 获取商家对应的 user_id 用于数据隔离
- if ($this->storeId) {
- $params['store_id'] = $this->storeId;
- }else if($this->memberId){
- $params['user_id'] = $this->memberId;
- }
- $result = $service->getDataList($params, $params['limit']);
- return [
- "msg" => $result['msg'] ?? '操作成功',
- "code" => $result['code'] ?? 0,
- "data" => $result['data'] ?? [],
- "count" => $result['count'] ?? 0,
- "counts" => $result['counts'] ?? []
- ];
- }
- /**
- * 获取详情
- */
- public function ptAccount()
- {
- $info = $this->service->getPtAccount();
- return message(1010, true, $info);
- }
- }
|