| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- namespace addons\Alitopay\common\models;
- use addons\Alitopay\common\enums\AlitoapyEnum;
- use common\models\user\UserWithdrawLog;
- /**
- * 商城提现model
- * @package addons\Alitopay\common\models
- */
- class WithdrawLog extends UserWithdrawLog
- {
- /**
- * 通过IDs获取支付宝代付提现
- *
- * @param integer $mall_id
- * @param array $ids
- * @return array
- */
- public static function getAlitopayLogByIds(int $mall_id, array $ids)
- {
- return static::find()
- ->where([
- 'id' => $ids,
- 'mall_id' => $mall_id,
- 'status' => UserWithdrawLog::STATUS_AGREE,
- 'type' => AlitoapyEnum::ALITOPAY,
- ])
- ->asArray()
- ->all();
- }
- /**
- * 通过IDs获取支付宝代付提现
- *
- * @param array $ids
- * @return array
- */
- public static function getLogByIds(array $ids)
- {
- return static::find()
- ->where(['id' => $ids])
- ->all();
- }
- /**
- * 通过ID获取支付宝代付提现
- *
- * @param integer $id
- * @return static
- */
- public static function getLogById(int $id)
- {
- return static::findOne($id);
- }
- /**
- * 通过ids修改状态打款中
- *
- * @param array $ids
- * @return int
- */
- public static function changeStatusToPayingByIds(array $ids)
- {
- return static::updateAll(
- ['status' => static::STATUS_WAIT, 'updated_at' => time()], ['id' => $ids]
- );
- }
- }
|