Authored by qinchao

Revert "手机号码改为通过组加载"

This reverts commit 6db5c9ae.
package com.monitor.common.config;
import com.monitor.common.service.AlarmMsgService;
import com.util.GetUsersInfoUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import retrofit.http.POST;
import javax.annotation.PostConstruct;
/**
* 告警任务的短信号码 Created by yoho on 2016/5/4.
*/
@Component("snsMobileConfig")
public class SnsMobileConfig {
public static final Logger logger = LoggerFactory.getLogger(SnsMobileConfig.class);
@Value("${base_mobile}")
private String baseMobile;
@Value("${redis_exception_mobile}")
private String redisMobile;
@Autowired
private GetUsersInfoUtil getUsersInfoUtil;
@Value("${java_service_alarm_mobile}")
private String javaServiceMobile;
@Value("${java_service_alarm_flag}")
private boolean javaServiceFlag;
... ... @@ -32,56 +27,12 @@ public class SnsMobileConfig {
@Value("${java_service_alarm_count_threshold}")
private Integer javaServiceCountThreshold;
@Value("${java_api_error}")
private String javaApiError;
@Value("${bigdata_mobile}")
private String bigdataMobile;
private String javaServiceMobile;
private String redisMobile;
private String baseMobile;
@PostConstruct
public void init(){
//JAVAAPI错误报警
javaApiError =getUsersInfoUtil.getMobileByAlarmGroup("JAVAAPI错误报警");
if(StringUtils.isBlank(javaApiError)){
javaApiError="";
}
//大数据报警
bigdataMobile=getUsersInfoUtil.getMobileByAlarmGroup("大数据报警");
if(StringUtils.isBlank(bigdataMobile)){
bigdataMobile="";
}
//JAVASERVICE错误报警
javaServiceMobile=getUsersInfoUtil.getMobileByAlarmGroup("JAVASERVICE错误报警");
if(StringUtils.isBlank(javaServiceMobile)){
javaServiceMobile="";
}
//REDIS异常报警
redisMobile=getUsersInfoUtil.getMobileByAlarmGroup("REDIS异常报警");
if(StringUtils.isBlank(redisMobile)){
redisMobile="";
}
//基础组
baseMobile=getUsersInfoUtil.getMobileByAlarmGroup("基础组");
if(StringUtils.isBlank(baseMobile)){
baseMobile="";
}
logger.info("初始化手机号码");
logger.info("JAVAAPI错误报警 javaApiError :"+javaApiError);
logger.info("大数据报警 bigdataMobile :"+bigdataMobile);
logger.info("JAVASERVICE错误报警 javaServiceMobile :"+javaServiceMobile);
logger.info("REDIS异常报警 redisMobile :"+redisMobile);
logger.info("基础组 baseMobile :"+baseMobile);
}
public String getBaseMobile() {
return baseMobile;
... ...
... ... @@ -43,9 +43,6 @@ public class DeviceActiveTask {
@PostConstruct
public void init() {
mobile = getUsersInfoUtil.getMobileByAlarmGroup(AlarmGroupContants.UNION_MOBILE);
if(mobile==null){
mobile="";
}
DEBUG.info("联盟激活的电话号码is "+ mobile);
}
... ...
... ... @@ -8,14 +8,20 @@ qcloud_voice_url=https://yun.tim.qq.com/v3/tlsvoicesvr/sendvoiceprompt?sdkappid=
qcloud_sms_url=https://yun.tim.qq.com/v3/tlssmssvr/sendmultisms2?sdkappid=1400021400&random=124
qcloud_sms_key=6e56f948f6f1c0a1bc359e23f7acc140
base_mobile=18751986615,18652008443,18252034289,17361900581,18751886435,17314953523
switch_mobile=18751986615
dns_exception_mobile=18751986615,18652008443,18252034289,17361900581
redis_exception_mobile=18751986615,18652008443,17361900581,18252034289
java_service_alarm_mobile=18751986615,18652008443,18252034289,17361900581,18602555621
java_service_alarm_flag=true
java_service_alarm_cost_threshold=300
java_service_alarm_count_threshold=50
bigdata_mobile=18652925653,18600623107,18651650543,18021522255
java_api_error=18751986615,18652008443,18252034289,13951882433,17361900581,18602555621
SWITCH_DB_URL=http://172.31.56.59:8011/switchdb/switchMysql
\ No newline at end of file
... ...
... ... @@ -20,5 +20,8 @@ java_service_alarm_flag=true
java_service_alarm_cost_threshold=300
java_service_alarm_count_threshold=50
bigdata_mobile=18652925653,17368731356,18600623107
java_api_error=18751986615,18652008443,18252034289,13951882433,17361900581,18602555621
SWITCH_DB_URL=http://10.66.4.28:8011/switchdb/switchMysql
\ No newline at end of file
... ...
... ... @@ -24,4 +24,8 @@ java_service_alarm_flag=true
java_service_alarm_cost_threshold=150
java_service_alarm_count_threshold=50
java_api_error=15905144483
bigdata_mobile=18652925653,18502542319
SWITCH_DB_URL=http://127.0.0.1:8011/switchdb/switchMysql
\ No newline at end of file
... ...