fix bug
This commit is contained in:
@@ -46,8 +46,12 @@ class Help
|
||||
"count" => 1
|
||||
]);
|
||||
} else {
|
||||
Db::name("app_help")->where(["id" => $appHelp['id']])->inc("count", 15)->update();
|
||||
Db::name("app_help")->where(["id" => $appHelp['id']])->inc("count", 1)->update();
|
||||
}
|
||||
|
||||
Db::name("student")->where(["id" => $info['id']])->inc("hot", 1)->update();
|
||||
Db::name("student")->where(["id" => $info['id']])->inc("mhot_count", 1)->update();
|
||||
|
||||
Db::commit();
|
||||
return show("助力成功!", SUCCESS_CODE, []);
|
||||
}catch (\Exception $e) {
|
||||
@@ -70,7 +74,7 @@ class Help
|
||||
|
||||
$result['userinfo'] = [];
|
||||
if($lastIndex==0) {
|
||||
$userinfo = Db::name("student")->where("id", $student_id)->field("id,nickname,identifier,avatar,age,type,disabled as is_disabled,city,school,hot,hot_count")->find();
|
||||
$userinfo = Db::name("student")->where("id", $student_id)->field("id,nickname,identifier,avatar,age,type,disabled as is_disabled,city,school,hot,mhot_count as hot_count")->find();
|
||||
if (!empty($userinfo)) {
|
||||
$result['userinfo'] = $userinfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user