|
@@ -260,7 +260,7 @@ class OrdersController extends BaseController
|
|
|
/*if( ($comparev2_id = $this->templateCompareV2()) ){
|
|
|
$template_id = $comparev2_id;
|
|
|
}*/
|
|
|
- $this->outstandingYearOrder($this->uid);
|
|
|
+ $outstandingYearOrder = $this->outstandingYearOrder($this->uid);
|
|
|
\Log::info('recordFirstIntoPayPage:$template_id:' . $template_id);
|
|
|
$res = ProductService::getChargeProduct($template_id);
|
|
|
if (!$res) {
|
|
@@ -338,7 +338,7 @@ class OrdersController extends BaseController
|
|
|
'is_year_order' => 1,
|
|
|
'text' => $text,
|
|
|
'first_charge' => false,
|
|
|
- 'today_special' => false,
|
|
|
+ 'today_special' => $outstandingYearOrder,
|
|
|
'save_text' => $save_text,
|
|
|
'product_id' => $v->id,
|
|
|
'show_free_ads' => $appad
|
|
@@ -361,7 +361,7 @@ class OrdersController extends BaseController
|
|
|
'is_year_order' => 0,
|
|
|
'text' => $text,
|
|
|
'first_charge' => false,
|
|
|
- 'today_special' => $v->is_default == 1 ? true : false,
|
|
|
+ 'today_special' => ($v->is_default == 1 && $outstandingYearOrder == false) ? true : false,
|
|
|
'save_text' => $save_text,
|
|
|
'product_id' => $v->id,
|
|
|
'show_free_ads' => $appad
|
|
@@ -779,27 +779,33 @@ class OrdersController extends BaseController
|
|
|
private function outstandingYearOrder($uid)
|
|
|
{
|
|
|
if (!in_array($this->distribution_channel_id, explode(',', env('OUTSTANDING_YEAR_ORDER_SITE')))) {
|
|
|
- return '';
|
|
|
+ return false;
|
|
|
}
|
|
|
- $exist = DataAnalysisSelectUserService::getByUidAndType($uid, 'OUTSTANDING_YEAR_ORDER');
|
|
|
- if($exist) return '';
|
|
|
+
|
|
|
$userDivisionProperty = UserDivisionPropertyService::getUserProperty($uid);
|
|
|
- if (!$userDivisionProperty) return '';
|
|
|
+ if (!$userDivisionProperty) return false;
|
|
|
|
|
|
- if ($userDivisionProperty != 'high') return '';
|
|
|
+ if ($userDivisionProperty != 'high') return false;
|
|
|
|
|
|
if ($uid % 2 == 0) {
|
|
|
+ $is_show_outstanding_year_order = true;
|
|
|
$template_id = 1;
|
|
|
} else {
|
|
|
+ $is_show_outstanding_year_order = false;
|
|
|
$template_id = 2;
|
|
|
}
|
|
|
|
|
|
+ $exist = DataAnalysisSelectUserService::getByUidAndType($uid, 'OUTSTANDING_YEAR_ORDER');
|
|
|
+ if($exist) return $is_show_outstanding_year_order;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
DataAnalysisSelectUserService::create(
|
|
|
$uid,
|
|
|
$this->distribution_channel_id,
|
|
|
'OUTSTANDING_YEAR_ORDER',
|
|
|
-1, $template_id);
|
|
|
- return '';
|
|
|
+ return $is_show_outstanding_year_order;
|
|
|
}
|
|
|
|
|
|
public function exchangeList(){
|