Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
4 个修改的文件
包含
100 行增加
和
0 行删除
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Controllers\Bside\Setting; | ||
| 4 | + | ||
| 5 | +use App\Enums\Common\Code; | ||
| 6 | +use App\Http\Controllers\Bside\BaseController; | ||
| 7 | +use App\Http\Logic\Bside\Setting\ProofreadingLogic; | ||
| 8 | + | ||
| 9 | +class ProofreadingController extends BaseController | ||
| 10 | +{ | ||
| 11 | + /** | ||
| 12 | + * @name :lists | ||
| 13 | + * @author :lyh | ||
| 14 | + * @method :post | ||
| 15 | + * @time :2023/6/12 10:52 | ||
| 16 | + */ | ||
| 17 | + public function lists(ProofreadingLogic $proofreadingLogic){ | ||
| 18 | + $lists = $proofreadingLogic->proofreadingList($this->map,$this->page,$this->row); | ||
| 19 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * @name :save | ||
| 24 | + * @author :lyh | ||
| 25 | + * @method :post | ||
| 26 | + * @time :2023/6/12 10:52 | ||
| 27 | + */ | ||
| 28 | + public function save(ProofreadingLogic $proofreadingLogic){ | ||
| 29 | + $rs = $proofreadingLogic->proofreadingSave(); | ||
| 30 | + $this->response('success'); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | +} |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Logic\Bside\Setting; | ||
| 4 | + | ||
| 5 | +use App\Http\Logic\Bside\BaseLogic; | ||
| 6 | +use App\Models\WebSetting\Proofreading; | ||
| 7 | + | ||
| 8 | +class ProofreadingLogic extends BaseLogic | ||
| 9 | +{ | ||
| 10 | + public function __construct() | ||
| 11 | + { | ||
| 12 | + parent::__construct(); | ||
| 13 | + $this->model = new Proofreading(); | ||
| 14 | + $this->param = $this->requestAll; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + /** | ||
| 18 | + * @name :(校队列表)proofreadingList | ||
| 19 | + * @author :lyh | ||
| 20 | + * @method :post | ||
| 21 | + * @time :2023/6/12 11:06 | ||
| 22 | + */ | ||
| 23 | + public function proofreadingList($map,$p,$row,$order = 'id',$filed = ['*']){ | ||
| 24 | + $list = $this->model->lists($map,$p,$row,$order,$filed); | ||
| 25 | + return $this->success($list); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * @name :(保存翻译校队)proofreadingSave | ||
| 30 | + * @author :lyh | ||
| 31 | + * @method :post | ||
| 32 | + * @time :2023/6/12 11:03 | ||
| 33 | + */ | ||
| 34 | + public function proofreadingSave(){ | ||
| 35 | + try { | ||
| 36 | + //删除以前的数据 | ||
| 37 | + $this->model->del(['project_id'=>$this->user['project_id']]); | ||
| 38 | + foreach ($this->param['data'] as $k => $v){ | ||
| 39 | + $v['created_at'] = date('Y-m-d H:i:s'); | ||
| 40 | + $v['updated_at'] = date('Y-m-d H:i:s'); | ||
| 41 | + $v['project_id'] = $this->user['project_id']; | ||
| 42 | + $this->param['data'][$k] = $v; | ||
| 43 | + } | ||
| 44 | + //新增 | ||
| 45 | + $this->model->insert($this->param['data']); | ||
| 46 | + }catch (\Exception $e){ | ||
| 47 | + $this->fail('error'); | ||
| 48 | + } | ||
| 49 | + return $this->success(); | ||
| 50 | + } | ||
| 51 | +} |
app/Models/WebSetting/Proofreading.php
0 → 100644
| @@ -133,6 +133,12 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -133,6 +133,12 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 133 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\WebSettingReceivingController::class, 'save'])->name('web_setting_receiving_save'); | 133 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\WebSettingReceivingController::class, 'save'])->name('web_setting_receiving_save'); |
| 134 | }); | 134 | }); |
| 135 | 135 | ||
| 136 | + //翻译校队 | ||
| 137 | + Route::prefix('proofreading')->group(function () { | ||
| 138 | + Route::any('/', [\App\Http\Controllers\Bside\Setting\ProofreadingController::class, 'lists'])->name('web_setting_receiving_lists'); | ||
| 139 | + Route::any('/save', [\App\Http\Controllers\Bside\Setting\ProofreadingController::class, 'save'])->name('web_setting_receiving_save'); | ||
| 140 | + }); | ||
| 141 | + | ||
| 136 | }); | 142 | }); |
| 137 | //产品 | 143 | //产品 |
| 138 | Route::prefix('product')->group(function () { | 144 | Route::prefix('product')->group(function () { |
-
请 注册 或 登录 后发表评论