|
@@ -266,7 +266,8 @@ class OrdersController extends BaseController
|
|
|
|
|
|
$property = UserDivisionCpcPropertyService::getUserPropertyV2($this->uid);
|
|
|
$user_info = $this->_user_info;
|
|
|
- $this->monthPayExposureRecord($property,$user_info->openid);
|
|
|
+ //$this->monthPayExposureRecord($property,$user_info->openid);
|
|
|
+ $this->monthAbTest($property,$user_info->openid);
|
|
|
foreach ($res as $v) {
|
|
|
if ($template_id == 7 && $book_config && $book_config->charge_type == 'BOOK' && $v->price == 2) {
|
|
|
continue;
|
|
@@ -928,4 +929,32 @@ class OrdersController extends BaseController
|
|
|
}
|
|
|
return '';
|
|
|
}
|
|
|
+
|
|
|
+ private function monthAbTest($property,$openid){
|
|
|
+ $start_time = redisEnv('MONTH_TEMPLATE_COMPARE_START_TIME', 0);
|
|
|
+ if (!$start_time) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ $user = $this->_user_info;
|
|
|
+ if (strtotime($user->created_at) < $start_time) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (in_array($this->distribution_channel_id, explode(',', redisEnv('OPEN_ORDER_INNER_SITES')))
|
|
|
+ && in_array($property, ['none','low', 'medium'])
|
|
|
+ ) {
|
|
|
+ $exist = DataAnalysisSelectUserService::getByUidAndType($this->uid, 'MONTH');
|
|
|
+ if ($exist) return true;
|
|
|
+ if(!UserMonthService::isSignMonth($openid)){
|
|
|
+ $attach = $this->uid %2 == 0 ? 'show':'hide';
|
|
|
+ DataAnalysisSelectUserService::create(
|
|
|
+ $this->uid,
|
|
|
+ $this->distribution_channel_id,
|
|
|
+ 'MONTH',
|
|
|
+ -1, $attach);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ }
|
|
|
}
|