From 74fa6796a134aac470795acb1ab07558b2bd1a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 26 Nov 2025 17:34:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=B6=E6=97=8F=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/GiveGift.php | 4 ++-- application/api/model/Sign.php | 2 +- application/api/model/UserWallet.php | 4 ++-- application/common/model/UserWallet.php | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/application/api/model/GiveGift.php b/application/api/model/GiveGift.php index f0a958b..af7e134 100644 --- a/application/api/model/GiveGift.php +++ b/application/api/model/GiveGift.php @@ -908,7 +908,7 @@ class GiveGift extends Model // 1.系统调节 2.充值 3.提现 4.金币转增(送出) 5.每日任务奖励 6.充值返利 7.购买装扮 // 8.礼盒奖励 9.房间补贴 10.购买礼物 11.收礼增加收益 12.工会补贴 13.转赠金币(接收) 14.收益兑换 // 15.首充 16.天降好礼充值 17.退出工会扣款 18.房主收益 19.主持人收益 20.抢头条 21.公会长收益,22.提现驳回或提现失败返还,23.财富等级奖励金币领取,24.删除关系扣金币, - //50-签约,51-签约失败退回,52-首次被签约收入 + //50-签约,51-签约失败退回,52-首次被签约收入,54-叛徒补偿 if(in_array($change_type,[1,2,3,4,5,6,7,8,12,13,14,15,16,17,20])){ $room_ids = 0; }else{ @@ -951,7 +951,7 @@ class GiveGift extends Model } }elseif ($money_type == 2){//2钻石 //增加用户钻石类型 - $in_types = [9,11,12,18,19,21,52]; + $in_types = [9,11,12,18,19,21,52,54]; //减少用户钻石类型 $out_types = [3,14]; if(in_array($change_type,$in_types)){ diff --git a/application/api/model/Sign.php b/application/api/model/Sign.php index 3326b40..cbbf89b 100644 --- a/application/api/model/Sign.php +++ b/application/api/model/Sign.php @@ -273,7 +273,7 @@ class Sign extends Model } }elseif ($sign_user_type == 2){ //签过没过期 给上任签约者 - $result4 = model('api/GiveGift') -> change_user_cion_or_earnings_log($before_sign_user,$shouyizs,$room_id,2,52,'被首次签约成功收入'); + $result4 = model('api/GiveGift') -> change_user_cion_or_earnings_log($before_sign_user,$shouyizs,$room_id,2,54,'解约补偿'); if(!$result4){ db::rollback(); return ['code' => 0, 'msg' => '网络错误,请重试', 'data' => null]; diff --git a/application/api/model/UserWallet.php b/application/api/model/UserWallet.php index cc6011d..4c38115 100644 --- a/application/api/model/UserWallet.php +++ b/application/api/model/UserWallet.php @@ -51,7 +51,7 @@ class UserWallet extends Model // 8.礼盒奖励 9.房间补贴 10.购买礼物 11.收礼增加收益 12.工会补贴 13.转赠金币(接收) 14.收益兑换 // 15.首充 16.天降好礼充值 17.退出工会扣款 18.房主收益 19.主持人收益,20.发布头条扣除余额,21.公会长收益,22.提现驳回或提现失败返还,23.财富等级奖励金币领取,24.删除关系扣金币 //27.小时榜获得,28-新人充值好礼,32-发红包(金币),29-发红包(钻石),30-抢红包(金币),31-抢红包(钻石) 33-红包剩余退回(金币),34-红包剩余退回(钻石) - //50-签约 51-签约失败退回,52-首次被签约收入 + //50-签约 51-签约失败退回,52-首次被签约收入 53-师徒签到 54-叛徒补偿 if($gift_type == 1){ //1金币,2收益(钻石) if($in_out_type == 1){//1收入 $in_out_types = [2,5,6,8,13,14,15,16,22,23,26,27,30,28,33,51]; @@ -60,7 +60,7 @@ class UserWallet extends Model } }elseif($gift_type == 2){ //1金币,2收益(钻石) if($in_out_type == 1){//1收入 - $in_out_types = [6,9,11,12,18,19,21,22,31,28,34,52]; + $in_out_types = [6,9,11,12,18,19,21,22,31,28,34,52,53,54]; }elseif($in_out_type == 2){//2支出 $in_out_types = [3,14,29]; } diff --git a/application/common/model/UserWallet.php b/application/common/model/UserWallet.php index fe313fe..12d57f1 100644 --- a/application/common/model/UserWallet.php +++ b/application/common/model/UserWallet.php @@ -100,6 +100,8 @@ class UserWallet extends Model const FIRST_SIGN_INCOME = 52; //签约师傅每日返还 const SIGN_MASTER_DAILY_RETURN = 53; + //叛徒补偿 + const BELIEVER_COMPENSATION = 54; //金币支出类型数组 @@ -178,7 +180,8 @@ class UserWallet extends Model self::SIGN => '签约支出', self::SIGN_FAILURE => '签约失败退回', self::FIRST_SIGN_INCOME => '首次被签约收入', - self::SIGN_MASTER_DAILY_RETURN => '签约师傅每日返还' + self::SIGN_MASTER_DAILY_RETURN => '签约师傅每日返还', + self::BELIEVER_COMPENSATION => '解约补偿' ]; if($type){ return $status[$type] ?? ''; From c5c0819374f42857816722795b820ffcea7bdef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 26 Nov 2025 17:37:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BA=AB=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/api/model/User.php b/application/api/model/User.php index bdf230e..8470529 100644 --- a/application/api/model/User.php +++ b/application/api/model/User.php @@ -342,7 +342,7 @@ class User extends Model public function get_user_home($from_uid,$uid) { $user_info = db::name('user')->alias('u')->join('user_data ud', 'u.id = ud.user_id') - ->field('u.id as user_id,u.nickname,u.user_code,u.avatar,u.sex,u.birthday,u.profile,ud.tag_id,ud.home_bgimages,u.is_online') + ->field('u.market_value,u.id as user_id,u.nickname,u.user_code,u.avatar,u.sex,u.birthday,u.profile,ud.tag_id,ud.home_bgimages,u.is_online') ->where(['u.id' => $uid,'u.status' => ['<>',0]])->find(); if(!$user_info){ return ['code' => 0, 'msg' => '用户不存在或已注销', 'data' => null]; From ad6b12bc4d93106d9a3a6e18abc3fcd0a763e55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 26 Nov 2025 17:52:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=BA=AB=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/api/model/User.php b/application/api/model/User.php index 8470529..79c9c3a 100644 --- a/application/api/model/User.php +++ b/application/api/model/User.php @@ -114,7 +114,7 @@ class User extends Model public function get_me($uid) { $user_info = db::name('user') - ->field('id as user_id,nickname,user_code,avatar,sex,mobile') + ->field('id as user_id,nickname,user_code,avatar,sex,mobile,market_value') ->where('id', $uid)->find(); if (empty($user_info)) { return ['code' => 0, 'msg' => '用户不存在', 'data' => null];