服务包订单支付成功回调,增加了发放优惠卷
This commit is contained in:
+15
-2
@@ -6,6 +6,7 @@ namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Hyperf\Database\Model\Collection;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
@@ -37,8 +38,8 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property int $reissue_interval_days 确认收货后的再次发放间隔天数(如果设置为 0,则表示不再次发放。当适用范围为商品时生效)
|
||||
* @property int $is_reissuable_after_expire 过期之后是否允许再次发放(0:否 1:是)
|
||||
* @property int $is_popup 是否首页弹窗(0:否 1:是)
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
* @property Carbon $created_at 创建时间
|
||||
* @property Carbon $updated_at 修改时间
|
||||
*/
|
||||
class Coupon extends Model
|
||||
{
|
||||
@@ -110,4 +111,16 @@ class Coupon extends Model
|
||||
->whereIn("distribution_object",[1,2])
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取购买服务包的用户可领取的优惠卷列表
|
||||
* @return Collection|array
|
||||
*/
|
||||
public static function getOrderServicePackageCouponList(): Collection|array
|
||||
{
|
||||
return self::where("coupon_client",1)
|
||||
->where("coupon_status",1)
|
||||
->whereIn("distribution_object",[7])
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user