Skip to content

Commit

Permalink
修复满额包邮运费不扣减问题
Browse files Browse the repository at this point in the history
1、满额包邮设置的是不包邮地区
代码段:in_array($address['city_id'], StringHelper::parseAttr($fullMail['no_mail_city_ids'])
验证的逻辑结果是:不包邮地区才会扣减运费。因此需要取反验证
修复后:!in_array($address['city_id'], StringHelper::parseAttr($fullMail['no_mail_city_ids'])
  • Loading branch information
tensHugo authored May 23, 2020
1 parent 894f0ff commit 2e3a203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/marketing/FullMailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public function postage($product_money, $address)
if (
$fullMail['is_open'] == StatusEnum::ENABLED &&
$product_money >= $fullMail['full_mail_money'] &&
in_array($address['city_id'], StringHelper::parseAttr($fullMail['no_mail_city_ids']))
!in_array($address['city_id'], StringHelper::parseAttr($fullMail['no_mail_city_ids']))
) {
return $fullMail;
}

return false;
}
}
}

0 comments on commit 2e3a203

Please sign in to comment.