RefundBackWayOperation.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Name: 芸众商城系统
  5. * Author: 广州市芸众信息科技有限公司
  6. * Profile: 广州市芸众信息科技有限公司位于国际商贸中心的广州,专注于移动电子商务生态系统打造,拥有芸众社交电商系统、区块链数字资产管理系统、供应链管理系统、电子合同等产品/服务。官网 :www.yunzmall.com www.yunzshop.com
  7. * Date: 2022/1/13
  8. * Time: 17:03
  9. */
  10. namespace app\frontend\modules\refund\services\back_way_operation;
  11. use app\common\models\Order;
  12. use app\common\models\refund\RefundApply;
  13. abstract class RefundBackWayOperation
  14. {
  15. public $code;
  16. public $value;
  17. public $name;
  18. /**
  19. * @var Order
  20. */
  21. public $order;
  22. /**
  23. * @var RefundApply
  24. */
  25. public $refundApply;
  26. /**
  27. * todo 传入此可根据需要通过订单信息判断是否显示退货方式(此属性只在判断是否显示退货方式时设置,其余都设置refundApply属性)
  28. * @param Order $order
  29. * @return $this
  30. */
  31. public function setOrder(Order $order)
  32. {
  33. $this->order = $order;
  34. return $this;
  35. }
  36. /**
  37. * todo 传入此可判断是否添加/修改/取消售后申请以及退货方式$refundApply 目前只有修改和申请调用saveRelation&init
  38. * @param RefundApply $refundApply
  39. * @return $this
  40. */
  41. public function setRefundApply(RefundApply $refundApply)
  42. {
  43. $this->refundApply = $refundApply;
  44. return $this;
  45. }
  46. /**
  47. * 可抛出AppException异常终止售后申请提交
  48. * @return mixed
  49. */
  50. abstract function init();
  51. abstract function saveRelation();
  52. abstract function isEnabled();
  53. /**
  54. * 编辑售后页面获取回显数据
  55. * @return mixed
  56. */
  57. abstract function getEditData();
  58. /**
  59. * 售后详情页面获取其他数据
  60. * @return mixed
  61. */
  62. abstract function getOtherData();
  63. public function getCode()
  64. {
  65. return $this->code;
  66. }
  67. public function getValue()
  68. {
  69. return $this->value;
  70. }
  71. public function getName()
  72. {
  73. return $this->name;
  74. }
  75. }