main bug 修复
This commit is contained in:
@@ -2316,17 +2316,17 @@ class Article extends Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testArticleImageEx(){
|
// public function testArticleImageEx(){
|
||||||
$data = $this->request->post();
|
// $data = $this->request->post();
|
||||||
$rule = new Validate([
|
// $rule = new Validate([
|
||||||
"article_id"=>"require"
|
// "article_id"=>"require"
|
||||||
]);
|
// ]);
|
||||||
if(!$rule->check($data)){
|
// if(!$rule->check($data)){
|
||||||
return jsonError($rule->getError());
|
// return jsonError($rule->getError());
|
||||||
}
|
// }
|
||||||
$this->addArticleMainEx($data['article_id']);
|
// $this->addArticleMainEx($data['article_id']);
|
||||||
return jsonSuccess([]);
|
// return jsonSuccess([]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
public function getArticleImages(){
|
public function getArticleImages(){
|
||||||
|
|||||||
@@ -414,13 +414,13 @@ class Base extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//将主体内容写入数据库
|
//将主体内容写入数据库
|
||||||
foreach ($frag['main'] as $v) {
|
// foreach ($frag['main'] as $v) {
|
||||||
$ca['p_article_id'] = $p_article_id;
|
// $ca['p_article_id'] = $p_article_id;
|
||||||
$ca['content'] = $v;
|
// $ca['content'] = $v;
|
||||||
$ca['content_g'] = '';
|
// $ca['content_g'] = '';
|
||||||
$ca['ctime'] = time();
|
// $ca['ctime'] = time();
|
||||||
$this->production_article_main_obj->insert($ca);
|
// $this->production_article_main_obj->insert($ca);
|
||||||
}
|
// }
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,6 +428,13 @@ class Base extends Controller
|
|||||||
|
|
||||||
public function addArticleMainEx($article_id){
|
public function addArticleMainEx($article_id){
|
||||||
$article_info = $this->article_obj->where('article_id', $article_id)->find();
|
$article_info = $this->article_obj->where('article_id', $article_id)->find();
|
||||||
|
|
||||||
|
$check = $this->article_main_obj->where("article_id",$article_id)->whereIn("state",[0,2])->find();
|
||||||
|
if($check){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$files = $this->article_file_obj
|
$files = $this->article_file_obj
|
||||||
->where('article_id', $article_info['article_id'])
|
->where('article_id', $article_info['article_id'])
|
||||||
->where('type_name', 'manuscirpt')
|
->where('type_name', 'manuscirpt')
|
||||||
|
|||||||
Reference in New Issue
Block a user