作者 lyh

gx

@@ -35,7 +35,7 @@ class GoogleSearchController extends BaseController @@ -35,7 +35,7 @@ class GoogleSearchController extends BaseController
35 ]); 35 ]);
36 //查询详情数据 36 //查询详情数据
37 $searchDetailModel = new GoogleSearchDetail(); 37 $searchDetailModel = new GoogleSearchDetail();
38 - $this->map['project_id']= $this->user['project_id']; 38 + $this->map['project_id']= 711;
39 $data = $searchDetailModel->lists($this->map,$this->page,$this->row); 39 $data = $searchDetailModel->lists($this->map,$this->page,$this->row);
40 if(!empty($data)){ 40 if(!empty($data)){
41 if($this->param['type'] == 'country'){ 41 if($this->param['type'] == 'country'){
@@ -47,7 +47,7 @@ class ChatController extends BaseController @@ -47,7 +47,7 @@ class ChatController extends BaseController
47 } 47 }
48 48
49 /** 49 /**
50 - * @remark :发送消息 50 + * @remark :发送消息(流返回)
51 * @name :sendMessage 51 * @name :sendMessage
52 * @author :lyh 52 * @author :lyh
53 * @method :post 53 * @method :post
@@ -40,17 +40,17 @@ class GoogleKeywordInsightLogic extends BaseLogic @@ -40,17 +40,17 @@ class GoogleKeywordInsightLogic extends BaseLogic
40 $this->service = new RapIdApIService(); 40 $this->service = new RapIdApIService();
41 $data = $this->service->requestUrl($this->param['keyword']); 41 $data = $this->service->requestUrl($this->param['keyword']);
42 if(!empty($data)){ 42 if(!empty($data)){
43 -// DB::beginTransaction(); 43 + DB::beginTransaction();
44 //保存数据库 44 //保存数据库
45 -// try { 45 + try {
46 $detailModel = new GoogleKeywordInsightDetail(); 46 $detailModel = new GoogleKeywordInsightDetail();
47 $this->model->saveInsight($this->user['project_id'],$this->param['keyword'],$data); 47 $this->model->saveInsight($this->user['project_id'],$this->param['keyword'],$data);
48 $detailModel->saveInsightDetail($this->user['project_id'],$this->param['keyword'],$data); 48 $detailModel->saveInsightDetail($this->user['project_id'],$this->param['keyword'],$data);
49 -// DB::commit();  
50 -// }catch (\Exception $e){  
51 -// DB::rollBack();  
52 -// $this->fail('保存失败,请联系管理员');  
53 -// } 49 + DB::commit();
  50 + }catch (\Exception $e){
  51 + DB::rollBack();
  52 + $this->fail('保存失败,请联系管理员');
  53 + }
54 } 54 }
55 } 55 }
56 return $this->success(); 56 return $this->success();