fix bug
This commit is contained in:
@@ -21,7 +21,7 @@ class Help
|
||||
if(empty($info)){
|
||||
return show("找不到该学生信息!");
|
||||
}
|
||||
|
||||
$hot = $info->hot;
|
||||
$data = [
|
||||
"userid"=>$userid,
|
||||
"student_id"=>$student_id,
|
||||
@@ -53,7 +53,7 @@ class Help
|
||||
Db::name("student")->where(["id" => $student_id])->inc("mhot_count", 1)->update();
|
||||
|
||||
Db::commit();
|
||||
return show("助力成功!", SUCCESS_CODE, []);
|
||||
return show("助力成功!", SUCCESS_CODE, ["hot"=>$hot++]);
|
||||
}catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
return show("助力失败!");
|
||||
|
||||
Reference in New Issue
Block a user