|
@@ -3,6 +3,7 @@
|
|
namespace App\Http\Controllers\Wap\Order;
|
|
namespace App\Http\Controllers\Wap\Order;
|
|
|
|
|
|
use App\Http\Controllers\Wap\BaseController;
|
|
use App\Http\Controllers\Wap\BaseController;
|
|
|
|
+use App\Modules\Book\Services\BookConfigService;
|
|
use App\Modules\Channel\Services\ChannelService;
|
|
use App\Modules\Channel\Services\ChannelService;
|
|
use App\Modules\Cpa\Services\AdvertiseUserQueueService;
|
|
use App\Modules\Cpa\Services\AdvertiseUserQueueService;
|
|
use App\Modules\Cpa\Services\AdvertiseUsersService;
|
|
use App\Modules\Cpa\Services\AdvertiseUsersService;
|
|
@@ -198,13 +199,23 @@ class OrdersController extends BaseController
|
|
//}
|
|
//}
|
|
\Log::info('order:$template_id:' . $template_id);
|
|
\Log::info('order:$template_id:' . $template_id);
|
|
\Log::info('order:$distribution_channel_id:' . ($this->distribution_channel_id));
|
|
\Log::info('order:$distribution_channel_id:' . ($this->distribution_channel_id));
|
|
-
|
|
|
|
|
|
+ $book_config = null;
|
|
|
|
+ if($bid){
|
|
|
|
+ $bid = Hashids::decode($bid)[0];
|
|
|
|
+ //$book = BookService::getBookById($bid);
|
|
|
|
+ $book_config = BookConfigService::getBookById($bid);
|
|
|
|
+ }
|
|
if ($template_id == 2) { //模板2只有在长篇小说过来的用户才显示
|
|
if ($template_id == 2) { //模板2只有在长篇小说过来的用户才显示
|
|
//部分渠道需要2元模板不管哪个入口进来都展示
|
|
//部分渠道需要2元模板不管哪个入口进来都展示
|
|
$exclude_channels = explode(',', env('PRICE_TWO_SHOW_ALL_CHANNEL'));
|
|
$exclude_channels = explode(',', env('PRICE_TWO_SHOW_ALL_CHANNEL'));
|
|
if(!in_array($this->distribution_channel_id,$exclude_channels))
|
|
if(!in_array($this->distribution_channel_id,$exclude_channels))
|
|
{
|
|
{
|
|
- if ($bid) {
|
|
|
|
|
|
+ if($book_config){
|
|
|
|
+ if($book_config->charge_type == 'BOOK') $template_id = 1;
|
|
|
|
+ }else{
|
|
|
|
+ $template_id = 1;
|
|
|
|
+ }
|
|
|
|
+ /*if ($bid) {
|
|
$bid = Hashids::decode($bid)[0];
|
|
$bid = Hashids::decode($bid)[0];
|
|
\Log::info('order:$bid:' . $bid);
|
|
\Log::info('order:$bid:' . $bid);
|
|
$book = BookService::getBookById($bid);
|
|
$book = BookService::getBookById($bid);
|
|
@@ -214,10 +225,10 @@ class OrdersController extends BaseController
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
$template_id = 1;
|
|
$template_id = 1;
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if($temp){
|
|
|
|
|
|
+ /*if($temp){
|
|
$temp_bid = 0;
|
|
$temp_bid = 0;
|
|
try{
|
|
try{
|
|
$temp_bid = Hashids::decode($temp)[0];
|
|
$temp_bid = Hashids::decode($temp)[0];
|
|
@@ -227,7 +238,7 @@ class OrdersController extends BaseController
|
|
if ($t) {
|
|
if ($t) {
|
|
$template_id = $t;
|
|
$template_id = $t;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
//男频站点 支付模板
|
|
//男频站点 支付模板
|
|
if( ($male_site_template = $this->maleSite($this->distribution_channel_id)) ){
|
|
if( ($male_site_template = $this->maleSite($this->distribution_channel_id)) ){
|
|
@@ -284,9 +295,10 @@ class OrdersController extends BaseController
|
|
}
|
|
}
|
|
//\Log::info('ad-tu:uid:'.$uid.':'.$appad);
|
|
//\Log::info('ad-tu:uid:'.$uid.':'.$appad);
|
|
foreach ($res as $v) {
|
|
foreach ($res as $v) {
|
|
- if($appad && $v->price == 100){
|
|
|
|
- //continue;
|
|
|
|
|
|
+ if($template_id == 7 && $book_config && $book_config->charge_type == 'BOOK' && $v->price == 2){
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
|
|
+
|
|
if ($v->type == 'NEW_USER' && $is_first_recharge) {
|
|
if ($v->type == 'NEW_USER' && $is_first_recharge) {
|
|
if (env('NO_NEW_USER_CHARGE') &&
|
|
if (env('NO_NEW_USER_CHARGE') &&
|
|
in_array(
|
|
in_array(
|