MerchantReconciliationOrderDao.php 706 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\common\dao\store\order;
  3. use app\common\dao\BaseDao;
  4. use app\common\model\store\order\MerchantReconciliationOrder as model;
  5. class MerchantReconciliationOrderDao extends BaseDao
  6. {
  7. public function getModel(): string
  8. {
  9. return model::class;
  10. }
  11. public function search($where)
  12. {
  13. return ($this->getModel()::getDB())->when(isset($where['reconciliation_id']) && $where['reconciliation_id'] !== '',function ($query)use ($where){
  14. $query->where('reconciliation_id',$where['reconciliation_id']);
  15. })->when(isset($where['type']) && $where['type'] !== '',function ($query)use ($where){
  16. $query->where('type',$where['type']);
  17. });
  18. }
  19. }