1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- defined('InShopNC') or exit('Access Invalid!');
- class refill_exceptionModel extends Model
- {
- public function __construct()
- {
- parent::__construct('refill_exception');
- }
- public function getExceptionList($condition, $pagesize = '',$total = 0, $field = '*', $order = 'add_time desc', $limit = '', $master = false)
- {
- $list = $this->field($field)->where($condition)->page($pagesize,$total)->order($order)->limit($limit)->master($master)->select();
- if (empty($list)) return [];
- return $list;
- }
- public function setHandled($exc_id, $update)
- {
- $update['except_state'] = 1;
- return $this->where(['except_id' => $exc_id])->update($update);
- }
- public function add_except($datas)
- {
- return $this->insert($datas);
- }
- public function exist_order($order_sn)
- {
- $item = $this->field('*')->where(['order_sn' => $order_sn])->find();
- return !empty($item);
- }
- }
|