This commit is contained in:
knowpia
2022-09-14 11:27:52 +08:00
parent 1118d0d687
commit edfd2e1d0b

View File

@@ -46,8 +46,12 @@ class Help
"count" => 1 "count" => 1
]); ]);
} else { } 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(); Db::commit();
return show("助力成功!", SUCCESS_CODE, []); return show("助力成功!", SUCCESS_CODE, []);
}catch (\Exception $e) { }catch (\Exception $e) {
@@ -70,7 +74,7 @@ class Help
$result['userinfo'] = []; $result['userinfo'] = [];
if($lastIndex==0) { 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)) { if (!empty($userinfo)) {
$result['userinfo'] = $userinfo; $result['userinfo'] = $userinfo;
} }