OrderRefundAddress.php 821 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\store\model;
  3. use app\common\model\OrderRefundAddress as OrderRefundAddressModel;
  4. /**
  5. * 售后单退货地址模型
  6. * Class OrderRefundAddress
  7. * @package app\store\model
  8. */
  9. class OrderRefundAddress extends OrderRefundAddressModel
  10. {
  11. /**
  12. * 新增售后单退货地址记录
  13. * @param $order_refund_id
  14. * @param $address_id
  15. * @return false|int
  16. * @throws \think\exception\DbException
  17. */
  18. public function add($order_refund_id, $address_id)
  19. {
  20. $detail = ReturnAddress::detail($address_id);
  21. return $this->save([
  22. 'order_refund_id' => $order_refund_id,
  23. 'name' => $detail['name'],
  24. 'phone' => $detail['phone'],
  25. 'detail' => $detail['detail'],
  26. 'wxapp_id' => self::$wxapp_id
  27. ]);
  28. }
  29. }