MerchantReconciliationOrderDao.php 778 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author Qinii
  6. * @day 2020-06-15
  7. *
  8. *
  9. */
  10. namespace app\common\dao\store\order;
  11. use app\common\dao\BaseDao;
  12. use app\common\model\store\order\MerchantReconciliationOrder as model;
  13. class MerchantReconciliationOrderDao extends BaseDao
  14. {
  15. public function getModel(): string
  16. {
  17. return model::class;
  18. }
  19. public function search($where)
  20. {
  21. return ($this->getModel()::getDB())->when(isset($where['reconciliation_id']) && $where['reconciliation_id'] !== '',function ($query)use ($where){
  22. $query->where('reconciliation_id',$where['reconciliation_id']);
  23. })->when(isset($where['type']) && $where['type'] !== '',function ($query)use ($where){
  24. $query->where('type',$where['type']);
  25. });
  26. }
  27. }