From 1da408cf7929a5179eac352eef3946431465fc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Thu, 26 Jun 2025 15:28:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=B5=B7API=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ctmobilefirst/models/api_model.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/application/third_party/ctmobilefirst/models/api_model.php b/application/third_party/ctmobilefirst/models/api_model.php index d3f525db..57f3e043 100644 --- a/application/third_party/ctmobilefirst/models/api_model.php +++ b/application/third_party/ctmobilefirst/models/api_model.php @@ -692,6 +692,14 @@ class Api_model extends CI_Model { //价格 $tourItem->price = $this->getTourPrice($row["code"]); + //类别信息 + $tourDetail = $this->getTourDetail($row["code"]); + if (isset($tourDetail->CLI_LineType)){ + $tourItem->linetype = $tourDetail->CLI_LineType; + }else{ + $tourItem->linetype = ""; + } + $resultJson[] = $tourItem; } } @@ -700,6 +708,29 @@ class Api_model extends CI_Model { } + + /** + * 获取对应编码的线路信息 + */ + function getTourDetail($clino){ + $sql = " SELECT top 1 CLI_LineType ,CLI_PackageClass,CLI_SN + FROM CustomerLineInfo INNER JOIN + CustomerLineInfo2 ON CustomerLineInfo.CLI_SN = CustomerLineInfo2.CLI2_CLI_SN + WHERE (CLI_DEI_SN=".$this->dei_sn.") + AND (CLI_State = 1005004) + AND (CLI2_LGC = ".$this->CTLGC.") + and isnull(CustomerLineInfo2.DeleteFlag,0)=0 + and CLI_NO = ? "; + $query =$this->HT->query($sql,array($clino)); + + if ($query->num_rows() > 0) { + return $query->row(); + }else{ + return null; + } + + } + } /* End of file Api_model.php */