InvitationReceive.php 545 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\api\model\plus\invitationgift;
  3. use app\common\model\plus\invitationgift\InvitationReceive as InvitationReceiveModel;
  4. /**
  5. * 获取礼品模型
  6. */
  7. class InvitationReceive extends InvitationReceiveModel
  8. {
  9. /**
  10. * 获取用户已领取的奖励
  11. */
  12. public function getUserPrize($user_id, $invitation_gift_id)
  13. {
  14. $where = [
  15. 'user_id' => $user_id,
  16. 'invitation_gift_id' => $invitation_gift_id,
  17. ];
  18. return $this->with(['Reward'])->where($where)->select();
  19. }
  20. }