|
@@ -31,15 +31,15 @@ class UserChargeService
|
|
|
//official
|
|
|
$ids = env('OFFICIAL_TEMPLATE_IDS');
|
|
|
$idarr = explode(',',$ids);
|
|
|
- $products = Product::whereIn('id',$idarr)->orderBy('sequence','asc')->get();
|
|
|
+ $products = Product::whereIn('id',$idarr)->where('is_enable',1)->orderBy('sequence','asc')->get();
|
|
|
}else{
|
|
|
$template_info = QappChargeTemplate::where('id',$template_id)->first();
|
|
|
if (getProp($template_info,'is_official') == 1) {
|
|
|
//属于官方模板 直接根据id 从 product表里查找
|
|
|
$idarr = explode(',',getProp($template_info,'product_ids'));
|
|
|
- $products = Product::whereIn('id',$idarr)->orderBy('sequence','asc')->get();
|
|
|
+ $products = Product::whereIn('id',$idarr)->where('is_enable',1)->orderBy('sequence','asc')->get();
|
|
|
}else{
|
|
|
- $products = Product::where('qapp_charge_template_id',$template_id)->orderBy('sequence','asc')->get();
|
|
|
+ $products = Product::where('qapp_charge_template_id',$template_id)->where('is_enable',1)->orderBy('sequence','asc')->get();
|
|
|
}
|
|
|
}
|
|
|
$is_first_recharge = OrderService::judgeUserFirstRecharge($uid);
|