From a950b776ad8c09f4de670ecb67633ea5aea9ef1f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sun, 29 Sep 2024 15:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/svc_data_center_original_data.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/svc/svc_data_center_original_data.go b/app/svc/svc_data_center_original_data.go index ad4249d..942e0f9 100644 --- a/app/svc/svc_data_center_original_data.go +++ b/app/svc/svc_data_center_original_data.go @@ -217,10 +217,10 @@ func DataCenterOriginalDataDoing(c *gin.Context, req md.DataCenterDataCenterOrig return nil } func OriginalDataMoreApplicationDoing(c *gin.Context, req md.DataCenterOriginalDataMoreApplicationDoingReq) error { - //state, _ := cache.GetString(c.GetString("mid") + ":original.wx.ad.data") - //if state == "1" { - // return e.NewErr(400000, "数据采集中~") - //} + state, _ := cache.GetString(c.GetString("mid") + ":original.wx.ad.data") + if state == "1" { + return e.NewErr(400000, "数据采集中~") + } // 加锁 防止并发提取 mutexKey := fmt.Sprintf("%s:DataCenterOriginalDataDoingOriginalDataMoreApplicationDoing", c.GetString("mid")) withdrawAvailable, err := cache.Do("SET", mutexKey, 1, "EX", 5, "NX")