上传参考文献相关调整
This commit is contained in:
@@ -1726,25 +1726,21 @@ return null;
|
|||||||
$iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id'];
|
$iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id'];
|
||||||
if(empty($iArticleId)){
|
if(empty($iArticleId)){
|
||||||
return jsonError('Please select the article');
|
return jsonError('Please select the article');
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
//查询是否缴费
|
//查询是否缴费
|
||||||
$aWhere = ['article_id' => $iArticleId,'state' => ['in',[5,6]]];
|
$aWhere = ['article_id' => $iArticleId,'state' => ['in',[5,6]]];
|
||||||
$aArticle = $this->article_obj->field('is_buy')->where($aWhere)->find();
|
$aArticle = $this->article_obj->field('is_buy')->where($aWhere)->find();
|
||||||
if(empty($aArticle)){
|
if(empty($aArticle)){
|
||||||
return jsonError('No article information found');
|
return jsonError('No article information found');
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
$iIsBuy = empty($aArticle['is_buy']) ? 0 : $aArticle['is_buy'];
|
$iIsBuy = empty($aArticle['is_buy']) ? 0 : $aArticle['is_buy'];
|
||||||
if($iIsBuy != 1){
|
if($iIsBuy != 1){
|
||||||
return jsonError('Article unpaid');
|
return jsonError('Article unpaid');
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
$aWhere = ['article_id' => $iArticleId,'state' => 0];
|
$aWhere = ['article_id' => $iArticleId,'state' => 0];
|
||||||
$aProductionArticle = $this->production_article_obj->field('p_article_id')->where($aWhere)->find();
|
$aProductionArticle = $this->production_article_obj->field('p_article_id')->where($aWhere)->find();
|
||||||
if(!empty($aProductionArticle)) {
|
if(!empty($aProductionArticle)) {
|
||||||
return jsonError('The article has entered production');
|
return jsonError('The article has entered production');
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
$aResult = $this->addProductionEx($iArticleId);
|
$aResult = $this->addProductionEx($iArticleId);
|
||||||
$aResult = empty($aResult->getData()) ? [] : $aResult->getData();
|
$aResult = empty($aResult->getData()) ? [] : $aResult->getData();
|
||||||
@@ -1752,7 +1748,6 @@ return null;
|
|||||||
$sMsg = empty($aResult['msg']) ? 'Data processing failed' : $aResult['msg'];
|
$sMsg = empty($aResult['msg']) ? 'Data processing failed' : $aResult['msg'];
|
||||||
if($iCode != 0){
|
if($iCode != 0){
|
||||||
return jsonError($sMsg);
|
return jsonError($sMsg);
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user