|
@@ -695,6 +695,7 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public AjaxResult insertProcessEvent(EventInfo eventInfo) {
|
|
|
try {
|
|
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
@@ -704,24 +705,23 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
|
}
|
|
|
SysUser sysUser = loginUser.getSysUser();
|
|
|
|
|
|
-
|
|
|
StringBuilder logSource = new StringBuilder();
|
|
|
StringBuilder logFileSource = new StringBuilder();
|
|
|
//判断上报来源
|
|
|
if(REPORTING_SOURCE_1.equals(eventInfo.getReportSource())){
|
|
|
- //如果是AI, 日志和附件来源同样设置为AI
|
|
|
+ // AI来源
|
|
|
logSource.append(EVENT_LOG_SOURCE_1);
|
|
|
logFileSource.append(EVENT_LOG_FILE_SOURCE_1);
|
|
|
}else if(REPORTING_SOURCE_2.equals(eventInfo.getReportSource())){
|
|
|
- //如果是PC, 日志和附件来源同样设置为PC
|
|
|
+ // PC端来源
|
|
|
logSource.append(EVENT_LOG_SOURCE_2);
|
|
|
logFileSource.append(EVENT_LOG_FILE_SOURCE_2);
|
|
|
}else if(REPORTING_SOURCE_3.equals(eventInfo.getReportSource())){
|
|
|
- //如果是PC, 日志和附件来源同样设置为PC
|
|
|
+ // 手机端来源
|
|
|
logSource.append(EVENT_LOG_SOURCE_3);
|
|
|
logFileSource.append(EVENT_LOG_FILE_SOURCE_3);
|
|
|
}else{
|
|
|
- //不是三种方式, 返回未知来源事件.
|
|
|
+ // 未知来源
|
|
|
return AjaxResult.error(EventEnum.SOURCE_NOT_FOUND.getDescribe());
|
|
|
}
|
|
|
|
|
@@ -761,9 +761,9 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
|
|
|
//写入主表
|
|
|
eventProcessMapper.insertEventProcess(eventInfo);
|
|
|
|
|
|
- return AjaxResult.success("创建成功");
|
|
|
+ return AjaxResult.success("事件新增成功!");
|
|
|
} catch (Exception e) {
|
|
|
- return AjaxResult.error(e.getMessage());
|
|
|
+ return AjaxResult.error("事件新增失败!",e.getMessage());
|
|
|
}
|
|
|
|
|
|
}
|