|  | @@ -1527,7 +1527,7 @@ class Party extends Common
 | 
	
		
			
				|  |  |          $user_id_arr = explode(",",$user_ids);
 | 
	
		
			
				|  |  |          $userCount = count($user_id_arr);
 | 
	
		
			
				|  |  |          $userauthid = $this->auth->id;
 | 
	
		
			
				|  |  | -        $soundCoinRate = config("site.giftCoin"); // 声币兑换比例
 | 
	
		
			
				|  |  | +        //$soundCoinRate = config("site.giftCoin"); // 声币兑换比例
 | 
	
		
			
				|  |  |          $money_to_jewel = config('site.money_to_jewel') ?: 10; //余额兑换钻石
 | 
	
		
			
				|  |  |          $userModel = new \app\common\model\User();
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1584,7 +1584,7 @@ class Party extends Common
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          $hotValue = $getValue;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        $getValue = round($getValue * ($soundCoinRate/100));
 | 
	
		
			
				|  |  | +        //$getValue = round($getValue * ($soundCoinRate/100));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 转换统计
 | 
	
		
			
				|  |  |          $progetValue = $hotValue - $getValue;
 | 
	
	
		
			
				|  | @@ -1664,12 +1664,14 @@ class Party extends Common
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      $res2 = true;
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  | +                    $res2 = true;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                      // 扣除当前用户钻石余额
 | 
	
		
			
				|  |  | -                    $where = [];
 | 
	
		
			
				|  |  | -                    $where["id"] = $userauthid;
 | 
	
		
			
				|  |  | -                    $res1 = $userModel->where($where)->setDec("jewel", $giftValue);
 | 
	
		
			
				|  |  | -                    // 添加当前用户钻石流水记录
 | 
	
		
			
				|  |  | -                    $res2 = $userjewellogModel->addUserJewelLog($userauthid, $giftValue, "-", $userInfo["jewel"], "赠送礼物:'" . $giftInfo["name"] . "',扣除" . $giftValue . "钻石!", 3);
 | 
	
		
			
				|  |  | +                    $rs_wallet = model('wallet')->lockChangeAccountRemain($userauthid, $giftValue, '-', $userInfo["jewel"], "赠送礼物:'" . $giftInfo["name"] . "',扣除" . $giftValue . "钻石!", 3,'jewel');
 | 
	
		
			
				|  |  | +                    if($rs_wallet['status'] == false){
 | 
	
		
			
				|  |  | +                        $this->error($rs_wallet['msg']);
 | 
	
		
			
				|  |  | +                        Db::rollback();
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  $giftuserpartyModel = new \app\common\model\GiftUserParty();
 |