房间热度卡开发-调试

This commit is contained in:
2026-01-26 09:51:11 +08:00
parent 0b3159f22e
commit 4d991bc6cd
2 changed files with 6 additions and 6 deletions

View File

@@ -597,7 +597,7 @@ class Decorate extends Model
return ['code' => 0, 'msg' => '房间热度卡不存在', 'data' => null];
}
if(in_array($info['type'],array_keys($this->SpecialType))){
if ($info['num']-1 < 0) {
if ($info['num']-$num < 0) {
return ['code' => 0, 'msg' => '无可用房间热度卡', 'data' => null];
}
}
@@ -624,7 +624,7 @@ class Decorate extends Model
$reslut = Db::name('vs_user_decorate')->where($map)->update($data);
if (!$reslut) {
Db::rollback();
return ['code' => 0, 'msg' => "设置失败", 'data' => null];
return ['code' => 0, 'msg' => "使用失败", 'data' => null];
}
if (empty($room_id)) {
@@ -669,7 +669,7 @@ class Decorate extends Model
$result = Db::name('vs_user_decorate')->where($map)->update($data);
if (!$result) {
Db::rollback();
return ['code' => 0, 'msg' => "设置失败", 'data' => null];
return ['code' => 0, 'msg' => "使用失败", 'data' => null];
}
if (empty($room_id)) {
Db::rollback();
@@ -683,7 +683,7 @@ class Decorate extends Model
$increase_hot_value_all = 0;
foreach ($info as $key => $value) {
$increase_hot_value = db::name('vs_decorate')->where(['did' => $value['did']])->value('ext_value') ?? 0;
$increase_hot_value = $increase_hot_value * $num;
$increase_hot_value = $increase_hot_value * $value['num'];
if ($room_info['today_hot_value'] <= $increase_hot_value) {
db::name('vs_room')->where(['id' => $room_id])->update(['today_hot_value' => 0]);
} else {