| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- namespace backend\models;
- class DepositApi extends BaseApi
- {
- public $apiUrl = 'deposit';
- /**
- * 入金列表
- * @param array $data
- * @return array
- */
- public function getDepositList($data = [])
- {
- $result = $this->get($this->apiUrl . '/index', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], '获取入金记录成功');
- } else {
- return $this->returnArray(0, [], '获取入金记录失败');
- }
- }
- /**
- * 入金统计
- * @param int $type
- * @return array
- */
- public function sumDepositByType($type)
- {
- $data['type'] = $type;
- $result = $this->get($this->apiUrl . '/sum-deposit', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], 'SUCCESS');
- } else {
- return $this->returnArray(0, [], 'FAILED');
- }
- }
- /**
- * 补单
- * @param int $id
- * @return array
- */
- public function patchIntoGold($id)
- {
- $data['id'] = $id;
- $result = $this->post($this->apiUrl . '/patch-into-gold', $data);
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], 'SUCCESS');
- } else {
- return $this->returnArray(0, [], 'FAILED');
- }
- }
- /**
- * 获取入金配置
- * @return array
- */
- public function getDepositConfig()
- {
- $result = $this->get($this->apiUrl . '/get-deposit-config');
- if ($result['code'] == 1) {
- return $this->returnArray(1, $result['data'], 'SUCCESS');
- } else {
- return $this->returnArray(0, [], 'FAILED');
- }
- }
- }
|