红包第一次修改
This commit is contained in:
@@ -45,7 +45,7 @@ class Redpacket extends Model
|
||||
public function createRedpacket($data)
|
||||
{
|
||||
Db::startTrans();
|
||||
// try {
|
||||
try {
|
||||
// 验证用户余额
|
||||
$wallet = Db::name('user_wallet')->where('user_id', $data['user_id'])->find();
|
||||
|
||||
@@ -121,11 +121,11 @@ class Redpacket extends Model
|
||||
// return $redpacketId;
|
||||
return V(1, '发红包成功', $redpacketId);
|
||||
|
||||
// } catch (\Exception $e) {
|
||||
// Db::rollback();
|
||||
// return V(0, $e);
|
||||
//// throw $e;
|
||||
// }
|
||||
} catch (\Exception $e) {
|
||||
Db::rollback();
|
||||
return V(0, $e);
|
||||
// throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user