添加VoIp泛收日志查询接口

This commit is contained in:
zhangdongxu
2018-11-06 17:41:06 +08:00
parent bbf34d95c6
commit b06fdf715f
6 changed files with 553 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.nis.domain.LogEntity;
import com.nis.domain.Page;
import com.nis.domain.restful.NtcCollectVoipLog;
import com.nis.domain.restful.NtcReportEntity;
import com.nis.restful.RestBusinessCode;
import com.nis.restful.RestServiceException;
@@ -239,6 +240,62 @@ public abstract class BaseLogService {
}
logger.info("请求参数校验结束----" + System.currentTimeMillis());
}
/**
* 验证日志查询条件格式是否正确
* @param thread
* @param start
* @param entity
* @param clazz
* @param page
*/
public void collectConditionCheck(AuditLogThread thread, long start, NtcCollectVoipLog entity, Class clazz,
Page page) {
logger.info("请求参数校验开始----" + System.currentTimeMillis());
try {
if (!StringUtil.isBlank(entity.getSearchFoundEndTime())) {
sdf.setLenient(false);
sdf.parse(entity.getSearchFoundEndTime());
}
} catch (ParseException e) {
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
logger.error(e);
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchFoundEndTime参数格式错误",
RestBusinessCode.param_formate_error.getValue());
} catch (Exception e) {
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
logger.error(e);
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchFoundEndTime参数格式格式");
}
try {
if (!StringUtil.isBlank(entity.getSearchFoundStartTime())) {
sdf.setLenient(false);
sdf.parse(entity.getSearchFoundStartTime());
}
} catch (ParseException e) {
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
logger.error(e);
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchFoundStartTime参数格式错误",
RestBusinessCode.param_formate_error.getValue());
} catch (Exception e) {
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
logger.error(e);
throw new RestServiceException(thread, System.currentTimeMillis() - start, "searchFoundStartTime参数错误");
}
try {
checkCloumnIsExist(thread, start, clazz, page);
} catch (RestServiceException e) {
logger.error(e);
throw e;
} catch (Exception e) {
thread.setExceptionInfo(e.getMessage() + " " + e.getCause());
logger.error(e);
throw new RestServiceException(thread, System.currentTimeMillis() - start, "请求参数错误");
}
logger.info("请求参数校验结束----" + System.currentTimeMillis());
}
/**
*
@@ -340,6 +397,8 @@ public abstract class BaseLogService {
}
}
/**
*
* @Title: getJedisKey