MerchantTakeRepository.php 690 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\common\repositories\store;
  3. use app\common\repositories\system\config\ConfigValueRepository;
  4. class MerchantTakeRepository
  5. {
  6. public function get($merId)
  7. {
  8. return merchantConfig($merId, [
  9. 'mer_take_status', 'mer_take_name', 'mer_take_phone', 'mer_take_address', 'mer_take_location', 'mer_take_day', 'mer_take_time'
  10. ]);
  11. }
  12. public function set($merId, array $data)
  13. {
  14. $configValueRepository = app()->make(ConfigValueRepository::class);
  15. $configValueRepository->setFormData($data, $merId);
  16. }
  17. public function has($merId)
  18. {
  19. return merchantConfig($merId, 'mer_take_status') == '1';
  20. }
  21. }