|  | @@ -1,11 +1,13 @@
 | 
	
		
			
				|  |  |  package com.xunmei.core.access.controller;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.constant.SecurityConstants;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.web.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.web.domain.AjaxResult;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.web.page.TableDataInfo;
 | 
	
		
			
				|  |  |  import com.xunmei.common.log.annotation.Log;
 | 
	
		
			
				|  |  |  import com.xunmei.common.log.enums.BusinessType;
 | 
	
		
			
				|  |  | +import com.xunmei.common.redis.utils.RedisUtils;
 | 
	
		
			
				|  |  |  import com.xunmei.common.security.annotation.RequiresPermissions;
 | 
	
		
			
				|  |  |  import com.xunmei.common.security.utils.SecurityUtils;
 | 
	
		
			
				|  |  |  import com.xunmei.core.access.domain.TMonitoringRetrievalPlan;
 | 
	
	
		
			
				|  | @@ -21,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.text.ParseException;
 | 
	
		
			
				|  |  | +import java.time.Duration;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
	
		
			
				|  | @@ -94,6 +97,17 @@ public class TMonitoringRetrievalPlanController extends BaseController {
 | 
	
		
			
				|  |  |      @Log(title = "监控调阅计划", businessType = BusinessType.INSERT)
 | 
	
		
			
				|  |  |      @PostMapping
 | 
	
		
			
				|  |  |      public AjaxResult add(@RequestBody TMonitoringRetrievalPlan tMonitoringRetrievalPlan) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        int objectStringHashCode =JSONObject.toJSON(tMonitoringRetrievalPlan).toString().hashCode();
 | 
	
		
			
				|  |  | +        //仅当hashKey不存在时才设置
 | 
	
		
			
				|  |  | +        Boolean hasKey = RedisUtils.hasKey("addTMonitoringRetrievalPlan" + objectStringHashCode);
 | 
	
		
			
				|  |  | +        if (!hasKey) {
 | 
	
		
			
				|  |  | +            RedisUtils.setCacheObject("addTMonitoringRetrievalPlan" + objectStringHashCode,objectStringHashCode, Duration.ofMillis(1000 * 3));
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (hasKey) {
 | 
	
		
			
				|  |  | +            return AjaxResult.error("数据正在处理,请勿重复提交");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          return toAjax(tMonitoringRetrievalPlanService.insertTMonitoringRetrievalPlan(tMonitoringRetrievalPlan));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |