红包第一次修改

This commit is contained in:
2025-10-11 14:54:43 +08:00
parent 204c19ff6d
commit 641368f78e

View File

@@ -45,7 +45,7 @@ class Redpacket extends Model
public function createRedpacket($data) public function createRedpacket($data)
{ {
Db::startTrans(); Db::startTrans();
// try { try {
// 验证用户余额 // 验证用户余额
$wallet = Db::name('user_wallet')->where('user_id', $data['user_id'])->find(); $wallet = Db::name('user_wallet')->where('user_id', $data['user_id'])->find();
@@ -121,11 +121,11 @@ class Redpacket extends Model
// return $redpacketId; // return $redpacketId;
return V(1, '发红包成功', $redpacketId); return V(1, '发红包成功', $redpacketId);
// } catch (\Exception $e) { } catch (\Exception $e) {
// Db::rollback(); Db::rollback();
// return V(0, $e); return V(0, $e);
//// throw $e; // throw $e;
// } }
} }
/** /**