This commit is contained in:
wangjinlei
2023-07-11 09:28:06 +08:00
parent a4c92e437a
commit cf65d492f4
4 changed files with 70 additions and 0 deletions

View File

@@ -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);
}
}
?>