OrderRefundAddress.php 930 B

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