作者 lyh

变更数据

... ... @@ -88,6 +88,7 @@ class GeoController extends BaseController
'description.max' => '描述不能超过500个字符',
]);
try {
$
$data = GeoConf::saveConf($this->param['project_id'], $this->param['manager_id'], $this->param['company'], $this->param['brand'], $this->param['description'], $this->param['prefix'], $this->param['suffix']);
# FIXME 保存GEO状态 达标数量
$this->response('success', Code::SUCCESS, $data);
... ...
... ... @@ -11,7 +11,7 @@ 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 App\Http\Logic\Aside\Geo\GeoQuestionLogic;
use Illuminate\Http\Request;
/**
... ... @@ -26,7 +26,7 @@ class GeoQuestionController extends BaseController
public function __construct(Request $request)
{
parent::__construct($request);
$this->logic = new GeoLogic();
$this->logic = new GeoQuestionLogic();
}
/**
... ...
<?php
/**
* @remark :
* @name :GeoLogic.php
* @name :GeoQuestionLogic.php
* @author :lyh
* @method :post
* @time :2025/7/2 17:51
... ... @@ -14,7 +14,7 @@ use App\Models\Geo\GeoPlatform;
use App\Models\Geo\GeoQuestion;
use App\Models\Project\Project;
class GeoLogic extends BaseLogic
class GeoQuestionLogic extends BaseLogic
{
public function __construct()
{
... ...
... ... @@ -23,33 +23,6 @@ class GeoConf extends Base
*/
protected $table = 'gl_project_geo_conf';
/**
* 保存GEO相关配置
* @param $project_id
* @param $manager_id
* @param $company
* @param $brand
* @param $description
* @param $prefix
* @param $suffix
* @return GeoConf
*/
public static function saveConf($project_id, $manager_id, $company, $brand, $description, $prefix, $suffix)
{
$data = self::where(compact('project_id'))->first();
if (empty($data)) {
$data = new self();
$data->project_id = $project_id;
}
$data->manager_id = $manager_id;
$data->company = $company;
$data->brand = $brand;
$data->description = $description;
$data->prefix = $prefix;
$data->suffix = $suffix;
$data->save();
return $data;
}
/**
* GEO 负责人集合
... ...