|
@@ -1896,9 +1896,8 @@ class Party extends Api
|
|
|
$giftInfo['is_baobi'] = 0;
|
|
|
|
|
|
$giftValue = $giftInfo["value"] * $number;
|
|
|
- $getValue = $giftValue;
|
|
|
|
|
|
- $giftCountValue = $giftInfo["value"] * $number * $userCount;
|
|
|
+ $giftCountValue = $giftValue * $userCount;
|
|
|
} else {
|
|
|
|
|
|
|
|
@@ -1909,10 +1908,9 @@ class Party extends Api
|
|
|
}
|
|
|
|
|
|
$giftValue = $giftInfo["value"] * $number;
|
|
|
- $getValue = $giftValue;
|
|
|
|
|
|
|
|
|
- $giftCountValue = $giftInfo["value"] * $number * $userCount;
|
|
|
+ $giftCountValue = $giftValue * $userCount;
|
|
|
$user_jewel = model('wallet')->getWallet($this->auth->id,'jewel');
|
|
|
if($user_jewel < $giftCountValue){
|
|
|
$this->error("您的金币余额不足!");
|
|
@@ -1920,8 +1918,6 @@ class Party extends Api
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- $hotValue = $getValue;
|
|
|
|
|
|
|
|
|
$partyInfo = null;
|
|
@@ -1949,14 +1945,7 @@ class Party extends Api
|
|
|
try {
|
|
|
|
|
|
|
|
|
-
|
|
|
- $day = date("Ymd");
|
|
|
-
|
|
|
- $weekday = $this->firstOfWeek(date("Y-m-d H:i:s"));
|
|
|
-
|
|
|
- $monthday = date("Ym01");
|
|
|
|
|
|
- $allVal = 0;
|
|
|
$i = 0;
|
|
|
|
|
|
|
|
@@ -2046,11 +2035,11 @@ class Party extends Api
|
|
|
$i++;
|
|
|
if($party_id > 0) {
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -2059,56 +2048,22 @@ class Party extends Api
|
|
|
|
|
|
|
|
|
|
|
|
- $this->redis->zIncrBy("hourCharm_".$party_id, $hotValue, $user_id);
|
|
|
+ $this->redis->zIncrBy("hourCharm_".$party_id, $giftValue, $user_id);
|
|
|
|
|
|
|
|
|
- $this->redis->zIncrBy("hourWealth_".$party_id, $hotValue, $userauthid);
|
|
|
+ $this->redis->zIncrBy("hourWealth_".$party_id, $giftValue, $userauthid);
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $data = [];
|
|
|
- $data["user_id"] = $user_id;
|
|
|
- $data["party_id"] = $party_id;
|
|
|
- $data["charm"] = $hotValue;
|
|
|
- $data["createtime"] = time();
|
|
|
- \app\common\model\UserCharmRank::insert($data);
|
|
|
-
|
|
|
- }*/
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
- $getempirical = $getempirical * $hotValue;
|
|
|
-
|
|
|
- $noble = \app\common\model\User::getUserNoble($this->auth->id);
|
|
|
- if(isset($noble["noble_on"]) && $noble["noble_on"] == 1) {
|
|
|
- $getempirical = $getempirical + $getempirical * ($noble["explain"]/100);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- $res = \app\common\model\User::addEmpirical($this->auth->id,$getempirical);
|
|
|
- if ($res){
|
|
|
- $this->auth->level = $res->level;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
|
|
|
$res_charm = \app\common\model\User::add_charm_level($user_id,$giftValue);
|
|
|
-
|
|
|
-
|
|
|
- \app\common\model\TaskLog::tofinish($this->auth->id,"OBHqCX4g",$number);
|
|
|
*/
|
|
|
|
|
|
\app\common\model\Message::addMessage($user_id,"礼物通知","收到 ".$this->auth->nickname." 赠送的".$giftInfo["name"]." x".$number." 价值 ".$giftValue ." 金币");
|
|
|
|
|
|
-
|
|
|
- $res_wealth = \app\common\model\User::add_wealth_level($this->auth->id,$giftValue);
|
|
|
-
|
|
|
- $allVal = $allVal + $hotValue;
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -2132,22 +2087,9 @@ class Party extends Api
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $data = [];
|
|
|
- $data["party_id"] = $party_id;
|
|
|
- $data["hot"] = $allVal;
|
|
|
- $data["createtime"] = time();
|
|
|
- \app\common\model\PartyHot::insert($data);
|
|
|
- }*/
|
|
|
|
|
|
|
|
|
-
|
|
|
+ $res_wealth = \app\common\model\User::add_wealth_level($this->auth->id,$giftCountValue);
|
|
|
|
|
|
|
|
|
$this->getPartyUserTop($partyInfo, $room_type);
|
|
@@ -2342,12 +2284,12 @@ class Party extends Api
|
|
|
|
|
|
* 更新派对信息(热度等)
|
|
|
*/
|
|
|
- private function updatePartyHot($partyInfo,$hotValue,$room_type) {
|
|
|
+ private function updatePartyHot($partyInfo,$giftValue,$room_type) {
|
|
|
|
|
|
- if(!$partyInfo) return $hotValue;
|
|
|
+ if(!$partyInfo) return $giftValue;
|
|
|
|
|
|
$party_hot = $partyInfo->party_hot > 0 ? $partyInfo->party_hot:0;
|
|
|
- $party_hot_value = $party_hot + $hotValue;
|
|
|
+ $party_hot_value = $party_hot + $giftValue;
|
|
|
$party_hot_value = $party_hot_value > 0 ? $party_hot_value : 0;
|
|
|
if($party_hot_value != $party_hot) {
|
|
|
|