store_order_count($this->store_id()); return [config::PROCESS_ABILITY >= $count, '',false]; } public function query($refill_info) { $order_sn = $refill_info['order_sn']; $store_id = $this->store_id(); $mod_fetch = Model('fetch_order'); $order = $mod_fetch->order_info(['order_sn' => $order_sn,'store_id' => $store_id],'*',true); if(empty($order)) { return [true, ORDER_STATE_NOEXIST]; } $fetch_status = intval($order['fetch_status']); $fetch_result = $order['fetch_result']; $official_sn = $order['official_sn']; if ($fetch_status == 0) { $order_state = ORDER_STATE_CANCEL; } elseif ($fetch_status == 1 || $fetch_status == 2) { $order_state = ORDER_STATE_SEND; } elseif ($fetch_result == "SUCCESS") { $order_state = ORDER_STATE_SUCCESS; Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $official_sn]); } else { $order_state = ORDER_STATE_CANCEL; } return [true, $order_state]; } }