parent
16ad0959f5
commit
2d8f4cab28
|
|
@ -51,6 +51,7 @@
|
|||
<el-table-column label="请求方法" align="center" prop="method" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="请求参数" align="center" prop="request" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="响应参数" align="center" prop="response" :show-overflow-tooltip="true"/>
|
||||
<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>
|
||||
|
|
@ -109,8 +110,7 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
apiName: null,
|
||||
isSuccess: null
|
||||
apiName: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -145,7 +145,8 @@ export default {
|
|||
method: null,
|
||||
request: null,
|
||||
response: null,
|
||||
isSuccess: null
|
||||
isSuccess: null,
|
||||
createTime:null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package com.xjs.common.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc 天行数据配置
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "tianxing.open")
|
||||
@Data
|
||||
public class TianXingProperties {
|
||||
|
||||
/**
|
||||
* key密钥
|
||||
*/
|
||||
private String key;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.xjs.common.handler;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author xiejs
|
||||
* @desc mp字段自动填充处理器
|
||||
* @create 2021-12-27
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MyMetaObjectHandler implements MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
log.info("start insert fill ....");
|
||||
//this.setFieldValByName("createTime", new Date(), metaObject);
|
||||
this.strictInsertFill(metaObject, "createTime", Date.class,new Date()); // 起始版本 3.3.3(推荐)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
log.info("start update fill ....");
|
||||
//this.strictInsertFill(metaObject, "updateTime", LocalDateTime::now, LocalDateTime.class); // 起始版本 3.3.3(推荐)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.xjs.log.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
|
@ -9,6 +11,7 @@ import lombok.Data;
|
|||
import com.ruoyi.common.core.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 日志对象 api_log
|
||||
|
|
@ -23,7 +26,6 @@ public class ApiLog implements Serializable
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 接口名称 */
|
||||
|
|
@ -49,4 +51,8 @@ public class ApiLog implements Serializable
|
|||
/** 是否请求成功 */
|
||||
@Excel(name = "是否请求成功")
|
||||
private StatusEnum isSuccess;
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.xjs.translation.domain.vo.translation.TranslationVo;
|
|||
public interface TranslationService {
|
||||
|
||||
/**
|
||||
* 调用百度翻译接口
|
||||
* 翻译接口
|
||||
* @param translationQo 翻译条件封装
|
||||
* @return 翻译结果封装
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectApiLogVo">
|
||||
select id, api_name, url, method, request, response, is_success from api_log
|
||||
select id, api_name, url, method, request, response, is_success , create_time from api_log
|
||||
</sql>
|
||||
|
||||
<select id="selectApiLogList" parameterType="com.xjs.log.domain.ApiLog" resultMap="ApiLogResult">
|
||||
|
|
|
|||
Loading…
Reference in New Issue