修复:豆豆积分 - 持有明细中 - 如果不存在冻结中的积分,则会进行错误抛出

This commit is contained in:
wuhui_zzw 2024-01-29 12:58:33 +08:00
parent 3a583c6536
commit b5c164a2b7
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class LegumesLogRepository extends BaseRepository{
$freeze = array_column($freeze,'total_get_integral','uid');
foreach($list as &$singleInfo){
// 总冻结积分
$singleInfo['total_freeze_integral'] = $freeze[$singleInfo['uid']];
$singleInfo['total_freeze_integral'] = $freeze[$singleInfo['uid']] ?? 0;
// 可使用积分
$reduce = (float)sprintf("%.2f",$singleInfo['total_freeze_integral'] + $singleInfo['total_use_integral']);// 冻结 + 已使用积分
$singleInfo['surplus_use_integral'] = (float)sprintf("%.2f",$singleInfo['total_get_integral'] - $reduce);