|
|
@@ -506,11 +506,18 @@ class HttpServerOnlySet
|
|
|
$trade_desc = $type == 1 ? '单式投注订单回款' : '串式投注订单回款';
|
|
|
$reason = $type == 1 ? '单式投注订单回款' : '串式投注订单回款';
|
|
|
|
|
|
+ //用于记录用户余额的数据
|
|
|
+ if (!isset($this->PDatas['account_mash'][$buy_identity])) {
|
|
|
+ $this->PDatas['account_mash'][$buy_identity] = $this->PDatas['account_indentity_map_array'][$buy_identity]->cash;
|
|
|
+ }
|
|
|
+ $this->PDatas['account_mash'][$buy_identity] = $this->PDatas['account_mash'][$buy_identity] + $returnMoney;
|
|
|
+ $user_money_cash = $this->PDatas['account_mash'][$buy_identity];
|
|
|
+
|
|
|
if (isset($this->PDatas['money_detail_array'][$order_id])) {
|
|
|
- $sql = "update money_details set money=$returnMoney where account_identity='$account_identity' and trade_id='$order_id' and trade_type=4 ";
|
|
|
+ $sql = "update money_details set money=$returnMoney,money_cash=$user_money_cash where account_identity='$account_identity' and trade_id='$order_id' and trade_type=4 ";
|
|
|
} else {
|
|
|
$sql = "insert into money_details(info_identity,trade_id,account_name,account_identity,money,money_time,money_type,money_cash,trade_type,trade_desc,reason,sysetem_user,status) values(";
|
|
|
- $sql .= "'$info_identity','$order_id','$account','$account_identity',$returnMoney,'$money_time',1,0,4,'$trade_desc','$reason','系统',1)";
|
|
|
+ $sql .= "'$info_identity','$order_id','$account','$account_identity',$returnMoney,'$money_time',1,$user_money_cash,4,'$trade_desc','$reason','系统',1)";
|
|
|
}
|
|
|
|
|
|
$this->PushSqlToArray($sql);
|
|
|
@@ -625,7 +632,7 @@ class HttpServerOnlySet
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $ret = DB::table('money_details')->whereIn('account_identity', $userindentys)->where([['money_time', '>=', date("Y-m-d", time() - 86400 * 60) . ' 00:00:00'], ['trade_type', '=', 4]])->whereIn('trade_id', $order_ids)->get();
|
|
|
+ $ret = DB::table('money_details')->whereIn('account_identity', $userindentys)->where([['money_time', '>=', date("Y-m-d", time() - 86400 * 90) . ' 00:00:00'], ['trade_type', '=', 4]])->whereIn('trade_id', $order_ids)->get();
|
|
|
if ($ret) {
|
|
|
foreach ($ret as $val) {
|
|
|
$this->PDatas['money_detail_array'][$val->trade_id] = $val;
|