购物卡低于1000元不赠送抵扣券
This commit is contained in:
parent
1a5a44e3a6
commit
03364edc9d
@ -296,6 +296,7 @@ class ConfigRepository extends BaseRepository
|
|||||||
{
|
{
|
||||||
$config = $this->getWhere(['config_key' => 'upload_type']);
|
$config = $this->getWhere(['config_key' => 'upload_type']);
|
||||||
$rule = $this->getComponent($config, 0)->value(systemConfig('upload_type'));
|
$rule = $this->getComponent($config, 0)->value(systemConfig('upload_type'));
|
||||||
|
/** @var ConfigClassifyRepository $make */
|
||||||
$make = app()->make(ConfigClassifyRepository::class);
|
$make = app()->make(ConfigClassifyRepository::class);
|
||||||
$rule->control([
|
$rule->control([
|
||||||
[
|
[
|
||||||
|
@ -30,7 +30,7 @@ class OrderDeliveryListen implements ListenerInterface
|
|||||||
$couponUser = $repo->sendCoupon($coupon, $order['uid'], StoreCouponUserRepository::SEND_TYPE_BUY);
|
$couponUser = $repo->sendCoupon($coupon, $order['uid'], StoreCouponUserRepository::SEND_TYPE_BUY);
|
||||||
StoreCouponDetail::income($order, $couponUser['coupon_user_id'], $coupon->coupon_price, $coupon['title']);
|
StoreCouponDetail::income($order, $couponUser['coupon_user_id'], $coupon->coupon_price, $coupon['title']);
|
||||||
|
|
||||||
if (!empty($orderProduct->product->give_coupon_ids)) {
|
if (!empty($orderProduct->product->give_coupon_ids) && $order->total_price >= 1000) {
|
||||||
$giveCoupons = $repo->getGiveCoupon($orderProduct->product->give_coupon_ids);
|
$giveCoupons = $repo->getGiveCoupon($orderProduct->product->give_coupon_ids);
|
||||||
foreach ($giveCoupons as $giveCoupon) {
|
foreach ($giveCoupons as $giveCoupon) {
|
||||||
if ($giveCoupon['type'] != StoreCouponRepository::TYPE_STORE_COUPON) {
|
if ($giveCoupon['type'] != StoreCouponRepository::TYPE_STORE_COUPON) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user