红包添加备注 和校验
This commit is contained in:
@@ -450,6 +450,10 @@ class RedpacketService
|
||||
return ['code' => 0, 'msg' => '用户ID不能为空', 'data' => null];
|
||||
}
|
||||
|
||||
if (empty($data['room_id'])) {
|
||||
return ['code' => 0, 'msg' => '房间ID不能为空', 'data' => null];
|
||||
}
|
||||
|
||||
if (!in_array($data['type'], [Redpacket::TYPE_NORMAL, Redpacket::TYPE_PASSWORD])) {
|
||||
return ['code' => 0, 'msg' => '红包类型错误', 'data' => null];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user