正在显示
5 个修改的文件
包含
158 行增加
和
1 行删除
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :DomainApplicantLogController.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/5/29 13:52 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Controllers\Aside\Domain; | ||
| 11 | + | ||
| 12 | +use App\Enums\Common\Code; | ||
| 13 | +use App\Http\Controllers\Aside\BaseController; | ||
| 14 | +use App\Http\Logic\Aside\Domain\DomainApplicantLogLogic; | ||
| 15 | +use Illuminate\Http\Request; | ||
| 16 | + | ||
| 17 | +class DomainApplicantLogController extends BaseController | ||
| 18 | +{ | ||
| 19 | + public function __construct(Request $request) | ||
| 20 | + { | ||
| 21 | + parent::__construct($request); | ||
| 22 | + $this->logic = new DomainApplicantLogLogic(); | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * @remark :获取列表 | ||
| 27 | + * @name :lists | ||
| 28 | + * @author :lyh | ||
| 29 | + * @method :post | ||
| 30 | + * @time :2025/5/29 13:54 | ||
| 31 | + */ | ||
| 32 | + public function lists(){ | ||
| 33 | + $lists = $this->logic->lists($this->map,$this->page,$this->row); | ||
| 34 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * @remark :保存数据 | ||
| 39 | + * @name :save | ||
| 40 | + * @author :lyh | ||
| 41 | + * @method :post | ||
| 42 | + * @time :2025/5/29 14:19 | ||
| 43 | + */ | ||
| 44 | + public function save(){ | ||
| 45 | + $this->request->validate([ | ||
| 46 | + 'domain'=>'required', | ||
| 47 | + 'applicant_name'=>'required', | ||
| 48 | + ],[ | ||
| 49 | + 'domain.required' => 'domain不能为空', | ||
| 50 | + 'applicant_name.required' => '申请人不能为空', | ||
| 51 | + ]); | ||
| 52 | + $data = $this->logic->saveDomainLog(); | ||
| 53 | + $this->response('success',Code::SUCCESS,$data); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * @remark :删除记录 | ||
| 58 | + * @name :del | ||
| 59 | + * @author :lyh | ||
| 60 | + * @method :post | ||
| 61 | + * @time :2025/5/29 14:25 | ||
| 62 | + */ | ||
| 63 | + public function del(){ | ||
| 64 | + $this->request->validate([ | ||
| 65 | + 'id'=>'required', | ||
| 66 | + ],[ | ||
| 67 | + 'id.required' => 'domain不能为空', | ||
| 68 | + ]); | ||
| 69 | + $data = $this->logic->delDomainLog(); | ||
| 70 | + $this->response('success',Code::SUCCESS,$data); | ||
| 71 | + } | ||
| 72 | +} |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :DomainApplicantLogLogic.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/5/29 13:53 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Logic\Aside\Domain; | ||
| 11 | + | ||
| 12 | +use App\Http\Logic\Aside\BaseLogic; | ||
| 13 | +use App\Models\Domain\DomainApplicantLog; | ||
| 14 | + | ||
| 15 | +class DomainApplicantLogLogic extends BaseLogic | ||
| 16 | +{ | ||
| 17 | + public function __construct() | ||
| 18 | + { | ||
| 19 | + parent::__construct(); | ||
| 20 | + $this->model = new DomainApplicantLog(); | ||
| 21 | + $this->param = $this->requestAll; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * @remark :列表 | ||
| 26 | + * @name :lists | ||
| 27 | + * @author :lyh | ||
| 28 | + * @method :post | ||
| 29 | + * @time :2025/5/29 14:34 | ||
| 30 | + */ | ||
| 31 | + public function lists($map,$page,$row){ | ||
| 32 | + $lists = $this->model->list($map,$page,$row,'id',['*']); | ||
| 33 | + return $this->success($lists); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * @remark :保存域名申请记录 | ||
| 38 | + * @name :saveDomainLog | ||
| 39 | + * @author :lyh | ||
| 40 | + * @method :post | ||
| 41 | + * @time :2025/5/29 14:34 | ||
| 42 | + */ | ||
| 43 | + public function saveDomainLog(){ | ||
| 44 | + if(isset($this->param['id']) && !empty($this->param['id'])){ | ||
| 45 | + $id = $this->param['id']; | ||
| 46 | + $this->model->edit($this->param,['id'=>$this->param['id']]); | ||
| 47 | + }else{ | ||
| 48 | + $id = $this->model->addReturnId($this->param); | ||
| 49 | + } | ||
| 50 | + return $this->success(['id'=>$id]); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * @remark :删除当前记录 | ||
| 55 | + * @name :delDomainLog | ||
| 56 | + * @author :lyh | ||
| 57 | + * @method :post | ||
| 58 | + * @time :2025/5/29 14:40 | ||
| 59 | + */ | ||
| 60 | + public function delDomainLog(){ | ||
| 61 | + $rs = $this->model->del($this->param); | ||
| 62 | + return $this->success($rs); | ||
| 63 | + } | ||
| 64 | +} |
| @@ -20,7 +20,6 @@ class DomainInfoLogic extends BaseLogic | @@ -20,7 +20,6 @@ class DomainInfoLogic extends BaseLogic | ||
| 20 | parent::__construct(); | 20 | parent::__construct(); |
| 21 | $this->model = new DomainInfo(); | 21 | $this->model = new DomainInfo(); |
| 22 | $this->param = $this->requestAll; | 22 | $this->param = $this->requestAll; |
| 23 | - | ||
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | /** | 25 | /** |
app/Models/Domain/DomainApplicantLog.php
0 → 100644
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :DomainApplicantLog.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/5/29 13:47 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Models\Domain; | ||
| 11 | + | ||
| 12 | +use App\Models\Base; | ||
| 13 | + | ||
| 14 | +class DomainApplicantLog extends Base | ||
| 15 | +{ | ||
| 16 | + protected $table = 'gl_domain_applicant_log'; | ||
| 17 | +} |
| @@ -269,6 +269,11 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -269,6 +269,11 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 269 | Route::any('/getCountryCode', [Aside\Domain\DomainInfoController::class, 'getCountryCode'])->name('admin.get_country_code'); | 269 | Route::any('/getCountryCode', [Aside\Domain\DomainInfoController::class, 'getCountryCode'])->name('admin.get_country_code'); |
| 270 | 270 | ||
| 271 | }); | 271 | }); |
| 272 | + Route::prefix('domain_log')->group(function () { | ||
| 273 | + Route::any('/', [Aside\Domain\DomainApplicantLogController::class, 'lists'])->name('admin.domain_log_lists'); | ||
| 274 | + Route::any('/save', [Aside\Domain\DomainApplicantLogController::class, 'save'])->name('admin.domain_log_save'); | ||
| 275 | + Route::any('/del', [Aside\Domain\DomainApplicantLogController::class, 'del'])->name('admin.domain_log_del'); | ||
| 276 | + }); | ||
| 272 | //图片操作 | 277 | //图片操作 |
| 273 | Route::prefix('images')->group(function () { | 278 | Route::prefix('images')->group(function () { |
| 274 | Route::post('/upload', [\App\Http\Controllers\File\ImageController::class, 'upload'])->name('images_upload'); | 279 | Route::post('/upload', [\App\Http\Controllers\File\ImageController::class, 'upload'])->name('images_upload'); |
-
请 注册 或 登录 后发表评论