新增接口
This commit is contained in:
@@ -554,6 +554,8 @@ class Workbench extends Base
|
||||
$iNowTime = time();
|
||||
// 14天 = 14*24*3600 秒 = 1209600 秒
|
||||
$iFourteenDays = 14 * 24 * 3600;
|
||||
//五天
|
||||
$iFiveDays = 5 * 24 * 3600;
|
||||
//审稿邀请
|
||||
if($aArticleReviewer['state'] == 5){
|
||||
if($iIsCode == 1){//邮件进入未同意审稿直接同意
|
||||
@@ -566,12 +568,15 @@ class Workbench extends Base
|
||||
'data' => $aData
|
||||
]);
|
||||
}
|
||||
//判断是否超过14天
|
||||
$timeDiff = $iTime+$iFourteenDays;
|
||||
// var_dump(date('Y-m-d H:i:s',$timeDiff),date('Y-m-d H:i:s',$iTime),date('Y-m-d H:i:s',$iNowTime));
|
||||
//判断是否超过5天
|
||||
$timeDiff = $iTime+$iFiveDays;
|
||||
if($timeDiff < $iNowTime){
|
||||
return json_encode(['status' => 11,'msg' => 'The number of days for agreeing to review has exceeded 14','data' => $aData]);
|
||||
//执行审稿过期
|
||||
$aWhere = ['art_rev_id' => $iArtRevId,'state' => 5];
|
||||
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['state' => 4]);
|
||||
return json_encode(['status' => 11,'msg' => 'The number of days for agreeing to review has exceeded 5','data' => $aData]);
|
||||
}
|
||||
// var_dump(date('Y-m-d H:i:s',$timeDiff),date('Y-m-d H:i:s',$iTime),date('Y-m-d H:i:s',$iNowTime));
|
||||
//执行同意审稿
|
||||
$aWhere = ['art_rev_id' => $iArtRevId,'state' => 5];
|
||||
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['state' => 0,'agree_review_time' => time()]);
|
||||
|
||||
Reference in New Issue
Block a user