Authored by 孟令阶

add

package com.monitor.javaserver.bigdata.ctrl;
import com.contants.AlarmGroupContants;
import com.monitor.common.config.SnsMobileConfig;
import com.monitor.common.service.AlarmMsgService;
import com.monitor.javaserver.bigdata.MonitAlarmInfo;
import com.util.GetUsersInfoUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -24,6 +26,9 @@ public class MonitAlarmCtrl {
@Autowired
private SnsMobileConfig snsMobileConfig;
@Autowired
private GetUsersInfoUtil getUsersInfoUtil;
@RequestMapping("/recvMonitAlarm")
public void recvMonitAlarm(@RequestBody MonitAlarmInfo info) {
... ... @@ -35,17 +40,32 @@ public class MonitAlarmCtrl {
/**
* 对外提供报警接口:
* @param info 报警内容
*
* @param info 报警内容
* @param mobiles 电话号码以逗号隔开 156xxxxx,187xxxxxx
*/
@RequestMapping("/recvMonitAlarmInfo")
public void recvMonitAlarmInfo(String info,String mobiles) {
public void recvMonitAlarmInfo(String info, String mobiles) {
DEBUG.info("mip monit alarm info: ", info);
if(info==null){
info="";
if (info == null) {
info = "";
}
alarmMsgService.sendSms("service_exception", info.toString(), mobiles);
}
/**
* 风控告警
*
* @param info
*/
@RequestMapping("/maliciousIpAlarm")
public void maliciousIpAlarm(String info) {
if (info == null) {
info = "";
}
alarmMsgService.sendSms("MaliciousIp", info, getUsersInfoUtil.getMobileByAlarmGroup(AlarmGroupContants.GROUP_NAME_MALICIOUS_IP));
}
}
... ...