作者 jinglong
1 个管道 的构建 通过 耗费 8 秒

完善优惠券管理

... ... @@ -118,21 +118,21 @@ class Bcoupon extends Backend
//无门槛
if($params['coupon_type'] == 0){
//减少券,去掉满减金额,折扣字段,
unset($params['full_reduce']);
unset($params['discount']);
$params['full_reduce'] = 0;
$params['discount'] = 0;
}else{
//折扣券,去掉满减金额,减少金额字段,
unset($params['full_reduce']);
unset($params['reduce']);
$params['full_reduce'] = 0;
$params['reduce'] = 0;
}
}else{
//有门槛
if($params['coupon_type'] == 0){
//减少券,去掉折扣字段,
unset($params['discount']);
$params['discount'] = 0;
}else{
//折扣券,去掉减少金额字段,
unset($params['reduce']);
$params['reduce'] = 0;
}
}
$result = $this->model->allowField(true)->save($params);
... ... @@ -192,21 +192,21 @@ class Bcoupon extends Backend
//无门槛
if($params['coupon_type'] == 0){
//减少券,去掉满减金额,折扣字段,
unset($params['full_reduce']);
unset($params['discount']);
$params['full_reduce'] = 0;
$params['discount'] = 0;
}else{
//折扣券,去掉满减金额,减少金额字段,
unset($params['full_reduce']);
unset($params['reduce']);
$params['full_reduce'] = 0;
$params['reduce'] = 0;
}
}else{
//有门槛
if($params['coupon_type'] == 0){
//减少券,去掉折扣字段,
unset($params['discount']);
$params['discount'] = 0;
}else{
//折扣券,去掉减少金额字段,
unset($params['reduce']);
$params['reduce'] = 0;
}
}
$result = $row->allowField(true)->save($params);
... ...
... ... @@ -111,21 +111,21 @@ class Coupon extends Backend
//无门槛
if($params['coupon_type'] == 0){
//减少券,去掉满减金额,折扣字段,
unset($params['full_reduce']);
unset($params['discount']);
$params['full_reduce'] = 0;
$params['discount'] = 0;
}else{
//折扣券,去掉满减金额,减少金额字段,
unset($params['full_reduce']);
unset($params['reduce']);
$params['full_reduce'] = 0;
$params['reduce'] = 0;
}
}else{
//有门槛
if($params['coupon_type'] == 0){
//减少券,去掉折扣字段,
unset($params['discount']);
$params['discount'] = 0;
}else{
//折扣券,去掉减少金额字段,
unset($params['reduce']);
$params['reduce'] = 0;
}
}
$result = $this->model->allowField(true)->save($params);
... ... @@ -185,21 +185,21 @@ class Coupon extends Backend
//无门槛
if($params['coupon_type'] == 0){
//减少券,去掉满减金额,折扣字段,
unset($params['full_reduce']);
unset($params['discount']);
$params['full_reduce'] = 0;
$params['discount'] = 0;
}else{
//折扣券,去掉满减金额,减少金额字段,
unset($params['full_reduce']);
unset($params['reduce']);
$params['full_reduce'] = 0;
$params['reduce'] = 0;
}
}else{
//有门槛
if($params['coupon_type'] == 0){
//减少券,去掉折扣字段,
unset($params['discount']);
$params['discount'] = 0;
}else{
//折扣券,去掉减少金额字段,
unset($params['reduce']);
$params['reduce'] = 0;
}
}
$result = $row->allowField(true)->save($params);
... ...
... ... @@ -118,21 +118,21 @@ class Gcoupon extends Backend
//无门槛
if($params['coupon_type'] == 0){
//减少券,去掉满减金额,折扣字段,
unset($params['full_reduce']);
unset($params['discount']);
$params['full_reduce'] = 0;
$params['discount'] = 0;
}else{
//折扣券,去掉满减金额,减少金额字段,
unset($params['full_reduce']);
unset($params['reduce']);
$params['full_reduce'] = 0;
$params['reduce'] = 0;
}
}else{
//有门槛
if($params['coupon_type'] == 0){
//减少券,去掉折扣字段,
unset($params['discount']);
$params['discount'] = 0;
}else{
//折扣券,去掉减少金额字段,
unset($params['reduce']);
$params['reduce'] = 0;
}
}
$result = $this->model->allowField(true)->save($params);
... ... @@ -192,21 +192,21 @@ class Gcoupon extends Backend
//无门槛
if($params['coupon_type'] == 0){
//减少券,去掉满减金额,折扣字段,
unset($params['full_reduce']);
unset($params['discount']);
$params['full_reduce'] = 0;
$params['discount'] = 0;
}else{
//折扣券,去掉满减金额,减少金额字段,
unset($params['full_reduce']);
unset($params['reduce']);
$params['full_reduce'] = 0;
$params['reduce'] = 0;
}
}else{
//有门槛
if($params['coupon_type'] == 0){
//减少券,去掉折扣字段,
unset($params['discount']);
$params['discount'] = 0;
}else{
//折扣券,去掉减少金额字段,
unset($params['reduce']);
$params['reduce'] = 0;
}
}
$result = $row->allowField(true)->save($params);
... ...