12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /**
- * Created by PhpStorm.
- * User: z-yang
- * Date: 2020/12/24
- * Time: 17:04
- */
- namespace App\Modules\Channel\Services;
- use App\Modules\Channel\Models\ReportToChannelOrders;
- use App\Modules\Channel\Models\ReportToChannelUsers;
- class ReportToChannelUserAndOrderService
- {
- public static $user_type = 'user';
- public static $order_type = 'order';
- const SUCCESS = 'success';
- public static function getReportUrl($distribution_channel_id,$type){
- if($distribution_channel_id == 10500){
- return 'https://sitewyn29mk4rrn53r7e.wd.pinyuew.com.cn/channelOrderAndUserReport';
- }
- if($distribution_channel_id == 10543){
- return 'http://yx1.hncwzx88.cn/api/app/home/wdy';
- }
- return '';
- }
- public static function updateUserErrorRecord($id,$data){
- ReportToChannelUsers::where('id',$id)->update($data);
- }
- public static function updateOrderErrorRecord($id,$data){
- ReportToChannelOrders::where('id',$id)->update($data);
- }
- public static function getUserErrorRecord($date){
- return ReportToChannelUsers::where('report_status',0)
- ->where('created_at','>=',$date)
- ->select('id','uid','distribution_channel_id','register_ip','user_agent','user_created_at')
- ->get();
- }
- public static function getOrderErrorRecord($date){
- return ReportToChannelOrders::where('report_status',0)
- ->where('created_at','>=',$date)
- ->select('id','uid','distribution_channel_id','price','order_created_at')
- ->get();
- }
- }
|