bug修改

This commit is contained in:
2026-01-22 11:49:16 +08:00
parent 10f7735af9
commit d636d64fe7
2 changed files with 1 additions and 12 deletions

View File

@@ -29,7 +29,6 @@ class UserWallet extends Model
if(!isset($uid)){
return ['code' => 301, 'msg' => '登录失效,请重新登录!', 'data' => null];
}
// $user_info = db::name('user_wallet')->where('user_id', $uid)->find();
$user_info['coin'] = db::name('user_wallet_coin')->where('user_id', $uid)->sum('coin');
$user_info['earnings'] = db::name('user_wallet_earnings')->where('user_id', $uid)->sum('earnings');
//获取云账号签约协议
@@ -179,7 +178,7 @@ class UserWallet extends Model
if(strlen($coin) - strlen(str_replace('.', '', $coin)) > 1){
return ['code' => 0, 'msg' => '请输入正确的金币数量', 'data' => null];
}
$user_info = db::name('user_wallet')->where('user_id',$uid)->find();
$user_info = db::name('user_wallet_coin')->where('user_id',$uid)->find();
if($user_info['coin'] < $coin){
return ['code' => 0, 'msg' => '金币数量不足', 'data' => null];
}

View File

@@ -142,12 +142,6 @@ class UserWithdrawal extends Model
Db::rollback();
return V($reslut['code'],$reslut['msg']);
}
//增加冻结余额
$reslut = Db::name('user_wallet')->where('user_id', $user_id)->setInc('frozen_earnings', $number);
if (!$reslut) {
Db::rollback();
return ['code' => 0, 'msg' => "请重试2", 'data' => null];
}
//修改提现余额
$surplus_earnings = Db::name('user_wallet_earnings')->where('user_id', $user_id)->value('earnings');
if ($surplus_earnings > 0) {
@@ -190,10 +184,6 @@ class UserWithdrawal extends Model
//钻石兑换人民币比例
$diamond_to_rmb_ratio = get_system_config_value('diamond_to_rmb_ratio');
$money = $withdraw_info['money'] * $diamond_to_rmb_ratio; //提现金额转换 人民币转为钻石
$result = db::name('user_wallet')->where('user_id', $withdraw_info['user_id'])->setDec('frozen_earnings', $money);
if (!$result) {
return ['code' => 0, 'msg' => '提现失败'];
}
//归还账户余额
$reslut = model('common/UserWallet')->change_user_money($withdraw_info['user_id'], $money, model('common/UserWallet')::MONEYTYPEARNINGS, model('common/UserWallet')::WITHDRAW_FAILURE,model('common/UserWallet')::ChangeTypeLable(model('common/UserWallet')::WITHDRAW_FAILURE));
if ($reslut['code'] != 1) {