1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- defined('InShopNC') or exit('Access Invalid!');
- class refill_exception_type
- {
- const EUnKnown = 0; //不确定的
- const EOfficialSN = 1; //错误的流水号,过短,过长,以及风险流水号
- const ERefundOrder = 2; //检测出来的,统付返销
- const EqualOfficialSN = 3; // 相同流水号
- }
- 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->table('refill_exception,refill_order')
- ->field($field)->where($condition)
- ->join('inner')->on('refill_exception.order_id=refill_order.order_id')
- ->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);
- }
- }
|