1、细节调整
This commit is contained in:
parent
a137fba38c
commit
3fd1bfc232
|
|
@ -54,7 +54,9 @@
|
|||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="是否请求成功" align="center" prop="isSuccess" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.isSuccess==='成功'?'success':'danger'" size="small">{{ scope.row.isSuccess }}</el-tag>
|
||||
<el-tag :type="scope.row.isSuccess=== 1 ?'success':'danger'" size="small">
|
||||
{{ scope.row.isSuccess === 1 ? '成功' : '失败' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
|
|
@ -190,8 +192,8 @@ export default {
|
|||
isSuccess: null,
|
||||
createTime: null
|
||||
};
|
||||
this.request=null
|
||||
this.response=null
|
||||
this.request = null
|
||||
this.response = null
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -205,8 +207,8 @@ export default {
|
|||
this.form = row;
|
||||
try {
|
||||
this.request = JSON.parse(this.form.request)
|
||||
this.response=JSON.parse(this.form.response)
|
||||
} catch(err) {
|
||||
this.response = JSON.parse(this.form.response)
|
||||
} catch (err) {
|
||||
this.open = false;
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.xjs.annotation;
|
||||
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.log.enums.OperatorType;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.xjs.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 映射字段(tip: 1 = 成功)
|
||||
* @author xiejs
|
||||
* @since 2022-01-13
|
||||
*/
|
||||
@Target({ ElementType.PARAMETER, ElementType.FIELD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface MappingField {
|
||||
|
||||
/**
|
||||
* 字段本身具有的值
|
||||
* @return string
|
||||
*/
|
||||
String key() default "";
|
||||
|
||||
/**
|
||||
* 需要转换的值
|
||||
* @return string
|
||||
*/
|
||||
String value() default "";
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package com.xjs.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 服务之间的调用注解
|
||||
* @author xiejs
|
||||
* @since 2022-01-13
|
||||
*/
|
||||
@Target({ ElementType.PARAMETER, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface RpcLog {
|
||||
/**
|
||||
* 请求服务方法
|
||||
* @return String
|
||||
*/
|
||||
String method() default "";
|
||||
|
||||
/**
|
||||
* 请求服务名称
|
||||
* @return String
|
||||
*/
|
||||
String serviceName() default "";
|
||||
}
|
||||
|
|
@ -5,19 +5,13 @@ import com.alibaba.fastjson.serializer.ValueFilter;
|
|||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.config;
|
||||
|
||||
import com.xjs.web.MyHandlerInterceptor;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* mvc拦截配置
|
||||
* @author xiejs
|
||||
* @since 2022-01-13
|
||||
*/
|
||||
@Configuration
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new MyHandlerInterceptor());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.xjs.web;
|
||||
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* mvc拦截器
|
||||
* @author xiejs
|
||||
* @since 2022-01-13
|
||||
*/
|
||||
public class MyHandlerInterceptor implements HandlerInterceptor {
|
||||
@Override
|
||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
|
||||
|
||||
//System.out.println("handler1"+handler);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.xjs.annotation.MappingField;
|
||||
import com.xjs.enums.StatusEnum;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ public class ApiLog implements Serializable
|
|||
private String response;
|
||||
|
||||
/** 是否请求成功 */
|
||||
@Excel(name = "是否请求成功")
|
||||
@Excel(name = "是否请求成功",readConverterExp = "1=成功,2=失败")
|
||||
private Integer isSuccess;
|
||||
|
||||
@Excel(name = "创建时间" ,dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
|
|
|
|||
Loading…
Reference in New Issue