作者 李宇航

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

Master server



查看合并请求 !1221
... ... @@ -1293,22 +1293,21 @@ MBR60L100PT,Rectifier/Schottky Barrier Rectifier,TO-247AD,Common Cathode,100,60,
continue;
}
//添加内容
$contentId = $customContentModel->addReturnId(['name'=>$array[0],'module_id'=>2]);
$contentId = $customContentModel->addReturnId(['name'=>$array[0],'module_id'=>2,'project_id'=>$project_id]);
echo date('Y-m-d H:i:s') . '当前扩展数据id:'. $contentId . PHP_EOL;
//注册路由
$route = RouteMap::setRoute($array[0], RouteMap::SOURCE_MODULE,
$contentId, $project_id);
$customContentModel->edit(['route'=>$route],['id'=>$contentId]);
if(!empty($array[1])){
$categoryId = ',';
$cateArr = explode('/',$array[1]);
foreach ($cateArr as $cateV){
$categoryId = ',';
$cateInfo = $customCategoryModel->read(['name'=>$cateV,'module_id'=>2,'project_id'=>$project_id]);
if($cateInfo !== false){
$categoryId .= $cateInfo['id'].',';
}
}
$categoryId = trim($categoryId,',');
$customContentModel->edit(['category_id'=>$categoryId],['id'=>$contentId]);
}
$saveData = [
... ...