1
This commit is contained in:
@@ -77,6 +77,48 @@ class Web extends Base
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**获取文章流程通过doi
|
||||
* @return void
|
||||
*/
|
||||
public function getStackByDoi(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"doi"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$r = explode("/",$data['doi']);
|
||||
$p_info = $this->production_article_obj->where('doi',$r[1])->where("state",2)->find();
|
||||
if(!$p_info){
|
||||
return jsonError("");
|
||||
}
|
||||
$article_info = $this->article_obj->where('article_id',$p_info['article_id'])->find();
|
||||
$msgs = $this->article_msg_obj->where('article_id',$article_info['article_id'])->select();
|
||||
$begin['type'] = 0;
|
||||
$begin['time'] = $article_info['ctime'];
|
||||
$frag[] = $begin;
|
||||
foreach ($msgs as $v){
|
||||
$frag[] = [
|
||||
"type"=>$v['state_to'],
|
||||
"time"=>$v['ctime']
|
||||
];
|
||||
// switch ($v['state_to']){
|
||||
// case 1:
|
||||
// $frag[] = [
|
||||
// "type"=>1,
|
||||
// "time"=>$v['ctime']
|
||||
// ];
|
||||
// break;
|
||||
// case 2:
|
||||
// $frag[] = [];
|
||||
// break
|
||||
// }
|
||||
}
|
||||
|
||||
$re['msgs'] = $frag;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user