StoreRefundStatusDao.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\common\dao\store\order;
  12. use app\common\dao\BaseDao;
  13. use app\common\model\store\order\StoreRefundStatus;
  14. class StoreRefundStatusDao extends BaseDao
  15. {
  16. protected function getModel(): string
  17. {
  18. return StoreRefundStatus::class;
  19. }
  20. /**
  21. * 根据退款订单ID查询退款状态
  22. *
  23. * 本函数旨在通过退款订单ID从数据库中检索相应的退款状态信息。
  24. * 它使用了StoreRefundStatus类的getDB方法来获取数据库对象,并基于此对象构建一个查询,
  25. * 该查询专门针对refund_order_id字段与传入ID匹配的记录。
  26. *
  27. * @param int $id 退款订单的唯一标识符
  28. * @return \think\db\Query 查询结果,返回一个查询对象,可用于进一步的查询操作或获取数据
  29. */
  30. public function search($id)
  31. {
  32. // 根据传入的ID查询退款状态
  33. return $query = StoreRefundStatus::getDB()->where('refund_order_id', $id);
  34. }
  35. }