This commit is contained in:
chengxl
2025-11-03 16:15:14 +08:00
parent fd4df9a383
commit e41ecfebda

View File

@@ -213,6 +213,7 @@ class Contribute extends Base
//作者单位
$iArticleId = empty($iArticleId) ? $iUpdateArticleId : $iArticleId;
$aCompany = empty($aParam['company']) ? [] : $aParam['company'];
if(!empty($aCompany)){
$aWhere = ['article_id' => $iArticleId,'state' => 0];
$aOrgan = Db::name('article_organ')->field('organ_id,organ_name,sort')->where($aWhere)->select();
@@ -236,7 +237,7 @@ class Contribute extends Base
$iSort = $iMaxSort;
$aSort[$key] = $iMaxSort;
}
$aCompanyInsert[] = ['article_id' => $iArticleId,'organ_name' =>$sName,'create_time' => time(),'sort' => $iMaxSort];
$aCompanyInsert[] = ['article_id' => $iArticleId,'organ_name' =>$sName,'create_time' => time(),'sort' => $iSort];
}
}
if(!empty($aCompanyInsert)){