作者 李宇航

合并分支 'master-server' 到 'master'

Master server



查看合并请求 !718
... ... @@ -78,10 +78,10 @@ class DeleteBlogCategory extends Command
$this->updateCategory();
DB::disconnect('custom_mysql');
$noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]);
echo 'success:' . $item['id'] . PHP_EOL;
echo 'success:' . $item['id'] . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL;
}catch (\Exception $e){
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
errorLog('delete_blog_category删除失败', $item, $e);
echo 'error:' . $item['id'] . $e->getMessage() . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL;
errorLog('delete_blog_category删除失败'.date('Y-m-d H:i:s'), $item, $e);
}
}
return true;
... ...
... ... @@ -78,9 +78,9 @@ class DeleteCustomCategory extends Command
$this->updateCategory();
DB::disconnect('custom_mysql');
$noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]);
echo 'success:' . $item['id'] . PHP_EOL;
echo 'success:' . $item['id'] . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL;
}catch (\Exception $e){
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
echo 'error:' . $item['id'] . $e->getMessage() . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL;
errorLog('delete_custom_category删除失败', $item, $e);
}
}
... ...
... ... @@ -78,9 +78,9 @@ class DeleteNewsCategory extends Command
$this->updateCategory();
DB::disconnect('custom_mysql');
$noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]);
echo 'success:' . $item['id'] . PHP_EOL;
echo 'success:' . $item['id'] . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL;
}catch (\Exception $e){
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
echo 'error:' . $item['id'] . $e->getMessage() . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL;
errorLog('delete_news_category删除失败', $item, $e);
}
}
... ...
... ... @@ -79,10 +79,10 @@ class DeleteProductCategory extends Command
$this->updateCategory();
DB::disconnect('custom_mysql');
$noticeLogModel->edit(['status'=>NoticeLog::STATUS_SUCCESS],['id'=>$item['id']]);
echo 'success:' . $item['id'] . PHP_EOL;
echo 'success:' . $item['id'] . '执行时间:'.date('Y-m-d H:i:s') . PHP_EOL;
}catch (\Exception $e){
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
errorLog('delete_product_category删除失败', $item, $e);
errorLog('delete_product_category删除失败'.',执行时间:'.date('Y-m-d H:i:s'), $item, $e);
}
}
return true;
... ...
... ... @@ -79,7 +79,7 @@ class InitKeyword extends Command
ProjectServer::useProject($notice['data']['project_id']);
$keyword = Keyword::whereNull('route')->get();
foreach ($keyword as $val) {
$this->output(' keywordID: ' . $val->id . ', title: ' . $val->title);
$this->output(' keywordID: ' . $val->id . ', title: ' . $val->title . '时间:'. date('Y-m-d H:i:s'));
try {
if(contains_russian($val['title'])){
$title = Translate::tran($val['title'], 'en');
... ... @@ -90,7 +90,7 @@ class InitKeyword extends Command
$val->route = $route;
$val->save();
} catch (\Exception $e) {
$this->output(' keywordID: ' . $val->id . ', title: ' . $val->title . ', error: ' . $e->getMessage());
$this->output(' keywordID: ' . $val->id . ', title: ' . $val->title . ', error: ' . $e->getMessage() . '执行时间:'.date('Y-m-d H:i:s'));
}
}
... ...
... ... @@ -63,9 +63,9 @@ class InitProject extends Command
$project_logic->createdRole($project['id']);
$item->status = NoticeLog::STATUS_SUCCESS;
$item->save();
echo 'success:' . $item['id'] . PHP_EOL;
echo 'success:' . $item['id'] . PHP_EOL . date('Y-m-d H:i:s');
}catch (\Exception $e){
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL . date('Y-m-d H:i:s');
errorLog('项目初始化失败', $item, $e);
$this->retry($item, $e->getMessage());
}
... ...
... ... @@ -96,9 +96,9 @@ class SyncProject extends Command
}
$item->status = NoticeLog::STATUS_SUCCESS;
$item->save();
echo 'success:' . $item['id'] . PHP_EOL;
echo 'success:' . $item['id'] . '执行时间:' . date('Y-m-d H:i:s') . PHP_EOL;
}catch (\Exception $e){
echo 'error:' . $item['id'] . $e->getMessage() .' line ' . $e->getLine() . PHP_EOL;
echo 'error:' . $item['id'] . $e->getMessage() .' line ' . $e->getLine() . '执行时间:' . PHP_EOL;
errorLog('项目同步失败', $item, $e);
$this->retry($item, $e->getMessage());
}
... ...
... ... @@ -349,4 +349,6 @@ class ExtensionModuleController extends BaseController
$moduleValueModel->del(['module_id'=>$this->param['module_id'],'uuid'=>$this->param['uuid']]);
$this->response('success');
}
}
... ...
... ... @@ -703,4 +703,22 @@ class ProductController extends BaseController
}
$this->response('success',Code::SUCCESS,['id'=>$id]);
}
/**
* @remark :删除
* @name :delProductType
* @author :lyh
* @method :post
* @time :2024/8/27 9:44
*/
public function delProductType(){
$this->request->validate([
'name'=>'required',
],[
'name.required' => 'id不为空',
]);
$typeModel = new ProductType();
$typeModel->del(['project_id'=>$this->user['project_id'],'name'=>$this->param['name']]);
$this->response('success');
}
}
... ...
... ... @@ -399,10 +399,10 @@ class ImageController extends Controller
}
$str_data[$k] = $v;
}
}
$str = 'watermark/2/'.implode('/',$str_data);
return $str;
}
}
return $str;
}
... ...
... ... @@ -9,6 +9,7 @@ use App\Models\CustomModule\CustomModuleCategory;
use App\Models\IsCom\ProjectComConfig;
use App\Models\News\NewsCategory;
use App\Models\Product\Category;
use App\Models\Product\ProductType;
use App\Models\Project\PageSetting;
use App\Models\RouteMap\RouteMap;
use App\Models\Service\Service as ServiceSettingModel;
... ... @@ -777,6 +778,14 @@ class BTemplateLogic extends BaseLogic
$productCategory = $this->getCategoryList((new Category()),1);
$newCategory = $this->getCategoryList((new NewsCategory()));
$blogCategory = $this->getCategoryList((new BlogCategory()));
$productTypeModel = new ProductType();
$productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']);
if(!empty($productTypeList)){
foreach ($productTypeList as $items){
$items['id'] = 'product_type_'.$items['id'];
$data["products"]["category"][] =$items;
}
}
if (!empty($productCategory)){
foreach ($productCategory as $item){$data["products"]["category"][] =$item;}
}
... ... @@ -837,6 +846,14 @@ class BTemplateLogic extends BaseLogic
$values['category'][] = $item;
}
}
$productTypeModel = new ProductType();
$productTypeList = $productTypeModel->list(['project_id'=>$this->user['project_id']],'id',['id','name']);
if(!empty($productTypeList)){
foreach ($productTypeList as $items){
$items['id'] = 'product_type_'.$items['id'];
$values['category'][] = $items;
}
}
break;
case '新闻':
$newCategory = $this->getCategoryList((new NewsCategory()),0,['id','name','pid']);
... ...
... ... @@ -189,7 +189,7 @@ class CosService
if($is_image){
$param = [
'image/'.urlSafeBase64Encode($domain.$data['image'] ?? ''),//图片
'gravity/'.($data['gravity'] ?? 'SouthEast'),
'gravity/'.($data['gravity'] ?? 'southeast'),
'dx/'.($data['dx'] ?? 0),
'dy/'. ($data['dy'] ?? 0),
'batch/'.($data['batch'] ?? 0),//平铺水印功能
... ... @@ -200,7 +200,7 @@ class CosService
}else{
$param = [
'text/'.urlSafeBase64Encode($data['text'] ?? ''),//文字水印名称
'gravity/'.($data['gravity'] ?? 'SouthEast'),
'gravity/'.($data['gravity'] ?? 'southeast'),
'dx/'.($data['dx'] ?? 10),
'dy/'. ($data['dy'] ?? 10),
'font/'.urlSafeBase64Encode($data['font'] ?? 'tahoma.ttf'),//默认宋体
... ...
... ... @@ -259,6 +259,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::any('/delProductKeyword', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductKeyword'])->name('product_delProductKeyword');
Route::any('/getProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'getProductType'])->name('product_getProductType');
Route::any('/saveType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'saveType'])->name('product_saveType');
Route::any('/delProductType', [\App\Http\Controllers\Bside\Product\ProductController::class, 'delProductType'])->name('product_delProductType');
//产品分类
Route::get('category', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'index'])->name('product_category');
Route::get('category/info', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'info'])->name('product_category_info');
... ...