|  | @@ -11,11 +11,13 @@ import com.zanxiang.game.module.base.ServerInfo;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.base.pojo.enums.PayApplicationTypeEnum;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.base.pojo.enums.StatusEnum;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.base.rpc.IWxApiServiceRpc;
 | 
	
		
			
				|  |  | +import com.zanxiang.game.module.manage.constant.RedisKeyConstant;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.manage.service.*;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.mybatis.entity.GamePayWay;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.mybatis.entity.ListenCall;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.mybatis.entity.PayApplication;
 | 
	
		
			
				|  |  |  import com.zanxiang.game.module.mybatis.entity.PayBox;
 | 
	
		
			
				|  |  | +import com.zanxiang.module.redis.service.IDistributedLockComponent;
 | 
	
		
			
				|  |  |  import com.zanxiang.module.util.JsonUtil;
 | 
	
		
			
				|  |  |  import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.apache.dubbo.config.annotation.DubboReference;
 | 
	
	
		
			
				|  | @@ -33,6 +35,7 @@ import org.springframework.web.client.RestTemplate;
 | 
	
		
			
				|  |  |  import java.time.LocalDate;
 | 
	
		
			
				|  |  |  import java.time.LocalDateTime;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  | +import java.util.concurrent.TimeUnit;
 | 
	
		
			
				|  |  |  import java.util.function.Function;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -63,6 +66,9 @@ public class AppletCheckServiceImpl implements IAppletCheckService {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IPayApplicationService payApplicationService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private IDistributedLockComponent distributedLockComponent;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public void payApplicationCheck() {
 | 
	
		
			
				|  |  |          List<PayApplication> payApplicationList = payApplicationService.list(new LambdaQueryWrapper<PayApplication>()
 | 
	
	
		
			
				|  | @@ -178,7 +184,13 @@ public class AppletCheckServiceImpl implements IAppletCheckService {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          String content = payApplication.getAppName() + "监测异常";
 | 
	
		
			
				|  |  |          Set<String> phoneNumSet = listenCallList.stream().map(ListenCall::getPhoneNum).collect(Collectors.toSet());
 | 
	
		
			
				|  |  | -        phoneNumSet.forEach(phoneNum -> this.phoneCall(content, phoneNum));
 | 
	
		
			
				|  |  | +        phoneNumSet.forEach(phoneNum -> {
 | 
	
		
			
				|  |  | +            String lockKey = RedisKeyConstant.PHONE_CALL_LOCK + phoneNum;
 | 
	
		
			
				|  |  | +            if (!distributedLockComponent.doLock(lockKey, 0L, 1L, TimeUnit.MINUTES)) {
 | 
	
		
			
				|  |  | +                return;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            this.phoneCall(content, phoneNum);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private List<ListenCall> callListenUser() {
 | 
	
	
		
			
				|  | @@ -203,15 +215,26 @@ public class AppletCheckServiceImpl implements IAppletCheckService {
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              // 带参POST请求
 | 
	
		
			
				|  |  |              String result = HttpUtil.post(host, JsonUtil.toString(paramMap));
 | 
	
		
			
				|  |  | -            if (Strings.isNotBlank(result) && result.contains("errcode")) {
 | 
	
		
			
				|  |  | -                log.error("小程序封停监测结果, appName : {}, result : {}", appName, result);
 | 
	
		
			
				|  |  | -                return Boolean.FALSE;
 | 
	
		
			
				|  |  | +            //结果为空, 判定腾讯接口返回错误, 不判定为封禁
 | 
	
		
			
				|  |  | +            if (Strings.isBlank(result)) {
 | 
	
		
			
				|  |  | +                return Boolean.TRUE;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            //没有报错
 | 
	
		
			
				|  |  | +            if (!result.contains("errcode")) {
 | 
	
		
			
				|  |  | +                return Boolean.TRUE;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            //结果返回错误
 | 
	
		
			
				|  |  | +            Map<String, Object> resultMap = JsonUtil.toMap(result, Map.class, Object.class);
 | 
	
		
			
				|  |  | +            //排除计算中的特殊报错
 | 
	
		
			
				|  |  | +            if (Objects.equals(resultMap.get("errcode").toString(), "61503")) {
 | 
	
		
			
				|  |  | +                return Boolean.TRUE;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            log.error("小程序封停监测结果, appName : {}, result : {}", appName, result);
 | 
	
		
			
				|  |  |          } catch (Exception e) {
 | 
	
		
			
				|  |  |              log.error("小程序封停监测异常, appName : {},  e : {}", appName, e.getMessage());
 | 
	
		
			
				|  |  |              return Boolean.FALSE;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return Boolean.TRUE;
 | 
	
		
			
				|  |  | +        return Boolean.FALSE;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private void phoneCall(String param, String mobile) {
 |