MerchantReconciliationOrderRepository.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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\repositories\store\order;
  12. use app\common\repositories\BaseRepository;
  13. use app\common\dao\store\order\MerchantReconciliationOrderDao as dao;
  14. class MerchantReconciliationOrderRepository extends BaseRepository
  15. {
  16. public function __construct(dao $dao)
  17. {
  18. $this->dao = $dao;
  19. }
  20. /**
  21. * 根据条件获取订单ID列表
  22. *
  23. * 本函数通过调用DAO层的search方法,根据传入的$where条件查询订单信息,
  24. * 并返回查询结果中order_id列的内容作为订单ID列表。此功能主要用于
  25. * 需要根据特定条件批量获取订单ID的场景。
  26. *
  27. * @param string|array $where 查询条件,可以是字符串或数组形式的SQL WHERE子句条件。
  28. * @return array 返回符合条件的订单ID列表,如果无结果则返回空数组。
  29. */
  30. public function getIds($where)
  31. {
  32. // 调用DAO层的search方法进行查询,并指定返回结果中仅包含order_id列
  33. return $this->dao->search($where)->column('order_id');
  34. }
  35. }