|
@@ -157,7 +157,12 @@ public class AlertGroupServiceImpl extends BaseServiceImpl implements AlertGroup
|
|
|
// insert
|
|
|
try {
|
|
|
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) {
|
|
|
logger.error("Create alert group error.", ex);
|
|
|
putMsg(result, Status.ALERT_GROUP_EXIST);
|