|
|
@@ -9,8 +9,6 @@ class QueueOne extends Start_Controller {
|
|
|
$this->load->_model("Model_logic_crm",'logic_crm');
|
|
|
$this->load->_model("Model_logic_u9action",'logic_u9action') ;
|
|
|
$this->load->_model("Model_logic_u9bh",'logic_u9bh');
|
|
|
- $this->load->_model("Model_express_tt","express_tt");
|
|
|
- $this->load->_model("Model_shop","shop");
|
|
|
}
|
|
|
private $ip = ['127.0.0.1','47.105.156.18'];
|
|
|
//定义方法的调用规则 获取URI第二段值
|
|
|
@@ -20,53 +18,14 @@ class QueueOne extends Start_Controller {
|
|
|
if(!in_array($ip,$this->ip)){
|
|
|
exit("No direct script access allowed");
|
|
|
}
|
|
|
-
|
|
|
$this->_u9action();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private function _u9action(){
|
|
|
-
|
|
|
-
|
|
|
$this->logic_u9action->waixiao();
|
|
|
echo "执行了u9外销";
|
|
|
$this->logic_u9bh->doAction();
|
|
|
echo "执行了u9备货";
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- //tiktok的cbt发货模式 按照定时任务先创建标签
|
|
|
- //订单状态要求 已审核 未打印 未出库 允许出库 允许打印 快递必须要是cbt
|
|
|
- // 当前店铺为tt-wk
|
|
|
- private function _cbtCreateLabel(){
|
|
|
- $where_arr = [
|
|
|
- "shop"=>35,//当前店铺为tt-wk
|
|
|
- "express"=>83,//快递为tt-cbt
|
|
|
- "print"=>2,//未打印
|
|
|
- "printnumber"=>0,//打印次数
|
|
|
- 'library'=>1,//未出库
|
|
|
- //'libraryconfirm'=>2,//允许出库
|
|
|
- "review >"=>4,//审核通过或自动审核
|
|
|
- ];
|
|
|
- $shop_info = $this->shop->read(35);
|
|
|
- if(empty($shop_info)){
|
|
|
- exit("当前店铺不存在");
|
|
|
- }
|
|
|
- $list = $this->db->from("fullordertt")
|
|
|
- ->where($where_arr)
|
|
|
- ->get()->result_array();
|
|
|
- if(empty($list)){
|
|
|
- exit("没有符合条件的订单");
|
|
|
- }
|
|
|
- foreach($list as $k=>$v){
|
|
|
- $extra_text = json_encode($v['extra_text'],true);
|
|
|
- if(isset($extra_text['label_info'])){
|
|
|
- continue;
|
|
|
- }
|
|
|
- $this->express_tt->createLabel($v,$shop_info);
|
|
|
- usleep(100);
|
|
|
- }
|
|
|
- exit("执行完成");
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
}
|