CreateLog.php 1005 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Services;
  3. use Illuminate\Support\Facades\DB;
  4. class CreateLog
  5. {
  6. // 添加配置日志
  7. public static function SystemStatusInfo_log($admin_id, $StatusName)
  8. {
  9. $data = [
  10. 'admin_id' => $admin_id,
  11. 'StatusName' => $StatusName,
  12. 'create_at' => date('Y-m-d H:i:s')
  13. ];
  14. DB::connection('write')->table('agent.dbo.SystemStatusInfo_log')->updateOrInsert(['StatusName' => $StatusName], $data);
  15. }
  16. // 添加支付往三方的请求参数
  17. public static function pay_request($userPhone, $extra, $orderSn, $userEmail, $userId, $userName = '')
  18. {
  19. $data = [
  20. 'order_sn' => $orderSn,
  21. 'user_phone' => $userPhone,
  22. 'extra' => $extra,
  23. 'email' => $userEmail,
  24. 'user_name' => $userName,
  25. 'user_id' => $userId
  26. ];
  27. DB::connection('write')->table('agent.dbo.pay_request')->updateOrInsert(['order_sn' => $orderSn], $data);
  28. }
  29. }