接口修改

This commit is contained in:
chengxl
2025-12-04 17:42:36 +08:00
parent 1e2a08c410
commit b944931568

View File

@@ -546,7 +546,7 @@ class Workbench extends Base
return json_encode(['status' => 10,'msg' => 'Code is illegal','data' => $aData]); return json_encode(['status' => 10,'msg' => 'Code is illegal','data' => $aData]);
} }
if($aCode['user_id'] != $iUserId){ if($aCode['user_id'] != $iUserId){
return json_encode(['status' => 10,'msg' => 'Illegal code operation','data' => $aData]); return json_encode(['status' => 11,'msg' => 'Illegal code operation','data' => $aData]);
} }
$iIsCode = 1; $iIsCode = 1;
} }
@@ -563,7 +563,7 @@ class Workbench extends Base
$iTime = empty($aArticleReviewer['ctime']) ? 0 : $aArticleReviewer['ctime']; $iTime = empty($aArticleReviewer['ctime']) ? 0 : $aArticleReviewer['ctime'];
if (!is_numeric($iTime) || (int)$iTime <= 0) { if (!is_numeric($iTime) || (int)$iTime <= 0) {
return json_encode([ return json_encode([
'status' => 11, 'status' => 12,
'msg' => 'Invalid record time, the review period has expired', 'msg' => 'Invalid record time, the review period has expired',
'data' => $aData 'data' => $aData
]); ]);
@@ -574,7 +574,7 @@ class Workbench extends Base
//执行审稿过期 //执行审稿过期
$aWhere = ['art_rev_id' => $iArtRevId,'state' => 5]; $aWhere = ['art_rev_id' => $iArtRevId,'state' => 5];
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['state' => 4]); $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]); return json_encode(['status' => 13,'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)); // 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));
//执行同意审稿 //执行同意审稿
@@ -582,7 +582,7 @@ class Workbench extends Base
$result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['state' => 0,'agree_review_time' => time()]); $result = Db::name('article_reviewer')->where($aWhere)->limit(1)->update(['state' => 0,'agree_review_time' => time()]);
} }
if($iIsCode != 1){ if($iIsCode != 1){
return json_encode(['status' => 12,'msg' => 'Reviewer did not agree to review','data' => $aData]); return json_encode(['status' => 14,'msg' => 'Reviewer did not agree to review','data' => $aData]);
} }
} }
//同意审稿 //同意审稿
@@ -594,7 +594,7 @@ class Workbench extends Base
$iTime = empty($iTime) ? intval($iCtime) : intval($iTime); $iTime = empty($iTime) ? intval($iCtime) : intval($iTime);
if (!is_numeric($iTime) || (int)$iTime <= 0) { if (!is_numeric($iTime) || (int)$iTime <= 0) {
return json_encode([ return json_encode([
'status' => 11, 'status' => 15,
'msg' => 'Invalid record time, the review period has expired', 'msg' => 'Invalid record time, the review period has expired',
'data' => $aData 'data' => $aData
]); ]);
@@ -602,7 +602,7 @@ class Workbench extends Base
//判断是否超过14天 //判断是否超过14天
$timeDiff = $iTime+$iFourteenDays; $timeDiff = $iTime+$iFourteenDays;
if($timeDiff < $iNowTime){ if($timeDiff < $iNowTime){
return json_encode(['status' => 11,'msg' => 'The number of days for agreeing to review has exceeded 14','data' => $aData]); return json_encode(['status' => 16,'msg' => 'The number of days for agreeing to review has exceeded 14','data' => $aData]);
} }
$aData['is_review_auth'] = 1; $aData['is_review_auth'] = 1;
return json_encode(['status' => 1,'msg' => 'success','data' => $aData]); return json_encode(['status' => 1,'msg' => 'success','data' => $aData]);