优化:钱包表更换。
This commit is contained in:
@@ -32,7 +32,8 @@ class AppTodayStatistical
|
||||
$time = strtotime(date('Y-m-d'));
|
||||
$stime = strtotime(date('Y-m-d'));
|
||||
$etime = strtotime(date('Y-m-d 23:59:59'));
|
||||
$user_list = Db::name('user_wallet')->select();
|
||||
// $user_list = Db::name('user_wallet')->select();
|
||||
$user_list = db::name('user_wallet_coin')->select();
|
||||
foreach ($user_list as $k=>$v){
|
||||
$gift_pack = Db::name('vs_user_gift_pack')->field('gid,num')->where(['user_id'=>$v['user_id'],'is_tester'=>1])->select();
|
||||
$gift_pack_price = 0;
|
||||
@@ -71,7 +72,7 @@ class AppTodayStatistical
|
||||
$data = [
|
||||
'user_id'=>$v['user_id']??0,
|
||||
'coin'=>$v['coin']??0,
|
||||
'earnings'=>$v['earnings']??0,
|
||||
'earnings'=> db::name('user_wallet_earnings')->where('user_id', $v['user_id'])->value('earnings')??0,
|
||||
'gift_pack_price'=>$gift_pack_price??0,
|
||||
'room_flow_price'=>$transaction??0,
|
||||
'guild_flow_price'=>$guild_flow_price??0,
|
||||
|
||||
@@ -181,12 +181,12 @@ class PerformPerSecond
|
||||
// 'personal_tax_rate' => $result['personal_tax_rate'] ?? 0,
|
||||
'received_tax_amount' => $result['data']['received_tax_amount'] ?? 0,
|
||||
]);
|
||||
if($up_result){
|
||||
//扣除冻结金额
|
||||
$diamond_to_rmb_ratio = get_system_config_value('diamond_to_rmb_ratio');
|
||||
$money = $value['money'] * $diamond_to_rmb_ratio; //提现金额转换 人民币转为钻石
|
||||
$result = db::name('user_wallet')->where('user_id', $value['user_id'])->setDec('frozen_earnings', $money);
|
||||
}
|
||||
// if($up_result){
|
||||
// //扣除冻结金额
|
||||
// $diamond_to_rmb_ratio = get_system_config_value('diamond_to_rmb_ratio');
|
||||
// $money = $value['money'] * $diamond_to_rmb_ratio; //提现金额转换 人民币转为钻石
|
||||
// $result = db::name('user_wallet')->where('user_id', $value['user_id'])->setDec('frozen_earnings', $money);
|
||||
// }
|
||||
}else{
|
||||
db::name('vs_user_withdrawal')->where('order_sn',$value['order_sn'])->update([
|
||||
'status' => 5,
|
||||
|
||||
Reference in New Issue
Block a user