合并分支 'master-server' 到 'master'
Master server 查看合并请求 !718
正在显示
13 个修改的文件
包含
56 行增加
和
18 行删除
| @@ -78,10 +78,10 @@ class DeleteBlogCategory extends Command | @@ -78,10 +78,10 @@ class DeleteBlogCategory extends Command | ||
| 78 | $this->updateCategory(); | 78 | $this->updateCategory(); |
| 79 | DB::disconnect('custom_mysql'); | 79 | DB::disconnect('custom_mysql'); |
| 80 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); | 80 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); |
| 81 | - echo 'success:' . $item['id'] . PHP_EOL; | 81 | + echo 'success:' . $item['id'] . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL; |
| 82 | }catch (\Exception $e){ | 82 | }catch (\Exception $e){ |
| 83 | - echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL; | ||
| 84 | - errorLog('delete_blog_category删除失败', $item, $e); | 83 | + echo 'error:' . $item['id'] . $e->getMessage() . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL; |
| 84 | + errorLog('delete_blog_category删除失败'.date('Y-m-d H:i:s'), $item, $e); | ||
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | return true; | 87 | return true; |
| @@ -78,9 +78,9 @@ class DeleteCustomCategory extends Command | @@ -78,9 +78,9 @@ class DeleteCustomCategory extends Command | ||
| 78 | $this->updateCategory(); | 78 | $this->updateCategory(); |
| 79 | DB::disconnect('custom_mysql'); | 79 | DB::disconnect('custom_mysql'); |
| 80 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); | 80 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); |
| 81 | - echo 'success:' . $item['id'] . PHP_EOL; | 81 | + echo 'success:' . $item['id'] . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL; |
| 82 | }catch (\Exception $e){ | 82 | }catch (\Exception $e){ |
| 83 | - echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL; | 83 | + echo 'error:' . $item['id'] . $e->getMessage() . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL; |
| 84 | errorLog('delete_custom_category删除失败', $item, $e); | 84 | errorLog('delete_custom_category删除失败', $item, $e); |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| @@ -78,9 +78,9 @@ class DeleteNewsCategory extends Command | @@ -78,9 +78,9 @@ class DeleteNewsCategory extends Command | ||
| 78 | $this->updateCategory(); | 78 | $this->updateCategory(); |
| 79 | DB::disconnect('custom_mysql'); | 79 | DB::disconnect('custom_mysql'); |
| 80 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); | 80 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); |
| 81 | - echo 'success:' . $item['id'] . PHP_EOL; | 81 | + echo 'success:' . $item['id'] . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL; |
| 82 | }catch (\Exception $e){ | 82 | }catch (\Exception $e){ |
| 83 | - echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL; | 83 | + echo 'error:' . $item['id'] . $e->getMessage() . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL; |
| 84 | errorLog('delete_news_category删除失败', $item, $e); | 84 | errorLog('delete_news_category删除失败', $item, $e); |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| @@ -79,10 +79,10 @@ class DeleteProductCategory extends Command | @@ -79,10 +79,10 @@ class DeleteProductCategory extends Command | ||
| 79 | $this->updateCategory(); | 79 | $this->updateCategory(); |
| 80 | DB::disconnect('custom_mysql'); | 80 | DB::disconnect('custom_mysql'); |
| 81 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); | 81 | $noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]); |
| 82 | - echo 'success:' . $item['id'] . PHP_EOL; | 82 | + echo 'success:' . $item['id'] . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL; |
| 83 | }catch (\Exception $e){ | 83 | }catch (\Exception $e){ |
| 84 | echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL; | 84 | echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL; |
| 85 | - errorLog('delete_product_category删除失败', $item, $e); | 85 | + errorLog('delete_product_category删除失败'.',执行时间:'.date('Y-m-d H:i:s'), $item, $e); |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | return true; | 88 | return true; |
| @@ -79,7 +79,7 @@ class InitKeyword extends Command | @@ -79,7 +79,7 @@ class InitKeyword extends Command | ||
| 79 | ProjectServer::useProject($notice['data']['project_id']); | 79 | ProjectServer::useProject($notice['data']['project_id']); |
| 80 | $keyword = Keyword::whereNull('route')->get(); | 80 | $keyword = Keyword::whereNull('route')->get(); |
| 81 | foreach ($keyword as $val) { | 81 | foreach ($keyword as $val) { |
| 82 | - $this->output(' keywordID: ' . $val->id . ', title: ' . $val->title); | 82 | + $this->output(' keywordID: ' . $val->id . ', title: ' . $val->title . '时间:'. date('Y-m-d H:i:s')); |
| 83 | try { | 83 | try { |
| 84 | if(contains_russian($val['title'])){ | 84 | if(contains_russian($val['title'])){ |
| 85 | $title = Translate::tran($val['title'], 'en'); | 85 | $title = Translate::tran($val['title'], 'en'); |
| @@ -90,7 +90,7 @@ class InitKeyword extends Command | @@ -90,7 +90,7 @@ class InitKeyword extends Command | ||
| 90 | $val->route = $route; | 90 | $val->route = $route; |
| 91 | $val->save(); | 91 | $val->save(); |
| 92 | } catch (\Exception $e) { | 92 | } catch (\Exception $e) { |
| 93 | - $this->output(' keywordID: ' . $val->id . ', title: ' . $val->title . ', error: ' . $e->getMessage()); | 93 | + $this->output(' keywordID: ' . $val->id . ', title: ' . $val->title . ', error: ' . $e->getMessage() . '执行时间:'.date('Y-m-d H:i:s')); |
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | 96 |
| @@ -63,9 +63,9 @@ class InitProject extends Command | @@ -63,9 +63,9 @@ class InitProject extends Command | ||
| 63 | $project_logic->createdRole($project['id']); | 63 | $project_logic->createdRole($project['id']); |
| 64 | $item->status = NoticeLog::STATUS_SUCCESS; | 64 | $item->status = NoticeLog::STATUS_SUCCESS; |
| 65 | $item->save(); | 65 | $item->save(); |
| 66 | - echo 'success:' . $item['id'] . PHP_EOL; | 66 | + echo 'success:' . $item['id'] . PHP_EOL . date('Y-m-d H:i:s'); |
| 67 | }catch (\Exception $e){ | 67 | }catch (\Exception $e){ |
| 68 | - echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL; | 68 | + echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL . date('Y-m-d H:i:s'); |
| 69 | errorLog('项目初始化失败', $item, $e); | 69 | errorLog('项目初始化失败', $item, $e); |
| 70 | $this->retry($item, $e->getMessage()); | 70 | $this->retry($item, $e->getMessage()); |
| 71 | } | 71 | } |
| @@ -96,9 +96,9 @@ class SyncProject extends Command | @@ -96,9 +96,9 @@ class SyncProject extends Command | ||
| 96 | } | 96 | } |
| 97 | $item->status = NoticeLog::STATUS_SUCCESS; | 97 | $item->status = NoticeLog::STATUS_SUCCESS; |
| 98 | $item->save(); | 98 | $item->save(); |
| 99 | - echo 'success:' . $item['id'] . PHP_EOL; | 99 | + echo 'success:' . $item['id'] . '执行时间:' . date('Y-m-d H:i:s') . PHP_EOL; |
| 100 | }catch (\Exception $e){ | 100 | }catch (\Exception $e){ |
| 101 | - echo 'error:' . $item['id'] . $e->getMessage() .' line ' . $e->getLine() . PHP_EOL; | 101 | + echo 'error:' . $item['id'] . $e->getMessage() .' line ' . $e->getLine() . '执行时间:' . PHP_EOL; |
| 102 | errorLog('项目同步失败', $item, $e); | 102 | errorLog('项目同步失败', $item, $e); |
| 103 | $this->retry($item, $e->getMessage()); | 103 | $this->retry($item, $e->getMessage()); |
| 104 | } | 104 | } |
| @@ -349,4 +349,6 @@ class ExtensionModuleController extends BaseController | @@ -349,4 +349,6 @@ class ExtensionModuleController extends BaseController | ||
| 349 | $moduleValueModel->del(['module_id'=>$this->param['module_id'],'uuid'=>$this->param['uuid']]); | 349 | $moduleValueModel->del(['module_id'=>$this->param['module_id'],'uuid'=>$this->param['uuid']]); |
| 350 | $this->response('success'); | 350 | $this->response('success'); |
| 351 | } | 351 | } |
| 352 | + | ||
| 353 | + | ||
| 352 | } | 354 | } |
| @@ -703,4 +703,22 @@ class ProductController extends BaseController | @@ -703,4 +703,22 @@ class ProductController extends BaseController | ||
| 703 | } | 703 | } |
| 704 | $this->response('success',Code::SUCCESS,['id'=>$id]); | 704 | $this->response('success',Code::SUCCESS,['id'=>$id]); |
| 705 | } | 705 | } |
| 706 | + | ||
| 707 | + /** | ||
| 708 | + * @remark :删除 | ||
| 709 | + * @name :delProductType | ||
| 710 | + * @author :lyh | ||
| 711 | + * @method :post | ||
| 712 | + * @time :2024/8/27 9:44 | ||
| 713 | + */ | ||
| 714 | + public function delProductType(){ | ||
| 715 | + $this->request->validate([ | ||
| 716 | + 'name'=>'required', | ||
| 717 | + ],[ | ||
| 718 | + 'name.required' => 'id不为空', | ||
| 719 | + ]); | ||
| 720 | + $typeModel = new ProductType(); | ||
| 721 | + $typeModel->del(['project_id'=>$this->user['project_id'],'name'=>$this->param['name']]); | ||
| 722 | + $this->response('success'); | ||
| 723 | + } | ||
| 706 | } | 724 | } |
| @@ -399,10 +399,10 @@ class ImageController extends Controller | @@ -399,10 +399,10 @@ class ImageController extends Controller | ||
| 399 | } | 399 | } |
| 400 | $str_data[$k] = $v; | 400 | $str_data[$k] = $v; |
| 401 | } | 401 | } |
| 402 | - } | ||
| 403 | $str = 'watermark/2/'.implode('/',$str_data); | 402 | $str = 'watermark/2/'.implode('/',$str_data); |
| 404 | return $str; | 403 | return $str; |
| 405 | } | 404 | } |
| 405 | + } | ||
| 406 | return $str; | 406 | return $str; |
| 407 | } | 407 | } |
| 408 | 408 |
| @@ -9,6 +9,7 @@ use App\Models\CustomModule\CustomModuleCategory; | @@ -9,6 +9,7 @@ use App\Models\CustomModule\CustomModuleCategory; | ||
| 9 | use App\Models\IsCom\ProjectComConfig; | 9 | use App\Models\IsCom\ProjectComConfig; |
| 10 | use App\Models\News\NewsCategory; | 10 | use App\Models\News\NewsCategory; |
| 11 | use App\Models\Product\Category; | 11 | use App\Models\Product\Category; |
| 12 | +use App\Models\Product\ProductType; | ||
| 12 | use App\Models\Project\PageSetting; | 13 | use App\Models\Project\PageSetting; |
| 13 | use App\Models\RouteMap\RouteMap; | 14 | use App\Models\RouteMap\RouteMap; |
| 14 | use App\Models\Service\Service as ServiceSettingModel; | 15 | use App\Models\Service\Service as ServiceSettingModel; |
| @@ -777,6 +778,14 @@ class BTemplateLogic extends BaseLogic | @@ -777,6 +778,14 @@ class BTemplateLogic extends BaseLogic | ||
| 777 | $productCategory = $this->getCategoryList((new Category()),1); | 778 | $productCategory = $this->getCategoryList((new Category()),1); |
| 778 | $newCategory = $this->getCategoryList((new NewsCategory())); | 779 | $newCategory = $this->getCategoryList((new NewsCategory())); |
| 779 | $blogCategory = $this->getCategoryList((new BlogCategory())); | 780 | $blogCategory = $this->getCategoryList((new BlogCategory())); |
| 781 | + $productTypeModel = new ProductType(); | ||
| 782 | + $productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']); | ||
| 783 | + if(!empty($productTypeList)){ | ||
| 784 | + foreach ($productTypeList as $items){ | ||
| 785 | + $items['id'] = 'product_type_'.$items['id']; | ||
| 786 | + $data["products"]["category"][] =$items; | ||
| 787 | + } | ||
| 788 | + } | ||
| 780 | if (!empty($productCategory)){ | 789 | if (!empty($productCategory)){ |
| 781 | foreach ($productCategory as $item){$data["products"]["category"][] =$item;} | 790 | foreach ($productCategory as $item){$data["products"]["category"][] =$item;} |
| 782 | } | 791 | } |
| @@ -837,6 +846,14 @@ class BTemplateLogic extends BaseLogic | @@ -837,6 +846,14 @@ class BTemplateLogic extends BaseLogic | ||
| 837 | $values['category'][] = $item; | 846 | $values['category'][] = $item; |
| 838 | } | 847 | } |
| 839 | } | 848 | } |
| 849 | + $productTypeModel = new ProductType(); | ||
| 850 | + $productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']); | ||
| 851 | + if(!empty($productTypeList)){ | ||
| 852 | + foreach ($productTypeList as $items){ | ||
| 853 | + $items['id'] = 'product_type_'.$items['id']; | ||
| 854 | + $values['category'][] = $items; | ||
| 855 | + } | ||
| 856 | + } | ||
| 840 | break; | 857 | break; |
| 841 | case '新闻': | 858 | case '新闻': |
| 842 | $newCategory = $this->getCategoryList((new NewsCategory()),0,['id','name','pid']); | 859 | $newCategory = $this->getCategoryList((new NewsCategory()),0,['id','name','pid']); |
| @@ -189,7 +189,7 @@ class CosService | @@ -189,7 +189,7 @@ class CosService | ||
| 189 | if($is_image){ | 189 | if($is_image){ |
| 190 | $param = [ | 190 | $param = [ |
| 191 | 'image/'.urlSafeBase64Encode($domain.$data['image'] ?? ''),//图片 | 191 | 'image/'.urlSafeBase64Encode($domain.$data['image'] ?? ''),//图片 |
| 192 | - 'gravity/'.($data['gravity'] ?? 'SouthEast'), | 192 | + 'gravity/'.($data['gravity'] ?? 'southeast'), |
| 193 | 'dx/'.($data['dx'] ?? 0), | 193 | 'dx/'.($data['dx'] ?? 0), |
| 194 | 'dy/'. ($data['dy'] ?? 0), | 194 | 'dy/'. ($data['dy'] ?? 0), |
| 195 | 'batch/'.($data['batch'] ?? 0),//平铺水印功能 | 195 | 'batch/'.($data['batch'] ?? 0),//平铺水印功能 |
| @@ -200,7 +200,7 @@ class CosService | @@ -200,7 +200,7 @@ class CosService | ||
| 200 | }else{ | 200 | }else{ |
| 201 | $param = [ | 201 | $param = [ |
| 202 | 'text/'.urlSafeBase64Encode($data['text'] ?? ''),//文字水印名称 | 202 | 'text/'.urlSafeBase64Encode($data['text'] ?? ''),//文字水印名称 |
| 203 | - 'gravity/'.($data['gravity'] ?? 'SouthEast'), | 203 | + 'gravity/'.($data['gravity'] ?? 'southeast'), |
| 204 | 'dx/'.($data['dx'] ?? 10), | 204 | 'dx/'.($data['dx'] ?? 10), |
| 205 | 'dy/'. ($data['dy'] ?? 10), | 205 | 'dy/'. ($data['dy'] ?? 10), |
| 206 | 'font/'.urlSafeBase64Encode($data['font'] ?? 'tahoma.ttf'),//默认宋体 | 206 | 'font/'.urlSafeBase64Encode($data['font'] ?? 'tahoma.ttf'),//默认宋体 |
| @@ -259,6 +259,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -259,6 +259,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 259 | Route::any('/delProductKeyword', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductKeyword'])->name('product_delProductKeyword'); | 259 | Route::any('/delProductKeyword', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductKeyword'])->name('product_delProductKeyword'); |
| 260 | Route::any('/getProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getProductType'])->name('product_getProductType'); | 260 | Route::any('/getProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getProductType'])->name('product_getProductType'); |
| 261 | Route::any('/saveType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'saveType'])->name('product_saveType'); | 261 | Route::any('/saveType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'saveType'])->name('product_saveType'); |
| 262 | + Route::any('/delProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductType'])->name('product_delProductType'); | ||
| 262 | //产品分类 | 263 | //产品分类 |
| 263 | Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category'); | 264 | Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category'); |
| 264 | Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info'); | 265 | Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info'); |
-
请 注册 或 登录 后发表评论