OrderAdminAftersaleChange.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace addons\shopro\notification\order\aftersale;
  3. /**
  4. * 售后结果通知
  5. */
  6. class OrderAdminAftersaleChange extends OrderAftersaleChangeBase
  7. {
  8. public $receiver_type = 'admin'; // 接收人:admin=管理员
  9. // 发送类型
  10. public $event = 'order_admin_aftersale_change';
  11. // 返回的字段列表
  12. public $returnField = [
  13. 'name' => '售后结果通知',
  14. 'channels' => ['Sms', 'Email', 'WechatOfficialAccount'],
  15. 'fields' => [
  16. ['name' => '消息名称', 'field' => 'template'],
  17. ['name' => '售后单ID', 'field' => 'aftersale_id'],
  18. ['name' => '售后单号', 'field' => 'aftersale_sn'],
  19. ['name' => '申请时间', 'field' => 'apply_date'],
  20. ['name' => '订单ID', 'field' => 'order_id'],
  21. ['name' => '订单号', 'field' => 'order_sn'],
  22. ['name' => '订单金额', 'field' => 'order_amount'],
  23. ['name' => '下单时间', 'field' => 'create_date'],
  24. ['name' => '申请用户', 'field' => 'nickname'],
  25. ['name' => '用户手机', 'field' => 'mobile'],
  26. ['name' => '支付金额', 'field' => 'pay_fee'],
  27. ['name' => '售后类型', 'field' => 'aftersale_type'],
  28. ['name' => '联系电话', 'field' => 'aftersale_mobile'],
  29. ['name' => '商品名称', 'field' => 'goods_title'],
  30. ['name' => '商品规格', 'field' => 'goods_sku_text'],
  31. ['name' => '商品原价', 'field' => 'goods_original_price'],
  32. ['name' => '商品价格', 'field' => 'goods_price'],
  33. ['name' => '购买数量', 'field' => 'goods_num'],
  34. ['name' => '优惠金额', 'field' => 'discount_fee'],
  35. ['name' => '售后状态', 'field' => 'aftersale_status_text'],
  36. ['name' => '退款状态', 'field' => 'refund_status_text'],
  37. ['name' => '退款金额', 'field' => 'refund_fee'],
  38. ['name' => '变动内容', 'field' => 'content'],
  39. ['name' => '处理时间', 'field' => 'oper_date'],
  40. ]
  41. ];
  42. /**
  43. * 组合数据参数
  44. *
  45. * @param \think\Model $notifiable
  46. * @return array
  47. */
  48. protected function getData($notifiable)
  49. {
  50. $data = parent::getData($notifiable);
  51. $data['jump_url'] = ''; // 管理员消息不予跳转
  52. return $data;
  53. }
  54. }