From 21743caae9fd8ce78853f244d7ac5aa8c144acfb Mon Sep 17 00:00:00 2001 From: ziming Date: Tue, 29 Apr 2025 15:54:50 +0800 Subject: [PATCH] order query --- internal/service/cmb_mock.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/service/cmb_mock.go b/internal/service/cmb_mock.go index cb45686..7f25374 100644 --- a/internal/service/cmb_mock.go +++ b/internal/service/cmb_mock.go @@ -150,13 +150,13 @@ func (this *CmbService) queryOrder(r *http.Request) (*bo.OrderBo, error) { func (this *CmbService) queryByOrderNo(r *http.Request) (string, error) { - //ip := r.Header.Get("X-Forwarded-For") - //if len(ip) == 0 { - // ip = r.RemoteAddr - //} - //if ip != "117.175.169.61" && ip != "127.0.0.1" { - // return "", fmt.Errorf("ip check fail,IP:%s", ip) - //} + ip := r.Header.Get("X-Forwarded-For") + if len(ip) == 0 { + ip = r.RemoteAddr + } + if ip != "117.175.169.61" && ip != "127.0.0.1" { + return "", fmt.Errorf("ip check fail,IP:%s", ip) + } path := r.URL.Path parts := strings.Split(path, "/")