作者 zhl

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

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