This commit is contained in:
toom1996
2025-06-25 15:47:13 +08:00
parent 5d5410c8a5
commit 7d38f8da1e
2 changed files with 55 additions and 0 deletions

View File

@ -3,6 +3,7 @@
namespace App\Controller\api\expose\v1;
use App\Controller\AbstractController;
use App\Model\AppDropLog;
use App\Model\AppKeywordsMonitor;
use App\Model\AppKeywordsMonitorResult;
use App\Model\AppKeywordsMonitorTask;
@ -143,4 +144,23 @@ var_dump($requestData);
'msg' => 'ok'
]);
}
/**
* 刷下拉数据上报
* @url /api/expose/v1/tools/succ
* @return \Psr\Http\Message\ResponseInterface
*/
#[RequestMapping(path:'succ', methods:'post')]
public function success(): \Psr\Http\Message\ResponseInterface
{
$keyword = $this->request->post('Keyword');
$dropKeyword = $this->request->post('DropKeyword');
$op = $this->request->post('Op');
$model = new AppDropLog();
$model->keyword = $keyword;
$model->op = $op;
$model->drop_keyword = $dropKeyword;
$model->save();
return $this->response->json([]);
}
}

35
app/Model/AppDropLog.php Normal file
View File

@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace App\Model;
/**
* @property int $id
* @property \Carbon\Carbon $created_at
* @property int $created_by
* @property \Carbon\Carbon $updated_at
* @property int $updated_by
* @property string $keyword
* @property int $op
* @property string $drop_keyword
*/
class AppDropLog extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'app_drop_log';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'created_at' => 'datetime', 'created_by' => 'integer', 'updated_at' => 'datetime', 'updated_by' => 'integer', 'op' => 'integer'];
}