|
@@ -306,8 +306,7 @@ class Goods extends BaseModel
|
|
|
if ($enableExchange){
|
|
if ($enableExchange){
|
|
|
$user = UserService::getCurrentLoginUser();
|
|
$user = UserService::getCurrentLoginUser();
|
|
|
$rate = SettingModel::getItem('points_rate')['points_2_money'];
|
|
$rate = SettingModel::getItem('points_rate')['points_2_money'];
|
|
|
- //dd($rate);
|
|
|
|
|
- $pointsToMoney = bcdiv(strval($user['accumulate_points']), $rate, 2);
|
|
|
|
|
|
|
+ $pointsToMoney = bcdiv(strval($user['accumulate_points'] ?? '0'), $rate, 2);
|
|
|
$list = $list->where('goods_price_min','<',$pointsToMoney);
|
|
$list = $list->where('goods_price_min','<',$pointsToMoney);
|
|
|
}
|
|
}
|
|
|
$list = $list->field($this->getAliasFields($this->name, ['content']))
|
|
$list = $list->field($this->getAliasFields($this->name, ['content']))
|