diff --git a/app/channel/controller/ChannelProduct.php b/app/channel/controller/ChannelProduct.php index 3f0267b..a896e59 100644 --- a/app/channel/controller/ChannelProduct.php +++ b/app/channel/controller/ChannelProduct.php @@ -343,10 +343,13 @@ class ChannelProduct extends Controller $gid_rule[$v] = $input; } } + if ($gid_rule) { $gid_rule = json_encode($gid_rule); } + + $order_limit_rule = array(); foreach ($this->cash as $k => $v) { $input = input('cash_order_limit_' . $k); @@ -371,9 +374,13 @@ class ChannelProduct extends Controller $update['percent_type'] = $percent_type; if ($rule) { $update['rule'] = $rule; + }else{ + $update['rule'] = null; } if ($gid_rule) { $update['gid_rule'] = $gid_rule; + }else{ + $update['gid_rule'] = null; } $gid = input('gid'); if ($gid) { @@ -382,6 +389,8 @@ class ChannelProduct extends Controller if ($order_limit_rule) { $update['order_limit_rule'] = $order_limit_rule; + }else{ + $update['order_limit_rule'] = null; } $order_limit = input('order_limit'); $update['order_limit'] = $order_limit;