GeoController.php
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* Created by PhpStorm.
* User: zhl
* Date: 2025/10/23
* Time: 10:23
*/
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\Models\Geo\GeoConf;
use App\Models\Geo\GeoConfirm;
use App\Models\Manage\ManageHr;
use App\Models\Project\KeywordPrefix;
use App\Models\Project\Project;
use App\Models\ProjectAssociation\ProjectAssociation;
use Illuminate\Http\Request;
/**
* Class GeoController
* @package App\Http\Controllers\Aside\Geo
*/
class GeoController extends BaseController
{
public function __construct(){
parent::__construct();
$this->logic = new GeoLogic();
}
/**
* 获取GEO相关配置
* @param Request $request
*/
public function getConfig()
{
$this->request->validate([
'project_id' => 'required',
], [
'project_id.required' => '项目ID不能为空',
]);
$data = $this->logic->getCongInfo($this->param['project_id']);
$this->response('success', Code::SUCCESS, $data);
}
/**
* 保存GEO配置
* TODO 单独保存GEO开启状态, 达标数量
* @param Request $request
* @throws \App\Exceptions\AsideGlobalException
*/
public function saveConfig()
{
$this->request->validate([
'project_id' => 'required',
'manager_id' => 'nullable|integer',
'company' => 'nullable|max:200',
'brand' => 'nullable|max:200',
'description' => 'nullable|max:500',
], [
'project_id.required' => '项目ID不能为空',
'manager_id.integer' => '管理员参数非法',
'company.max' => '公司名称不能超过200个字符',
'brand.max' => '品牌名不能超过200个字符',
'description.max' => '描述不能超过500个字符',
]);
$data = $this->logic->saveConfig($this->param);
$this->response('success', Code::SUCCESS, $data);
}
/**
* OA后台管理员,保存确认数据
* 客户可以进行确认, OA后台也可以进行确认,以及修改
* @param Request $request
*/
public function saveConfirmData(Request $request)
{
}
}