|
|
@ -157,7 +157,12 @@ public class AlertGroupServiceImpl extends BaseServiceImpl implements AlertGroup |
|
|
|
// insert
|
|
|
|
// insert
|
|
|
|
try { |
|
|
|
try { |
|
|
|
int insert = alertGroupMapper.insert(alertGroup); |
|
|
|
int insert = alertGroupMapper.insert(alertGroup); |
|
|
|
putMsg(result, insert > 0 ? Status.SUCCESS : Status.CREATE_ALERT_GROUP_ERROR); |
|
|
|
if (insert > 0) { |
|
|
|
|
|
|
|
result.put(Constants.DATA_LIST, alertGroup); |
|
|
|
|
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
putMsg(result, Status.CREATE_ALERT_GROUP_ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
} catch (DuplicateKeyException ex) { |
|
|
|
} catch (DuplicateKeyException ex) { |
|
|
|
logger.error("Create alert group error.", ex); |
|
|
|
logger.error("Create alert group error.", ex); |
|
|
|
putMsg(result, Status.ALERT_GROUP_EXIST); |
|
|
|
putMsg(result, Status.ALERT_GROUP_EXIST); |
|
|
|