|
@@ -69,8 +69,9 @@ class CmsContentTemplateSetRepository
|
|
|
foreach ($new_rule2 as $k => $v) {
|
|
|
if ($v) {
|
|
|
$rules = $v['rule'];
|
|
|
+ $show_num = intval($rules['show_num']);
|
|
|
$show_type = $this->cmsSubject->select('show_type')->where('id', $rules['link_url'])->first();
|
|
|
- $product = $this->cmsSubjectProduct->where('subject_id', $rules['link_url'])->orderBy('sort', 'asc')->get();
|
|
|
+ $product = $this->cmsSubjectProduct->where('subject_id', $rules['link_url'])->orderBy('sort', 'asc')->limit($show_num)->get();
|
|
|
$pro_array = $product->toArray();
|
|
|
$res_id = implode(",", array_column($pro_array, 'product_id'));
|
|
|
$new_rule2[$k]['product_id'] = $res_id;
|