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.
 
 

26 lines
642 B

<?php
namespace App\CouponRebate;
use Hyperf\DbConnection\Db;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\Di\Annotation\Inject;
use Hyperf\Paginator\Paginator;
class CouponRebate implements CouponRebateInterface
{
public function isCouponRebate($user_id)
{
$res = Db::table('ims_system_coupon_user as u')
->leftjoin('ims_system_coupon_user_receive as r','u.id','=','r.system_coupon_user_id')
->where([
['r.user_id','=',$user_id],
['u.active_type','=',2]
])
->select('r.id')
->first();
return $res;
}
}