| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\YunfastPay\common\models;
- use addons\YunfastPay\common\enums\YunfastPayEnum;
- use common\models\user\UserWithdrawLog;
- /**
- * 主商城提现记录model
- * @package addons\YunfastPay\common\models
- */
- class WithdrawLog extends UserWithdrawLog
- {
- /**
- * 通过ids查询已审核提现记录
- *
- * @param integer $mall_id
- * @param array $ids
- * @param string|array $field
- * @return array
- */
- public static function getListByIdsAndAgree(int $mall_id, array $ids, $field = '*')
- {
- $condition = [
- 'id' => $ids,
- 'mall_id' => $mall_id,
- 'status' => static::STATUS_AGREE,
- 'type' => YunfastPayEnum::YUNFAST_PAY
- ];
- return static::find()
- ->where($condition)
- ->select($field)
- ->all();
- }
- /**
- * 通过ids修改记录为待打款
- *
- * @param integer $mall_id
- * @param array $ids
- * @return integer
- */
- public static function statusToWaitingByIds(int $mall_id, array $ids)
- {
- return static::updateAll(['status' => static::STATUS_WAIT], [
- 'id' => $ids,
- 'mall_id' => $mall_id,
- ]);
- }
- }
|