setter
parent
ec8a7d5df1
commit
b32a6edb78
|
@ -946,8 +946,7 @@ class Coupon extends Base
|
||||||
$validate = new CouponRelease();
|
$validate = new CouponRelease();
|
||||||
|
|
||||||
//普通商家要验证扣除金额
|
//普通商家要验证扣除金额
|
||||||
|
if (!$validate->scene(($account->business["model"] == BusinessModel::model_ordinary )? "ordinary" : "")->check($couponMain)) {
|
||||||
if (!$validate->scene($account->business["model"] == BusinessModel::model_ordinary ? "ordinary" : "")->check($couponMain)) {
|
|
||||||
return $this->json(4001, $validate->getError());
|
return $this->json(4001, $validate->getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,11 +188,10 @@ class Coupon extends Base
|
||||||
}
|
}
|
||||||
$validate = new CouponRelease();
|
$validate = new CouponRelease();
|
||||||
//普通商家要验证扣除金额
|
//普通商家要验证扣除金额
|
||||||
if (!$validate->scene(($business["model"] == BusinessModel::model_ordinary)?"ordinary":"")->check($data)) {
|
if (!$validate->scene(($business["model"] == BusinessModel::model_ordinary) ? "ordinary" : "")->check($data)) {
|
||||||
return $this->json(4001, $validate->getError());
|
return $this->json(4001, $validate->getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//$usingRuleValidate = new CouponUsingRule();
|
//$usingRuleValidate = new CouponUsingRule();
|
||||||
//if (!$usingRuleValidate->check($usingRule)) {
|
//if (!$usingRuleValidate->check($usingRule)) {
|
||||||
// return $this->json(4001, $usingRuleValidate->getError());
|
// return $this->json(4001, $usingRuleValidate->getError());
|
||||||
|
|
|
@ -48,7 +48,8 @@ class CouponRelease extends Validate
|
||||||
// edit 验证场景定义
|
// edit 验证场景定义
|
||||||
public function sceneOrdinary()
|
public function sceneOrdinary()
|
||||||
{
|
{
|
||||||
return $this->append('checkDeductionMoney');
|
|
||||||
|
return $this->append("deduction_money",'checkDeductionMoney');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkEndTime($value, $rule, $data = [])
|
protected function checkEndTime($value, $rule, $data = [])
|
||||||
|
|
Loading…
Reference in New Issue