房间热度卡开发-调试
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user