作者 lyh

gx

@@ -45,9 +45,12 @@ class AyrReleaseLogic extends BaseLogic @@ -45,9 +45,12 @@ class AyrReleaseLogic extends BaseLogic
45 } 45 }
46 $this->param['result_data'] = $res; 46 $this->param['result_data'] = $res;
47 $this->param['platforms'] = json_encode($this->param['platforms']); 47 $this->param['platforms'] = json_encode($this->param['platforms']);
48 - $rs = $this->model->add($this->param);  
49 - if($rs === false){  
50 - $this->fail('error'); 48 + $info = $this->model->read(['platforms'=>$this->param['platforms'],'operator_id'=>$this->param['operator_id'],'project_id'=>$this->param['project_id'],'title'=>$this->param['title']]);
  49 + if($info === false){
  50 + $rs = $this->model->add($this->param);
  51 + if($rs === false){
  52 + $this->fail('error');
  53 + }
51 } 54 }
52 return $this->success(); 55 return $this->success();
53 } 56 }