where([ 'id' => $id, 'mall_id' => $mall_id, 'status' => UserWithdrawLog::STATUS_AGREE, 'type' => 'alipay_tax' ]) ->one(); } /** * 获取申请中的合规提现记录 * * @param integer $mall_id * @param integer $id * @return UserWithdrawLog|array|null a single row of query result. Depending on the setting of [[asArray]], */ public static function getTaxLogByAgreeOrWait(int $mall_id, int $id) { return static::find() ->where([ 'id' => $id, 'mall_id' => $mall_id, 'status' => [UserWithdrawLog::STATUS_AGREE, UserWithdrawLog::STATUS_WAIT], 'type' => 'alipay_tax' ]) ->one(); } /** * 获取申请中的合规提现记录集合 * * @param integer $mall_id * @param array $ids * @return array|UserWithdrawLog[] the query results. If the query results in nothing, an empty array will be returned. */ public static function getTaxLogsByAgree(int $mall_id, array $ids) { return static::find() ->where(['id' => $ids, 'mall_id' => $mall_id, 'status' => UserWithdrawLog::STATUS_AGREE, 'type' => 'alipay_tax']) ->all(); } /** * 获取支付宝信息 * * @return array [name, mobile, id_card] */ public function getExtra() { $extra = Json::decode($this->extra); $name = !empty($extra['name']) ? $extra['name'] : ''; $mobile = !empty($extra['mobile']) ? $extra['mobile'] : ''; $id_card = !empty($extra['id_card']) ? $extra['id_card'] : ''; return [$name, $mobile, $id_card]; } }