MerchantTakeRepository.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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\common\repositories\store;
  12. use app\common\repositories\system\config\ConfigValueRepository;
  13. class MerchantTakeRepository
  14. {
  15. public function get($merId)
  16. {
  17. return merchantConfig($merId, [
  18. 'mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time'
  19. ]);
  20. }
  21. public function set($merId, array $data)
  22. {
  23. $configValueRepository = app()->make(ConfigValueRepository::class);
  24. $configValueRepository->setFormData($data, $merId);
  25. }
  26. public function has($merId)
  27. {
  28. return merchantConfig($merId, 'mer_take_status') == '1';
  29. }
  30. }