OrderParamService.php 713 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: z-yang
  5. * Date: 2019/2/26
  6. * Time: 18:52
  7. */
  8. namespace App\Modules\Subscribe\Services;
  9. use App\Modules\Subscribe\Models\OrderParam;
  10. class OrderParamService
  11. {
  12. public static function create($order_id,$gxhp){
  13. try{
  14. $other_param = explode('_',$gxhp);
  15. $appid = isset($other_param[0])?$other_param[0]:0;
  16. $data_hour_key = isset($other_param[1])?$other_param[1]:'';
  17. $bid = isset($other_param[2])?$other_param[2]:0;
  18. $times = isset($other_param[3])?$other_param[3]:0;
  19. OrderParam::create(compact('order_id','gxhp','appid','data_hour_key','bid','times'));
  20. }catch (\Exception $e){}
  21. }
  22. }