升级
This commit is contained in:
@@ -213,6 +213,7 @@ class Contribute extends Base
|
|||||||
//作者单位
|
//作者单位
|
||||||
$iArticleId = empty($iArticleId) ? $iUpdateArticleId : $iArticleId;
|
$iArticleId = empty($iArticleId) ? $iUpdateArticleId : $iArticleId;
|
||||||
$aCompany = empty($aParam['company']) ? [] : $aParam['company'];
|
$aCompany = empty($aParam['company']) ? [] : $aParam['company'];
|
||||||
|
|
||||||
if(!empty($aCompany)){
|
if(!empty($aCompany)){
|
||||||
$aWhere = ['article_id' => $iArticleId,'state' => 0];
|
$aWhere = ['article_id' => $iArticleId,'state' => 0];
|
||||||
$aOrgan = Db::name('article_organ')->field('organ_id,organ_name,sort')->where($aWhere)->select();
|
$aOrgan = Db::name('article_organ')->field('organ_id,organ_name,sort')->where($aWhere)->select();
|
||||||
@@ -236,7 +237,7 @@ class Contribute extends Base
|
|||||||
$iSort = $iMaxSort;
|
$iSort = $iMaxSort;
|
||||||
$aSort[$key] = $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)){
|
if(!empty($aCompanyInsert)){
|
||||||
|
|||||||
Reference in New Issue
Block a user