1、对原始日志查询开始时间和结束时间两个查询条件的日期格式在验证时进行严格解析;
2、为请求日志service_request_log添加request_uri字段;
This commit is contained in:
@@ -42,6 +42,7 @@ public class ServicesRequestLog implements Serializable {
|
||||
private String exceptionInfo;
|
||||
private String serverIp;
|
||||
private String traceCode;
|
||||
private String requestURI;
|
||||
|
||||
/**
|
||||
* serverIp
|
||||
@@ -224,4 +225,17 @@ public class ServicesRequestLog implements Serializable {
|
||||
this.traceCode = traceCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param requestURI the requestURI to set
|
||||
*/
|
||||
public void setRequestURI(String requestURI) {
|
||||
this.requestURI = requestURI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the requestURI
|
||||
*/
|
||||
public String getRequestURI() {
|
||||
return requestURI;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
<result column="EXCEPTION_INFO" jdbcType="BLOB" property="exceptionInfo" typeHandler="com.nis.util.BlobTypeHandler"/>
|
||||
<result column="SERVER_IP" jdbcType="VARCHAR" property="serverIp" />
|
||||
<result column="TRACE_CODE" jdbcType="VARCHAR" property="traceCode" />
|
||||
<result column="REQUEST_URI" jdbcType="VARCHAR" property="requestURI" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
ID, OPERATOR, VERSION, OPACTION,OPTIME, REQUEST_CONTENT,
|
||||
REQUEST_TIME,REQUEST_IP,
|
||||
CONSUMER_TIME,BUSINESS_CODE,EXCEPTION_INFO,SERVER_IP,TRACE_CODE
|
||||
CONSUMER_TIME,BUSINESS_CODE,EXCEPTION_INFO,SERVER_IP,TRACE_CODE,REQUEST_URI
|
||||
</sql>
|
||||
<select id="getAllLog" parameterType="com.nis.domain.restful.ServicesRequestLogBean"
|
||||
resultMap="ServicesRequestLogMap">
|
||||
@@ -127,6 +128,10 @@
|
||||
<if test="traceCode != null">
|
||||
TRACE_CODE,
|
||||
</if>
|
||||
<if test="requestURI != null">
|
||||
REQUEST_URI,
|
||||
</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
||||
@@ -166,6 +171,9 @@
|
||||
<if test="traceCode != null">
|
||||
#{traceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestURI != null">
|
||||
#{requestURI,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -186,6 +186,7 @@ public abstract class BaseLogService {
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(entity.getSearchFoundEndTime())) {
|
||||
sdf.setLenient(false);
|
||||
sdf.parse(entity.getSearchFoundEndTime());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
@@ -201,6 +202,7 @@ public abstract class BaseLogService {
|
||||
|
||||
try {
|
||||
if (!StringUtil.isBlank(entity.getSearchFoundStartTime())) {
|
||||
sdf.setLenient(false);
|
||||
sdf.parse(entity.getSearchFoundStartTime());
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
|
||||
@@ -105,6 +105,7 @@ public class ServicesRequestLogService {
|
||||
log.setBusinessCode(businessCode);
|
||||
log.setExceptionInfo(exceptionInfo);
|
||||
log.setTraceCode(traceCode);
|
||||
log.setRequestURI(requestURI);
|
||||
try {
|
||||
if(Constants.SERVCER_HOST!=null){
|
||||
log.setServerIp(Constants.SERVCER_HOST);
|
||||
|
||||
Reference in New Issue
Block a user