This commit is contained in:
knowpia
2022-09-14 13:42:39 +08:00
parent 910728bb72
commit 28cf375d70

View File

@@ -30,7 +30,7 @@ class Help
$data['sha'] = sha1(json_encode($data)); $data['sha'] = sha1(json_encode($data));
Db::startTrans(); Db::startTrans();
try { // try {
$info = Db::name("app_help_log")->where("sha", $data['sha'])->find(); $info = Db::name("app_help_log")->where("sha", $data['sha'])->find();
if (!empty($info)) { if (!empty($info)) {
return show("你今天已经为他助力过,谢谢!"); return show("你今天已经为他助力过,谢谢!");
@@ -54,10 +54,10 @@ class Help
Db::commit(); Db::commit();
return show("助力成功!", SUCCESS_CODE, []); return show("助力成功!", SUCCESS_CODE, []);
}catch (\Exception $e) { // }catch (\Exception $e) {
Db::rollback(); // Db::rollback();
return show("助力失败!"); // return show("助力失败!");
} // }
} }
public function lists(){ public function lists(){