| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\DepositService;
- /**
- * 保证金管理
- * @package App\Http\Controllers\Admin
- */
- class DepositController extends Backend
- {
- /**
- * 构造函数
- * @author laravel开发员
- * @since 2020/11/11
- * GoodsController constructor.
- */
- public function __construct()
- {
- parent::__construct();
- $this->service = new DepositService();
- }
- /**
- * 列表
- * @return array
- */
- public function index()
- {
- $pageSize = request()->get('limit', 10);
- $list = $this->service->getDataList(request()->all(), $pageSize);
- $message = array(
- "msg" => '操作成功',
- "code" => 0,
- "data" => isset($list['list'])? $list['list']:[],
- "counts" => isset($list['counts'])? $list['counts']:[],
- "count" => isset($list['total'])? $list['total']:0,
- );
- return $message;
- }
- /**
- * 审核
- * @return array
- */
- public function confirm()
- {
- $params = request()->post();
- if(DepositService::make()->confirm($this->userId,$params)){
- return message(DepositService::make()->getError(), true);
- }else{
- return message(DepositService::make()->getError(), false);
- }
- }
- /**
- * 打款
- * @return array
- */
- public function payment()
- {
- $params = request()->post();
- if(DepositService::make()->payment($this->userId,$params)){
- return message(DepositService::make()->getError(), true);
- }else{
- return message(DepositService::make()->getError(), false);
- }
- }
- /**
- * 删除数据
- * @return mixed
- * @since 2020/11/11
- * @author laravel开发员
- */
- public function delete()
- {
- $result = $this->service->delete();
- return $result;
- }
- }
|