MerchantTakeRepository.php 760 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/8/1
  7. *
  8. *
  9. */
  10. namespace app\common\repositories\store;
  11. use app\common\repositories\system\config\ConfigValueRepository;
  12. class MerchantTakeRepository
  13. {
  14. public function get($merId)
  15. {
  16. return merchantConfig($merId, [
  17. 'mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time'
  18. ]);
  19. }
  20. public function set($merId, array $data)
  21. {
  22. $configValueRepository = app()->make(ConfigValueRepository::class);
  23. $configValueRepository->setFormData($data, $merId);
  24. }
  25. public function has($merId)
  26. {
  27. return merchantConfig($merId, 'mer_take_status') == '1';
  28. }
  29. }