测试问题修改
This commit is contained in:
@@ -3215,7 +3215,7 @@ class Article extends Base
|
||||
}
|
||||
$info = $this->article_author_obj->where("art_aut_id", $data['art_aut_id'])->find();
|
||||
if ($info['sort'] < 2) {
|
||||
return jsonError("fail");
|
||||
return jsonError("Upward adjustment: Failed to obtain the location of the exchanged author");
|
||||
}
|
||||
$info_1 = $this->article_author_obj->where("article_id", $info['article_id'])->where("state", 0)->where("sort", $info['sort'] - 1)->find();
|
||||
$this->article_author_obj->where("art_aut_id", $info['art_aut_id'])->setDec("sort");
|
||||
@@ -3238,9 +3238,8 @@ class Article extends Base
|
||||
$info = $this->article_author_obj->where("art_aut_id", $data['art_aut_id'])->find();
|
||||
$info_1 = $this->article_author_obj->where("article_id", $info['article_id'])->where("state", 0)->where("sort", $info['sort'] + 1)->find();
|
||||
if ($info_1 == null) {
|
||||
return jsonError("fail");
|
||||
return jsonError("Downward adjustment:Failed to obtain the location of the exchanged author");
|
||||
}
|
||||
|
||||
$this->article_author_obj->where("art_aut_id", $info['art_aut_id'])->setInc("sort");
|
||||
$this->article_author_obj->where("art_aut_id", $info_1['art_aut_id'])->setDec("sort");
|
||||
return jsonSuccess([]);
|
||||
|
||||
Reference in New Issue
Block a user