duqinya hace 6 años
padre
commit
54c1a5f247
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      app/Http/Repositories/CmsContentTemplateSetRepository.php

+ 5 - 1
app/Http/Repositories/CmsContentTemplateSetRepository.php

@@ -112,14 +112,18 @@ class CmsContentTemplateSetRepository {
             $area_type = 2;
         }
         $template_set = $this->cmsContentTemplateSet->select('rule')->where(['area_type'=>$area_type,'id'=>$request['id']])->first();
+        if (!$template_set){
+            throw new HttpException(500, '没有找到对应模板内容');
+        }
         $template_array = json_decode($template_set->rule,true);
 
         $product = $this->cmsSubjectProduct->where('subject_id', $template_array['link_url'])->orderBy('sort', 'asc')->get();
         $pro_array = $product->toArray();
         $res_id = implode(",", array_column($pro_array, 'product_id'));
 
+
         try {
-            $sign = generateSign([], config('customer.app_secret'));
+            $sign = generateSign(['ids'=>$res_id], config('customer.app_secret'));
             $url = config("customer.user-service-url").'/honmeProduct';
 //            $url = '192.168.33.127:8080/honmeProduct';
             $url = 'https://api.dev.caihongxingqiu.com/product/honmeProduct';