测试:bug处理

This commit is contained in:
2026-01-13 15:47:19 +08:00
parent a6ac190358
commit 4d528e0e72
3 changed files with 25 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
namespace app\adminapi\controller;
ini_set('memory_limit', '512M'); // 临时增加到512MB
use app\common\controller\adminApi;
use app\common\library\GiftTableManager;
use think\Db;
use think\Log;
@@ -103,9 +104,17 @@ class GiveGift extends adminApi
// $count = db::name('vs_give_gift')->where($where)->count();
$earning_list = [];
if(!empty($where)){
$tables = GiftTableManager::getTablesByTimeRange(
strtotime($start_time),
strtotime($end_time)
);
if(empty($tables)){
$tables[0] = "fa_vs_give_gift";
}
$table_name = substr($tables[0], 3);//截取可查询的表名
$earning_list = db::name('vs_give_gift_ratio_log')
->alias('egl')
->join('vs_give_gift gg', 'egl.give_gift_id = gg.id')
->join($table_name.' gg', 'egl.give_gift_id = gg.id')
->where($gwhere) // 替换为实际的筛选条件
->field('egl.app_earning,egl.gift_user_earning,egl.room_owner_earning')
->select();

View File

@@ -304,6 +304,17 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
if (in_array($user_id, $gift_user_ids)) {
return ['code' => 0, 'msg' => "收礼人不能包含自己", 'data' => null];
}
foreach ($gift_user_ids as $gift_user_id){
//查询是否实名认证
$is_real = model('UserData')->real_name_info($gift_user_id);
if($is_real['code']==0){
return ['code' => 0, 'msg' => '收礼用户中有未实名,暂不支持收礼', 'data' => null];
}else{
if($is_real['data']['is_real'] !=1){
return ['code' => 0, 'msg' => '收礼用户中有未实名,暂不支持收礼', 'data' => null];
}
}
}
// 验证用户ID
if (empty($user_id)) {
return ['code' => 0, 'msg' => '用户ID不能为空', 'data' => null];

View File

@@ -60,9 +60,10 @@ class User extends Model
}
if(empty($field) || in_array('user_wallet',$field)) {
//钱包信息
$user_wallet = db::name('user_wallet')->where(['user_id' => $uid])->find();
$user_info['coin'] = isset($user_wallet['coin']) ? $user_wallet['coin'] : 0;
$user_info['earnings'] = isset($user_wallet['earnings']) ? $user_wallet['earnings'] : 0;
$user_wallet_coin = db::name('user_wallet_coin')->where(['user_id' => $uid])->find();
$user_wallet_earnings = db::name('user_wallet_earnings')->where(['user_id' => $uid])->find();
$user_info['coin'] = isset($user_wallet_coin['coin']) ? $user_wallet_coin['coin'] : 0;
$user_info['earnings'] = isset($user_wallet_earnings['earnings']) ? $user_wallet_earnings['earnings'] : 0;
}
if(empty($field) || in_array('user_decorate',$field)) {
//装扮