Trippest计划根据产品判断是否PVT

hotfix/远程访问多媒体中心
lyt 6 years ago
parent c8aac323fc
commit c34a4083e6

@ -319,8 +319,7 @@ log_message('error',$resp);
$this->ci->tldOrderBuilder->resetBizContent();
$order_type = $set_pvt;
if ($set_pvt==='0') {
$code_type_arr = array_map(function($pag) { return intval($pag->PAG_ExtendType); }, $vf["package_info"]);
$order_type = in_array(39009, $code_type_arr) ? 1 : 2;
$order_type = $this->ci->trippest->if_tour_pvt($vf["package_info"]);
}
$last_code = count($vf["package_info"])-1;
$last_date = count($vf["cold"])-1;

@ -56,6 +56,29 @@ class Trippest
return $ret;
}
/*!
* @Author: LYT
* @Date: 2019-05-28 15:17:11
* @Desc: 判断产品是否需要发送PVT计划
* @param $all_pag_info = array((pag.*),(pag.*))
* @return 1-pvt;2-combine
*/
public function if_tour_pvt($all_pag_info)
{
$tour_pvt_arr = array_filter(array_map(function($pag) {
if(intval($pag->PAG_ExtendType)===39009)
{
return 1;
} else if (stripos($pag->PAG_Title,"PVT") !== false) {
return 1;
} else {
return null;
}
}, $all_pag_info));
$order_type = empty($tour_pvt_arr) ? 2 : 1;
return $order_type;
}
}

Loading…
Cancel
Save