This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/store/model/sharing/OrderRefundAddress.php

34 lines
907 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\store\model\sharing;
use app\store\model\ReturnAddress as ReturnAddressModel;
use app\common\model\sharing\OrderRefundAddress as OrderRefundAddressModel;
/**
* 售后单退货地址模型
* Class OrderRefundAddress
* @package app\store\model\sharing
*/
class OrderRefundAddress extends OrderRefundAddressModel
{
/**
* 新增售后单退货地址记录
* @param $order_refund_id
* @param $address_id
* @return false|int
* @throws \think\exception\DbException
*/
public function add($order_refund_id, $address_id)
{
$detail = ReturnAddressModel::detail($address_id);
return $this->save([
'order_refund_id' => $order_refund_id,
'name' => $detail['name'],
'phone' => $detail['phone'],
'detail' => $detail['detail'],
'wxapp_id' => self::$wxapp_id
]);
}
}