作者 lyh

gx

... ... @@ -549,7 +549,7 @@ class ProductController extends BaseController
* @method :post
* @time :2024/1/26 15:33
*/
public function sendAiProduct(){
public function sendAiProduct(Product $product){
$this->request->validate([
'keyword'=>'required',
'product_id'=>'required'
... ... @@ -557,7 +557,7 @@ class ProductController extends BaseController
'keyword.required' => 'keyword不能为空',
'product_id.required' => 'product_id不能为空',
]);
$productInfo = $this->model->read(['id' => $this->param['product_id']]);
$productInfo = $product->read(['id' => $this->param['product_id']]);
if (!empty($productInfo)) {
$this->fail('请选择有效产品信息!');
}
... ...