|
@@ -16,6 +16,7 @@ use App\Modules\User\Services\ForceSubscribeUserIService;
|
|
|
use App\Modules\User\Services\UserDivisionCpcPropertyService;
|
|
|
use App\Modules\User\Services\UserDivisionPropertyService;
|
|
|
use App\Modules\User\Services\UserGiftService;
|
|
|
+use App\Modules\User\Services\UserMonthService;
|
|
|
use App\Modules\User\Services\UserService;
|
|
|
use App\Modules\Book\Services\BookService;
|
|
|
use App\Modules\Channel\Services\PayTemplateService;
|
|
@@ -263,7 +264,8 @@ class OrdersController extends BaseController
|
|
|
$appad = 0;
|
|
|
|
|
|
$property = UserDivisionCpcPropertyService::getUserProperty($this->uid);
|
|
|
-
|
|
|
+ $user_info = $this->_user_info;
|
|
|
+ $this->monthPayExposureRecord($property,$user_info->openid);
|
|
|
foreach ($res as $v) {
|
|
|
if ($template_id == 7 && $book_config && $book_config->charge_type == 'BOOK' && $v->price == 2) {
|
|
|
continue;
|
|
@@ -890,4 +892,22 @@ class OrdersController extends BaseController
|
|
|
'Referer'=>$refer
|
|
|
]);
|
|
|
}*/
|
|
|
+
|
|
|
+ private function monthPayExposureRecord($property,$openid){
|
|
|
+ if (!$property) return '';
|
|
|
+ if (in_array($this->distribution_channel_id, explode(',', redisEnv('OPEN_ORDER_INNER_SITES')))
|
|
|
+ && in_array($property, ['none','low', 'medium'])
|
|
|
+ ) {
|
|
|
+ if(!UserMonthService::isSignMonth($openid)){
|
|
|
+ try{
|
|
|
+ DB::table('user_month_visit_record')->insert([
|
|
|
+ 'uid'=>$this->uid,'day'=>date('Y-m-d'),
|
|
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
+ 'updated_at'=>date('Y-m-d H:i:s')
|
|
|
+ ]);
|
|
|
+ }catch (\Exception $e){}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ }
|
|
|
}
|