主持人收益范围规范

This commit is contained in:
2025-09-26 11:56:46 +08:00
parent 040aa38659
commit bfbc9daa33

View File

@@ -1596,6 +1596,9 @@ class Room extends Model
if(!$is_host){
return ['code' => 0, 'msg' => '用户不是主持人,不能设置收益', 'data' => null];
}
if($profit < 0 || $profit > 100){
return ['code' => 0, 'msg' => '请输入正确的比例 0-100', 'data' => null];
}
$res = db::name('vs_room_host')->where(['room_id' => $room_id,'user_id' => $user_id,'type' => 1,'delete_time' => null])
->update(['ratio' => $profit]);
if(!$res){