红包第一次修改
This commit is contained in:
@@ -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;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user