作者 zhl

Merge remote-tracking branch 'origin/master' into zhl

@@ -95,7 +95,7 @@ class OperationHeartbeatController extends BaseController @@ -95,7 +95,7 @@ class OperationHeartbeatController extends BaseController
95 }else{ 95 }else{
96 $date_time = strtotime($info['updated_at']) + 60; 96 $date_time = strtotime($info['updated_at']) + 60;
97 if($date_time < time()){ 97 if($date_time < time()){
98 - $operationHeartbeatModel->edit(['status'=>0,'ip'=>'127.0.0.1'],$condition); 98 + $operationHeartbeatModel->edit(['status'=>0,'ip'=>'127.0.0.1'],['id'=>$info['id']]);
99 $info['status'] = 0; 99 $info['status'] = 0;
100 } 100 }
101 if($info['status'] == 1){ 101 if($info['status'] == 1){
@@ -27,7 +27,7 @@ class AiCommandLogic extends BaseLogic @@ -27,7 +27,7 @@ class AiCommandLogic extends BaseLogic
27 */ 27 */
28 public function getPrompt($is_batch = 0){ 28 public function getPrompt($is_batch = 0){
29 //是否有项目指令 29 //是否有项目指令
30 - $ai_command = $this->model->where('key', $this->param['key'])->where('project_id', $this->project['id'])->first(); 30 + $ai_command = $this->model->where('key', $this->param['key'])->where('project_id', $this->user['project_id'] ?? $this->project['id'])->first();
31 if(!$ai_command){ 31 if(!$ai_command){
32 $ai_command = $this->model->where('key', $this->param['key'])->where('project_id', 0)->first(); 32 $ai_command = $this->model->where('key', $this->param['key'])->where('project_id', 0)->first();
33 } 33 }