DBTool = DB::getInstance(); $this->DBLog = LogTable::getInstance(); } /** * User: wangxj * * 函数作用 * * @params * * @return */ function setMemcache($order_id, $type, $prod_top_org_id = '', $prod_name = '', $expire = 0) { $sql = "select prod_top_org_id , prod_name from order_main where order_id = $order_id and cancel_flag = 0 and parent_order_id = 0 limit 1"; $hotel = $this->DBTool->queryBySql($sql); $prod_top_org_id = $hotel['rowset'][0]['prod_top_org_id']; $prod_name = $hotel['rowset'][0]['prod_name']; //供应商账户的id parent::setMemcache($order_id, $type, $prod_top_org_id, $prod_name); } /** * User: wangxj * * 获取供应商名 * * @order_id string 订单号 * * @result string 供应商名 */ function getSupplierName($order_id) { $supplier_name = ''; $sql = "select supplier_name from order_main o left join base_supplier s on o.prod_top_org_id = s.id where order_id = $order_id and o.cancel_flag = 0 limit 1"; $hotel = $this->DBTool->queryBySql($sql); if ($hotel['code'] == 0 && $hotel['rowset'][0]['supplier_name']) $supplier_name = $hotel['rowset'][0]['supplier_name']; return $supplier_name; } }