|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :GeoController.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/7/2 17:42
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Aside\Geo;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Http\Logic\Aside\Geo\GeoLogic;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :项目geo设置
|
|
|
|
* @name :GeoController
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/7/2 17:42
|
|
|
|
*/
|
|
|
|
class GeoController extends BaseController
|
|
|
|
{
|
|
|
|
public function __construct(Request $request)
|
|
|
|
{
|
|
|
|
parent::__construct($request);
|
|
|
|
$this->logic = new GeoLogic();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :开启或关闭geo设置
|
|
|
|
* @name :setGeoStatus
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/7/2 17:50
|
|
|
|
*/
|
|
|
|
public function setGeoStatus(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
'geo_status'=>'required',
|
|
|
|
'geo_frequency'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => '项目ID不能为空',
|
|
|
|
'geo_status.required' => '项目开启与关闭不能为空',
|
|
|
|
'geo_frequency.required' => '项目发送频率不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->setGeoStatus();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :问题列表
|
|
|
|
* @name :getGeoQuestion
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/7/3 9:09
|
|
|
|
*/
|
|
|
|
public function getGeoQuestionList(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => '项目ID不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->getGeoQuestionList($this->map,$this->page,$this->row,$this->order);
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存问题数据
|
|
|
|
* @name :saveGeoQuestion
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/7/3 9:31
|
|
|
|
*/
|
|
|
|
public function saveGeoQuestion(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
'question'=>'required',
|
|
|
|
'keywords'=>'required',
|
|
|
|
'url'=>'required',
|
|
|
|
'status'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => '项目ID不能为空',
|
|
|
|
'question.required' => '项目ID不能为空',
|
|
|
|
'keywords.required' => '项目ID不能为空',
|
|
|
|
'url.required' => '项目ID不能为空',
|
|
|
|
'status.required' => '项目ID不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->saveGeoQuestion();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|