StoreConfigDao.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\dao\store;
  12. use app\dao\BaseDao;
  13. use app\model\store\StoreConfig;
  14. //use crmeb\traits\SearchDaoTrait;
  15. /**
  16. * Class StoreConfigDao
  17. * @package app\dao\store
  18. */
  19. class StoreConfigDao extends BaseDao
  20. {
  21. // use SearchDaoTrait;
  22. /**
  23. * @return string
  24. */
  25. protected function setModel(): string
  26. {
  27. return StoreConfig::class;
  28. }
  29. /**
  30. * 获取门店配置
  31. * @param array $keys
  32. * @param int $type
  33. * @param int $relation_id
  34. * @return \crmeb\basic\BaseModel|mixed|\think\Model
  35. */
  36. public function searchs(array $keys, int $type = 0, int $relation_id = 0)
  37. {
  38. return parent::search()->whereIn('key_name', $keys)->where('type', $type)->where('relation_id', $relation_id);
  39. }
  40. }