|
|
@@ -117,7 +117,7 @@ class ActivityLogic extends BaseLogic
|
|
|
foreach ($coupons as &$coupon) {
|
|
|
$coupon['goods_category_id'] = $coupon['couponCategoryOne']['goods_category_id'];
|
|
|
}
|
|
|
- return $coupons;
|
|
|
+ return $coupons??[];
|
|
|
}
|
|
|
public static function groupArrays($array) {
|
|
|
$result = []; $groupSize = 2;
|
|
|
@@ -197,7 +197,7 @@ class ActivityLogic extends BaseLogic
|
|
|
public static function getDataIdsByType($property_activity_id, $type): array
|
|
|
{
|
|
|
$ids = [];
|
|
|
- $activityInfo = PropertyActivity::where('property_activity_id',$property_activity_id)->findOrEmpty();
|
|
|
+ $activityInfo = PropertyActivity::where('id',$property_activity_id)->findOrEmpty();
|
|
|
if(!$activityInfo->isEmpty()){
|
|
|
$activityInfo = $activityInfo->toArray();
|
|
|
if($type === 'block_data'){
|
|
|
@@ -206,7 +206,7 @@ class ActivityLogic extends BaseLogic
|
|
|
}
|
|
|
}
|
|
|
if($type === 'coupon_data'){
|
|
|
- $ids = array_merge($ids,array_column($activityInfo['coupon_data'], 'id'));
|
|
|
+ $activityInfo['coupon_data'] && $ids = array_merge($ids,array_column($activityInfo['coupon_data'], 'id'));
|
|
|
}
|
|
|
}
|
|
|
return $ids??[0];
|