|
@@ -633,23 +633,29 @@ class OrdersController extends BaseController
|
|
|
|
|
|
private function templateCompare(){
|
|
|
//if(!in_array($this->distribution_channel_id,[2,14,211,155,4427,4488,256,691,146,255,722,4364,5,202,318,4237,266,196,273,4236,148,8,4241,160,271,4053,123,4334,4487,4593,695,4025,4426,4174])){
|
|
|
- if(!in_array($this->distribution_channel_id,[2,14,123,211,5,8,160,4236,4237,4241])){
|
|
|
+ $start_time = env('TEMPLATE_COMPARE_START_TIME_3',0);
|
|
|
+ if(!$start_time){
|
|
|
return 0;
|
|
|
}
|
|
|
-
|
|
|
- $user = DataAnalysisSelectUserService::getByUidAndType($this->uid,'TEMPLATE_COMPARE');
|
|
|
- if(!$user){
|
|
|
+ if(!in_array($this->distribution_channel_id,[14,123,211,5,8,160,4236,4237,4241])){
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- $template_id = $user->attach;
|
|
|
-
|
|
|
- if($template_id && $template_id == 3 && !OrderService::isPaidUser($this->uid)){
|
|
|
- $template_id = 2;
|
|
|
+ $user = $this->_user_info;
|
|
|
+ if(strtotime($user->created_at) < $start_time){
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
- if($template_id == 3){
|
|
|
- $template_id = 5;
|
|
|
+ $user = DataAnalysisSelectUserService::getByUidAndType($this->uid,'TEMPLATE_COMPARE_V3');
|
|
|
+ if($user){
|
|
|
+ $template_id = $user->attach;
|
|
|
+ }else{
|
|
|
+ $template_id = $this->uid % 2 == 0? 2:4;
|
|
|
+ DataAnalysisSelectUserService::create(
|
|
|
+ $this->uid,
|
|
|
+ $this->distribution_channel_id,
|
|
|
+ 'TEMPLATE_COMPARE_V3',
|
|
|
+ -1, $template_id);
|
|
|
}
|
|
|
|
|
|
return $template_id;
|
|
@@ -662,7 +668,7 @@ class OrdersController extends BaseController
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- if(!in_array($this->distribution_channel_id,[2,14,146 ,155 ,255 ,256 ,691 ,722 ,4364 ,695 ,4174 ,4025 ,4593 ,4426 ,4742 ,4053 ,4334 ,4487])){
|
|
|
+ if(!in_array($this->distribution_channel_id,[2,146 ,155 ,255 ,256 ,691 ,722 ,4364 ,695 ,4174 ,4025 ,4593 ,4426 ,4742 ,4053 ,4334 ,4487])){
|
|
|
return 0;
|
|
|
}
|
|
|
$user = $this->_user_info;
|