You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
638 B

  1. <?php
  2. namespace App\CouponRebate;
  3. use Hyperf\DbConnection\Db;
  4. use Hyperf\HttpServer\Contract\RequestInterface;
  5. use Hyperf\Di\Annotation\Inject;
  6. use Hyperf\Paginator\Paginator;
  7. class CouponRebate implements CouponRebateInterface
  8. {
  9. public function isCouponRebate($user_id)
  10. {
  11. $res = Db::table('ims_system_coupon_user as u')
  12. ->join('ims_system_coupon_user_receive as r','u.id','=','r.system_coupon_user_id')
  13. ->where([
  14. ['r.user_id','=',$user_id],
  15. ['u.active_type','=',2]
  16. ])
  17. ->select('r.id')
  18. ->first();
  19. return $res;
  20. }
  21. }