增加多个价格测试,增加部门SN参数

hotfix/paypal-note
Jimmy Liow 2 years ago
parent d8100905c9
commit 79192d5628

@ -997,17 +997,17 @@ class Information extends CI_Controller
public function test_price()
{
$price_rule = '<div style="color: red;">#ah-8,st,2#</div>';
$price_rule = '<div style="color: red;">#ah-8,st,2#</div><div style="color: red;">#ah-8,st,2#</div>';
$price_tag_list = $this->parse_price_tag($price_rule);
var_dump($price_tag_list);
}
/*!
* 页面中有价格标签,查出价格并替换内容
* @author LYT <lyt@hainatravel.com>
* @date 2017-07-14
* @author LiaoYijun
* @date 2023-05-12
* @param string $price_content 包含价格标签的内容
* @return string 可读的价格字符串
* @return array 包含价格与占位符的数组
*/
public function parse_price_tag($price_content)
{
@ -1101,14 +1101,13 @@ class Information extends CI_Controller
if (!empty($price_number)) {
$price_tag = [
'placeholder' => $price_item->placeholder,
'price_number' => $price_item->price_number,
'price_number' => $price_number,
];
$price_tag_list[] = $price_tag;
//$price_content = str_replace($price_item->placeholder, $price_number, $price_content);
}
}
}
return $price_content;
return $price_tag_list;
}
//使用正则匹配出价格标签,返回一个价格数组

@ -25,7 +25,7 @@ class PrimeLinePrice_model extends CI_Model {
$this->orderby = ' ORDER BY plp.PLP_Level ASC,plp.PLP_IsWeekPrice DESC,plp.PLP_AdultUnitPrice DESC ';
}
public function search($cli_no, $topnum = false, $cli_grade = false, $person_size = false, $price_date = false) {
public function search($cli_no, $topnum = false, $cli_grade = false, $person_size = false, $price_date = false, $DEI_SN = 28) {
$this->init();
$this->cli_no = $cli_no;
$this->topnum = empty($topnum) ? false : $topnum;
@ -41,6 +41,7 @@ class PrimeLinePrice_model extends CI_Model {
)
";
}
$this->DEI_SN = $DEI_SN;
return $this->get_list();
}
@ -93,7 +94,7 @@ class PrimeLinePrice_model extends CI_Model {
$this->cli_grade ? $sql.=$this->cli_grade : false;
$this->orderby ? $sql.=$this->orderby : false;
$query = $this->HT->query($sql,array($this->$DEI_SN,$this->cli_no));
$query = $this->HT->query($sql,array($this->DEI_SN,$this->cli_no));
if ($this->topnum === 1) {
if ($query->num_rows() > 0) {
$row = $query->row();

Loading…
Cancel
Save