|
...
|
...
|
@@ -11,12 +11,14 @@ namespace App\Http\Controllers\Api\WorkOrder; |
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Api\BaseController;
|
|
|
|
use App\Models\Ai\AiCommand;
|
|
|
|
use App\Models\Blog\BlogCategory;
|
|
|
|
use App\Models\News\NewsCategory;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\Keyword;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Ticket\TicketUploadData;
|
|
|
|
use App\Services\AiCommandService;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
...
|
...
|
@@ -431,4 +433,30 @@ class TicketUploadDataController extends BaseController |
|
|
|
return ['id'=>$id,'title'=>$title];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :根据指令获取内容
|
|
|
|
* @name :sendLayoutDesign
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/26 17:39
|
|
|
|
*/
|
|
|
|
public function sendLayoutDesign(){
|
|
|
|
$this->request->validate([
|
|
|
|
'html'=>['required'],
|
|
|
|
'project_id'=>['project_id']
|
|
|
|
],[
|
|
|
|
'html.required' => 'html不能为空',
|
|
|
|
'project_id.required' => '项目ID不能为空',
|
|
|
|
]);
|
|
|
|
$aiCommonModel = new AiCommand();
|
|
|
|
$info = $aiCommonModel->read(['key'=>'ai_layout_design','project_id'=>$this->param['project_id']],['ai']);
|
|
|
|
if($info === false){
|
|
|
|
$info = $aiCommonModel->read(['key'=>'ai_layout_design','project_id'=>0],['ai']);
|
|
|
|
}
|
|
|
|
$aiCommandService = new AiCommandService();
|
|
|
|
$ai = str_replace('{html}',$this->param['html'],$info['ai']);
|
|
|
|
$result = $aiCommandService->send_layout_design($ai);
|
|
|
|
$this->response('success', Code::SUCCESS, $result);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|