作者 刘锟

update

... ... @@ -367,16 +367,16 @@ class ProjectUpdate extends Command
'six_read' => 1,
'route' => $route
]);
if(!empty($content)){
if (!empty($content)) {
$data_s = [
'product_id'=>$id,
'column_id'=>1,
'text_type'=>1,
'title'=>'product detail',
'sort'=>1,
'content'=>json_encode(['content'=>$content ?? ''],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
'product_id' => $id,
'column_id' => 1,
'text_type' => 1,
'title' => 'product detail',
'sort' => 1,
'content' => json_encode(['content' => $content ?? ''], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
];
$detailModel = new Detail();
$detailModel->insert($data_s);
... ... @@ -407,18 +407,18 @@ class ProjectUpdate extends Command
'sort' => $item['sort'] ?? 0,
'files' => $files,
], ['id' => $id]);
if(!empty($content)){
if (!empty($content)) {
$detailModel = new Detail();
$detailModel->del(['product_id'=>$id,'column_id'=>1]);
$detailModel->del(['product_id' => $id, 'column_id' => 1]);
$data_s = [
'product_id'=>$id,
'column_id'=>1,
'text_type'=>1,
'title'=>'product detail',
'sort'=>1,
'content'=>json_encode(['content'=>$content ?? ''],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
'product_id' => $id,
'column_id' => 1,
'text_type' => 1,
'title' => 'product detail',
'sort' => 1,
'content' => json_encode(['content' => $content ?? ''], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s')
];
$detailModel->insert($data_s);
}
... ... @@ -710,6 +710,11 @@ class ProjectUpdate extends Command
if ($item['category'] ?? []) {
$category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]);
$category_id = implode(',', array_column($category_arr, 'id'));
//2293项目特殊处理
if ($project_id == 2293) {
$category_id = $category_id . ',3';
}
} else {
$category_custom = $category_model->read(['route' => $custom_info['route']], 'id');
if ($category_custom) {
... ...