quanwei
2 days ago 73b874c72ad55eb9eef21c36160ac0de58f0189e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
 
namespace app\job\model\plus\vip;
 
use app\common\model\plus\vip\Cash as CashModel;
 
/**
 * VIP提现模型
 */
class Cash extends CashModel
{
    /**
     * 获取待处理的提现申请
     */
    public function getPendingList()
    {
        return $this->where('apply_status', '=', 10)
            ->where('is_delete', '=', 0)
            ->select();
    }
 
    /**
     * 获取已批准但未打款的提现申请
     */
    public function getApprovedList()
    {
        return $this->where('apply_status', '=', 20)
            ->where('is_delete', '=', 0)
            ->where('pay_status', '=', 10)
            ->select();
    }
 
    /**
     * 批量标记提现申请为已处理
     */
    public function setProcessed($ids)
    {
        return $this->where('id', 'in', $ids)
            ->save(['apply_status' => 30, 'pay_status' => 20]);
    }
}