MerchantContributionRepository.php 973 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\common\repositories\system\merchant;
  3. use app\common\dao\system\merchant\MerchantContributionDao;
  4. use app\common\repositories\BaseRepository;
  5. use app\entity\data\merchant\MerchantContributionEntity;
  6. class MerchantContributionRepository extends BaseRepository
  7. {
  8. /**
  9. * @var MerchantContributionDao
  10. */
  11. protected $dao;
  12. /**
  13. * @param MerchantContributionDao $dao
  14. */
  15. public function __construct(MerchantContributionDao $dao)
  16. {
  17. $this->dao = $dao;
  18. }
  19. /**
  20. * 根据商家的让利比例 获取对应的 配置信息
  21. * @param float $profitSharing
  22. * @return MerchantContributionEntity
  23. */
  24. public function getMerchantContributionEntityByProfitSharing(float $profitSharing): MerchantContributionEntity
  25. {
  26. /** @var MerchantContributionEntity $entity */
  27. $entity = $this->dao->getMerchantContributionEntityByProfitSharing($profitSharing);
  28. return $entity;
  29. }
  30. }