Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
9 个修改的文件
包含
229 行增加
和
17 行删除
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Controllers\Aside\Projects; | ||
| 4 | + | ||
| 5 | +use App\Enums\Common\Code; | ||
| 6 | +use App\Http\Controllers\Aside\BaseController; | ||
| 7 | +use App\Http\Logic\Aside\Projects\InquiryInfoLogic; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @remark :询盘中心 | ||
| 11 | + * @class :InquiryInfoController.php | ||
| 12 | + * @author :lyh | ||
| 13 | + * @time :2023/7/11 14:33 | ||
| 14 | + */ | ||
| 15 | +class InquiryInfoController extends BaseController | ||
| 16 | +{ | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * @remark :获取询盘中心列表 | ||
| 20 | + * @name :lists | ||
| 21 | + * @author :lyh | ||
| 22 | + * @method :post | ||
| 23 | + * @time :2023/7/11 15:23 | ||
| 24 | + */ | ||
| 25 | + public function lists(InquiryInfoLogic $inquiryInfoLogic){ | ||
| 26 | + $lists = $inquiryInfoLogic->getInquiryLists($this->map,$this->page,$this->row,$this->order); | ||
| 27 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * @remark :保存询盘信息 | ||
| 32 | + * @name :save | ||
| 33 | + * @author :lyh | ||
| 34 | + * @method :post | ||
| 35 | + * @time :2023/7/11 15:33 | ||
| 36 | + */ | ||
| 37 | + public function save(InquiryInfoLogic $inquiryInfoLogic){ | ||
| 38 | + if(isset($this->param['id']) && !empty($this->param['id'])){ | ||
| 39 | + $this->request->validate([ | ||
| 40 | + 'id'=>'required' | ||
| 41 | + ],[ | ||
| 42 | + 'id.required' => 'ID不能为空' | ||
| 43 | + ]); | ||
| 44 | + } | ||
| 45 | + //参数验证 | ||
| 46 | + $this->validationParam(); | ||
| 47 | + $inquiryInfoLogic->inquirySave(); | ||
| 48 | + $this->response('success'); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * @remark :参数验证 | ||
| 53 | + * @name :validationParam | ||
| 54 | + * @author :lyh | ||
| 55 | + * @method :post | ||
| 56 | + * @time :2023/7/11 15:34 | ||
| 57 | + */ | ||
| 58 | + public function validationParam(){ | ||
| 59 | + $this->request->validate([ | ||
| 60 | + 'name'=>'required',//名称 | ||
| 61 | + 'email'=>'required',//邮箱 | ||
| 62 | + 'phone'=>'required',//电话号码 | ||
| 63 | + 'ip'=>'required',//ip | ||
| 64 | + 'forward_url'=>'required',//转发网址 | ||
| 65 | + 'message'=>'required',//发送内容 | ||
| 66 | + 'delay'=>'required',//延迟发送时间 | ||
| 67 | + 'type'=>'required',//询盘1类型 | ||
| 68 | + ],[ | ||
| 69 | + 'name.required' => '名称不能为空', | ||
| 70 | + 'email.required' => '邮箱不能为空', | ||
| 71 | + 'phone.required' => '电话号码不能为空', | ||
| 72 | + 'ip.required' => 'ip不能为空', | ||
| 73 | + 'forward_url.required' => '转发网址不能为空', | ||
| 74 | + 'message.required' => '发送内容不能为空', | ||
| 75 | + 'delay.required' => '延迟发送时间不能为空', | ||
| 76 | + 'type.required' => '类型不能为空', | ||
| 77 | + ]); | ||
| 78 | + } | ||
| 79 | +} |
| @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Storage; | @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Storage; | ||
| 11 | 11 | ||
| 12 | /** | 12 | /** |
| 13 | * 精准询盘 | 13 | * 精准询盘 |
| 14 | - * Class InquiryController | 14 | + * Class InquiryInfoController |
| 15 | * @package App\Http\Controllers\Bside | 15 | * @package App\Http\Controllers\Bside |
| 16 | * @author zbj | 16 | * @author zbj |
| 17 | * @date 2023/5/4 | 17 | * @date 2023/5/4 |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Logic\Aside\Projects; | ||
| 4 | + | ||
| 5 | +use App\Http\Logic\Aside\BaseLogic; | ||
| 6 | +use App\Models\Projects\InquiryInfo; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @remark :询盘中心 | ||
| 10 | + * @class :InquiryInfoLogic.php | ||
| 11 | + * @author :lyh | ||
| 12 | + * @time :2023/7/11 15:20 | ||
| 13 | + */ | ||
| 14 | +class InquiryInfoLogic extends BaseLogic | ||
| 15 | +{ | ||
| 16 | + | ||
| 17 | + public function __construct() | ||
| 18 | + { | ||
| 19 | + parent::__construct(); | ||
| 20 | + $this->param = $this->requestAll; | ||
| 21 | + $this->model = new InquiryInfo(); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * @remark :获取列表 | ||
| 26 | + * @name :getInquiryLists | ||
| 27 | + * @author :lyh | ||
| 28 | + * @method :post | ||
| 29 | + * @time :2023/7/11 15:25 | ||
| 30 | + */ | ||
| 31 | + public function getInquiryLists($map,$page,$row,$order = 'id'){ | ||
| 32 | + $query = $this->model->leftJoin('gl_inquiry_user', 'gl_inquiry_user.xp_id', '=', 'gl_inquiry_info.id') | ||
| 33 | + ->orderBy('gl_inquiry_info.'.$order,'desc'); | ||
| 34 | + //搜索条件处理 | ||
| 35 | + if(isset($map['domain'])){ | ||
| 36 | + $query = $query->where('gl_inquiry_info.domain','like','%'.$map['domain'].'%'); | ||
| 37 | + } | ||
| 38 | + $query = $this->searchParam($query,$map); | ||
| 39 | + $lists = $query->paginate($row, $this->selectParam(), 'page', $page); | ||
| 40 | + return $this->success($lists); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * @remark :查询字段 | ||
| 45 | + * @name :selectParam | ||
| 46 | + * @author :lyh | ||
| 47 | + * @method :post | ||
| 48 | + * @time :2023/7/11 16:57 | ||
| 49 | + */ | ||
| 50 | + public function selectParam(){ | ||
| 51 | + $select = [ | ||
| 52 | + 'gl_inquiry_info.*', | ||
| 53 | + 'gl_inquiry_user.user_id', | ||
| 54 | + 'gl_inquiry_user.user_name', | ||
| 55 | + 'gl_inquiry_user.time', | ||
| 56 | + 'gl_inquiry_user.message', | ||
| 57 | + 'gl_inquiry_user.ip', | ||
| 58 | + 'gl_inquiry_user.url', | ||
| 59 | + 'gl_inquiry_user.`status`', | ||
| 60 | + 'gl_inquiry_user.yanchi', | ||
| 61 | + 'gl_inquiry_user.send_time' | ||
| 62 | + ]; | ||
| 63 | + return $select; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * @remark :自定义添加特殊询盘信息 | ||
| 68 | + * @name :inquirySave | ||
| 69 | + * @author :lyh | ||
| 70 | + * @method :post | ||
| 71 | + * @time :2023/7/12 9:22 | ||
| 72 | + */ | ||
| 73 | + public function inquirySave(){ | ||
| 74 | + | ||
| 75 | + } | ||
| 76 | +} |
app/Models/Projects/InquiryInfo.php
0 → 100644
app/Models/Projects/InquiryUser.php
0 → 100644
| @@ -12,5 +12,7 @@ use App\Models\Base; | @@ -12,5 +12,7 @@ use App\Models\Base; | ||
| 12 | */ | 12 | */ |
| 13 | class Projects extends Base | 13 | class Projects extends Base |
| 14 | { | 14 | { |
| 15 | - protected $table = 'gl_projects'; | 15 | + //连接数据库 |
| 16 | + protected $connection = 'projects_mysql'; | ||
| 17 | + protected $table = 'projects'; | ||
| 16 | } | 18 | } |
| @@ -12,5 +12,6 @@ use App\Models\Base; | @@ -12,5 +12,6 @@ use App\Models\Base; | ||
| 12 | */ | 12 | */ |
| 13 | class ProjectsSeoTask extends Base | 13 | class ProjectsSeoTask extends Base |
| 14 | { | 14 | { |
| 15 | - protected $table = 'gl_project_seo_task'; | 15 | + protected $connection = 'projects_mysql'; |
| 16 | + protected $table = 'project_seo_task'; | ||
| 16 | } | 17 | } |
| @@ -102,6 +102,25 @@ return [ | @@ -102,6 +102,25 @@ return [ | ||
| 102 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), | 102 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), |
| 103 | ]) : [], | 103 | ]) : [], |
| 104 | ], | 104 | ], |
| 105 | + 'projects_mysql' => [ | ||
| 106 | + 'driver' => 'mysql', | ||
| 107 | + 'url' => '', // DB_DATABASE_URL | ||
| 108 | + 'host' => '192.30.242.45', // DB_DATABASE_HOST | ||
| 109 | + 'port' => '3306', // DB_DATABASE_PORT | ||
| 110 | + 'database' => 'google_seo_ips', // DB_DATABASE_CUSTOM | ||
| 111 | + 'username' => 'google_seo_ips', // DB_DATABASE_USER | ||
| 112 | + 'password' => 'hW67iAkmhcb5jHFr', // DB_DATABASE_PASSWORD | ||
| 113 | + 'unix_socket' => env('DB_SOCKET', ''), | ||
| 114 | + 'charset' => 'utf8mb4', | ||
| 115 | + 'collation' => 'utf8mb4_unicode_ci', | ||
| 116 | + 'prefix' => '', | ||
| 117 | + 'prefix_indexes' => true, | ||
| 118 | + 'strict' => true, | ||
| 119 | + 'engine' => null, | ||
| 120 | + 'options' => extension_loaded('pdo_mysql') ? array_filter([ | ||
| 121 | + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), | ||
| 122 | + ]) : [], | ||
| 123 | + ], | ||
| 105 | 124 | ||
| 106 | 'pgsql' => [ | 125 | 'pgsql' => [ |
| 107 | 'driver' => 'pgsql', | 126 | 'driver' => 'pgsql', |
| @@ -112,20 +112,6 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -112,20 +112,6 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 112 | }); | 112 | }); |
| 113 | }); | 113 | }); |
| 114 | 114 | ||
| 115 | - //优化gsc账号记录表 | ||
| 116 | - Route::prefix('gsc')->group(function () { | ||
| 117 | - Route::any('/', [Aside\Project\ProjectGscController::class, 'lists'])->name('admin.lists'); | ||
| 118 | - Route::any('/domainLists', [Aside\Project\ProjectGscController::class, 'domainLists'])->name('admin.domainLists'); | ||
| 119 | - Route::any('/read', [Aside\Project\ProjectGscController::class, 'read'])->name('admin.read'); | ||
| 120 | - Route::any('/save', [Aside\Project\ProjectGscController::class, 'save'])->name('admin.save'); | ||
| 121 | - Route::any('/del', [Aside\Project\ProjectGscController::class, 'del'])->name('admin.del'); | ||
| 122 | - }); | ||
| 123 | - | ||
| 124 | - //gsc账号审核 | ||
| 125 | - Route::prefix('optimize')->group(function () { | ||
| 126 | - Route::any('/empowerDomain', [Aside\Project\OptimizeController::class, 'empowerDomain'])->name('admin.empowerDomain'); | ||
| 127 | - }); | ||
| 128 | - | ||
| 129 | //企业服务配置信息 | 115 | //企业服务配置信息 |
| 130 | Route::prefix('service')->group(function () { | 116 | Route::prefix('service')->group(function () { |
| 131 | Route::any('/', [Aside\Service\ServiceController::class, 'lists'])->name('admin.service_lists'); | 117 | Route::any('/', [Aside\Service\ServiceController::class, 'lists'])->name('admin.service_lists'); |
| @@ -212,6 +198,19 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -212,6 +198,19 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 212 | Route::prefix('log')->group(function () { | 198 | Route::prefix('log')->group(function () { |
| 213 | Route::post('/', [Aside\Projects\ProjectsLogController::class, 'lists'])->name('projectsLog_lists'); | 199 | Route::post('/', [Aside\Projects\ProjectsLogController::class, 'lists'])->name('projectsLog_lists'); |
| 214 | }); | 200 | }); |
| 201 | + //优化gsc账号记录表 | ||
| 202 | + Route::prefix('gsc')->group(function () { | ||
| 203 | + Route::any('/', [Aside\Project\ProjectGscController::class, 'lists'])->name('admin.lists'); | ||
| 204 | + Route::any('/domainLists', [Aside\Project\ProjectGscController::class, 'domainLists'])->name('admin.domainLists'); | ||
| 205 | + Route::any('/read', [Aside\Project\ProjectGscController::class, 'read'])->name('admin.read'); | ||
| 206 | + Route::any('/save', [Aside\Project\ProjectGscController::class, 'save'])->name('admin.save'); | ||
| 207 | + Route::any('/del', [Aside\Project\ProjectGscController::class, 'del'])->name('admin.del'); | ||
| 208 | + }); | ||
| 209 | + | ||
| 210 | + //gsc账号审核 | ||
| 211 | + Route::prefix('optimize')->group(function () { | ||
| 212 | + Route::any('/empowerDomain', [Aside\Project\OptimizeController::class, 'empowerDomain'])->name('admin.empowerDomain'); | ||
| 213 | + }); | ||
| 215 | }); | 214 | }); |
| 216 | 215 | ||
| 217 | // // 公共主题模版 | 216 | // // 公共主题模版 |
| @@ -264,6 +263,10 @@ Route::group([], function () { | @@ -264,6 +263,10 @@ Route::group([], function () { | ||
| 264 | Route::any('/del', [Aside\Template\ATemplateTypeController::class, 'del'])->name('admin.ATemplateType_del'); | 263 | Route::any('/del', [Aside\Template\ATemplateTypeController::class, 'del'])->name('admin.ATemplateType_del'); |
| 265 | }); | 264 | }); |
| 266 | }); | 265 | }); |
| 266 | + | ||
| 267 | + Route::prefix('inquiry')->group(function () { | ||
| 268 | + Route::any('/', [Aside\Projects\InquiryInfoController::class, 'lists'])->name('admin.inquiry_lists'); | ||
| 269 | + }); | ||
| 267 | }); | 270 | }); |
| 268 | 271 | ||
| 269 | 272 |
-
请 注册 或 登录 后发表评论