Esempio n. 1
0
 function check()
 {
     //是否为空
     RequestCheckUtil::checkEmpty($this->getSearchKey(), "field");
     //页数
     RequestCheckUtil::checkMaxValue($this->getPage(), ceil(400 / $this->getPerpage()), "page");
     //翻页数量
     RequestCheckUtil::checkMaxValue($this->getPerpage(), 40, "perpage");
     //每页显示的数量检测
     RequestCheckUtil::checkMinValue($this->getPerpage(), 0, "perpage");
     //每页显示的数量检测
     //折扣价检测
     RequestCheckUtil::checkMinValue($this->getStartPromotion(), 0, "start_promotion");
     RequestCheckUtil::checkMaxValue($this->getStartPromotion(), $this->getEndPromotion(), "promotion");
     //检测折扣价下限是否大于上限		}
     //卖家信用检测
     RequestCheckUtil::checkMinValue($this->getStartCredit(), 0, "start_credit");
     RequestCheckUtil::checkMaxValue($this->getEndCredit(), 20, "end_credit");
     RequestCheckUtil::checkMaxValue($this->getStartCredit(), $this->getEndCredit(), "credit");
     //监测卖家信用等级是否下限大于上限
     //佣金比例检测
     RequestCheckUtil::checkMinValue($this->getStartCommissionRate(), 0, "start_commission_rate");
     RequestCheckUtil::checkMaxValue($this->getStartCommissionRate(), 10000, "start_commission_rate");
     RequestCheckUtil::checkMaxValue($this->getStartCommissionRate(), $this->getEndCommissionRate(), "start_commission_rate");
     //监测卖家信用等级是否下限大于上限
     //推广量检测
     RequestCheckUtil::checkMinValue($this->getStartCommissionVolume(), 0, "start_commission_volume");
     RequestCheckUtil::checkMaxValue($this->getStartCommissionVolume(), $this->getEndCommissionVolume(), "commission_volume");
     //检测折扣价下限是否大于上限
     //推广类型
     RequestCheckUtil::checkValueWithIn($this->getItemType(), array(1, 2), "item_type");
     //排序方式
     RequestCheckUtil::checkValueWithIn($this->getSort(), self::$allowSort, "sort");
 }