parent
6fd5a627ed
commit
9cd06ce62b
|
|
@ -1,44 +1,26 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询文案api,通过api获取文案信息列表
|
// 查询文案api,通过api获取文案信息列表
|
||||||
export function listCopywriting(query) {
|
export function listCopyWriting(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/english/copywriting/list',
|
url: '/english/copyWriting/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询文案api,通过api获取文案信息详细
|
// 查询文案api,通过api获取文案信息详细
|
||||||
export function getCopywriting(id) {
|
export function getCopyWriting(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/english/copywriting/' + id,
|
url: '/english/copyWriting/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增文案api,通过api获取文案信息
|
|
||||||
export function addCopywriting(data) {
|
|
||||||
return request({
|
|
||||||
url: '/english/copywriting',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改文案api,通过api获取文案信息
|
|
||||||
export function updateCopywriting(data) {
|
|
||||||
return request({
|
|
||||||
url: '/english/copywriting',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除文案api,通过api获取文案信息
|
// 删除文案api,通过api获取文案信息
|
||||||
export function delCopywriting(id) {
|
export function delCopyWriting(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/english/copywriting/' + id,
|
url: '/english/copyWriting/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,46 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="接口名称" prop="apiName">
|
<el-form-item label="文案内容" prop="content">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.apiName"
|
v-model="queryParams.content"
|
||||||
placeholder="请输入接口名称"
|
placeholder="请输入文案内容"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="文案来源" prop="source">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.source"
|
||||||
|
placeholder="请输入文案来源"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文案类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择文案类型" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.copywriting_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="daterangeCreateTime"
|
||||||
|
size="small"
|
||||||
|
style="width: 240px"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -18,6 +48,10 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
|
|
@ -26,9 +60,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['english:log:remove']"
|
v-hasPermi="['english:copywriting:remove']"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -37,26 +70,23 @@
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['english:log:export']"
|
v-hasPermi="['english:copywriting:export']"
|
||||||
>导出
|
>导出</el-button>
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="copyWritingList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="接口名称" align="center" prop="apiName" :show-overflow-tooltip="true"/>
|
<el-table-column label="文案内容" align="center" prop="content" />
|
||||||
<el-table-column label="请求URL" align="center" prop="url" :show-overflow-tooltip="true"/>
|
<el-table-column label="文案来源" align="center" prop="source" />
|
||||||
<el-table-column label="请求方法" align="center" prop="method" :show-overflow-tooltip="true"/>
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<el-table-column label="请求参数" align="center" prop="request" :show-overflow-tooltip="true"/>
|
</el-table-column>
|
||||||
<el-table-column label="响应参数" align="center" prop="response" :show-overflow-tooltip="true"/>
|
<el-table-column label="文案类型" align="center" prop="type">
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
<template slot-scope="scope">
|
||||||
<el-table-column label="是否请求成功" align="center" prop="isSuccess" :show-overflow-tooltip="true">
|
<dict-tag :options="dict.type.copywriting_type" :value="scope.row.type"/>
|
||||||
<template slot-scope="scope">
|
</template>
|
||||||
<el-tag :type="scope.row.isSuccess==='成功'?'success':'danger'" size="small">{{ scope.row.isSuccess }}</el-tag>
|
</el-table-column>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -64,9 +94,8 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['english:log:remove']"
|
v-hasPermi="['english:copywriting:remove']"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -78,14 +107,25 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改文案api,通过api获取文案信息对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listLog, getLog, delLog} from "@/api/business/english/log";
|
import { listCopyWriting, getCopyWriting, delCopyWriting } from "@/api/business/english/copywriting";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Log",
|
name: "CopyWriting",
|
||||||
|
dicts: ['copywriting_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -100,33 +140,50 @@ export default {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 日志表格数据
|
// 文案api,通过api获取文案信息表格数据
|
||||||
logList: [],
|
copyWritingList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 文案类型时间范围
|
||||||
|
daterangeCreateTime: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
apiName: null
|
content: null,
|
||||||
|
source: null,
|
||||||
|
createTime: null,
|
||||||
|
type: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {}
|
rules: {
|
||||||
|
content: [
|
||||||
|
{ required: true, message: "文案内容不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
source: [
|
||||||
|
{ required: true, message: "文案来源不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询日志列表 */
|
/** 查询文案api,通过api获取文案信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listLog(this.queryParams).then(response => {
|
this.queryParams.params = {};
|
||||||
this.logList = response.rows;
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||||
|
this.queryParams.createTime = this.daterangeCreateTime[0];
|
||||||
|
this.queryParams.endCreateTime = this.daterangeCreateTime[1];
|
||||||
|
}
|
||||||
|
listCopyWriting(this.queryParams).then(response => {
|
||||||
|
this.copyWritingList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|
@ -140,13 +197,10 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
apiName: null,
|
content: null,
|
||||||
url: null,
|
source: null,
|
||||||
method: null,
|
createTime: null,
|
||||||
request: null,
|
type: null
|
||||||
response: null,
|
|
||||||
isSuccess: null,
|
|
||||||
createTime:null
|
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|
@ -157,47 +211,51 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
this.daterangeCreateTime = [];
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 提交按钮 */
|
||||||
handleAdd() {
|
submitForm() {
|
||||||
this.reset();
|
this.$refs["form"].validate(valid => {
|
||||||
this.open = true;
|
if (valid) {
|
||||||
this.title = "添加日志";
|
if (this.form.id != null) {
|
||||||
},
|
updateCopyWriting(this.form).then(response => {
|
||||||
/** 修改按钮操作 */
|
this.$modal.msgSuccess("修改成功");
|
||||||
handleUpdate(row) {
|
this.open = false;
|
||||||
this.reset();
|
this.getList();
|
||||||
const id = row.id || this.ids
|
});
|
||||||
getLog(id).then(response => {
|
} else {
|
||||||
this.form = response.data;
|
addCopyWriting(this.form).then(response => {
|
||||||
this.open = true;
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.title = "修改日志";
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除日志编号为"' + ids + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除文案api,通过api获取文案信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
return delLog(ids);
|
return delCopyWriting(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {
|
}).catch(() => {});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('english/log/export', {
|
this.download('english/copyWriting/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `log_${new Date().getTime()}.xlsx`)
|
}, `copyWriting_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.xjs.common.consts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xiejs
|
||||||
|
* @desc 天行数据平台常量类
|
||||||
|
* @create 2021-12-28
|
||||||
|
*/
|
||||||
|
public class TianXingConst {
|
||||||
|
|
||||||
|
public static final Integer PYQ= 1;
|
||||||
|
public static final Integer WYY= 2;
|
||||||
|
}
|
||||||
|
|
@ -11,9 +11,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
|
|
||||||
SUCCESS(1,"成功"),
|
SUCCESS(1,"成功"),
|
||||||
ERROR(2,"失败"),
|
ERROR(2,"失败");
|
||||||
PYQ(1,"朋友圈文案"),
|
|
||||||
WYY(2,"网易云热评");
|
|
||||||
|
|
||||||
|
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
import com.xjs.common.enums.StatusEnum;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -35,8 +35,13 @@ public class CopyWriting implements Serializable {
|
||||||
|
|
||||||
@Excel(name = "创建时间")
|
@Excel(name = "创建时间")
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endCreateTime;
|
||||||
|
|
||||||
@Excel(name = "文案类型" ,readConverterExp = "1=、朋友圈文案2、网易云热评")
|
@Excel(name = "文案类型" ,readConverterExp = "1=、朋友圈文案2、网易云热评")
|
||||||
private StatusEnum type;
|
private Integer type;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.xjs.common.client.TianXingPYQFeignClient;
|
import com.xjs.common.client.TianXingPYQFeignClient;
|
||||||
import com.xjs.common.config.TianXingProperties;
|
import com.xjs.common.config.TianXingProperties;
|
||||||
import com.xjs.common.enums.StatusEnum;
|
import com.xjs.common.consts.TianXingConst;
|
||||||
import com.xjs.common.exception.ApiException;
|
import com.xjs.common.exception.ApiException;
|
||||||
import com.xjs.copywriting.domain.CopyWriting;
|
import com.xjs.copywriting.domain.CopyWriting;
|
||||||
import com.xjs.copywriting.domain.RequestBody;
|
import com.xjs.copywriting.domain.RequestBody;
|
||||||
|
|
@ -46,7 +46,7 @@ public class TianXingPYQCopyWritingFactory implements CopyWritingFactory {
|
||||||
CopyWriting copyWriting = new CopyWriting();
|
CopyWriting copyWriting = new CopyWriting();
|
||||||
copyWriting.setContent(content);
|
copyWriting.setContent(content);
|
||||||
copyWriting.setSource(source);
|
copyWriting.setSource(source);
|
||||||
copyWriting.setType(StatusEnum.PYQ);
|
copyWriting.setType(TianXingConst.PYQ);
|
||||||
copyWritingMapper.insert(copyWriting);
|
copyWritingMapper.insert(copyWriting);
|
||||||
return copyWriting;
|
return copyWriting;
|
||||||
}else {
|
}else {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.xjs.common.client.TianXingWYYFeignClient;
|
import com.xjs.common.client.TianXingWYYFeignClient;
|
||||||
import com.xjs.common.config.TianXingProperties;
|
import com.xjs.common.config.TianXingProperties;
|
||||||
import com.xjs.common.enums.StatusEnum;
|
import com.xjs.common.consts.TianXingConst;
|
||||||
import com.xjs.common.exception.ApiException;
|
import com.xjs.common.exception.ApiException;
|
||||||
import com.xjs.copywriting.domain.CopyWriting;
|
import com.xjs.copywriting.domain.CopyWriting;
|
||||||
import com.xjs.copywriting.domain.RequestBody;
|
import com.xjs.copywriting.domain.RequestBody;
|
||||||
|
|
@ -46,7 +46,7 @@ public class TianXingWYYCopyWritingFactory implements CopyWritingFactory {
|
||||||
CopyWriting copyWriting = new CopyWriting();
|
CopyWriting copyWriting = new CopyWriting();
|
||||||
copyWriting.setContent(content);
|
copyWriting.setContent(content);
|
||||||
copyWriting.setSource(source);
|
copyWriting.setSource(source);
|
||||||
copyWriting.setType(StatusEnum.WYY);
|
copyWriting.setType(TianXingConst.WYY);
|
||||||
copyWritingMapper.insert(copyWriting);
|
copyWritingMapper.insert(copyWriting);
|
||||||
return copyWriting;
|
return copyWriting;
|
||||||
}else {
|
}else {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class ApiLog implements Serializable
|
||||||
@Excel(name = "是否请求成功")
|
@Excel(name = "是否请求成功")
|
||||||
private StatusEnum isSuccess;
|
private StatusEnum isSuccess;
|
||||||
|
|
||||||
@Excel(name = "创建时间" ,dateFormat = "yyyy-MM-dd")
|
@Excel(name = "创建时间" ,dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectApiLogList" parameterType="com.xjs.log.domain.ApiLog" resultMap="ApiLogResult">
|
<select id="selectApiLogList" parameterType="com.xjs.log.domain.ApiLog" resultMap="ApiLogResult">
|
||||||
<include refid="selectApiLogVo"/>
|
<include refid="selectApiLogVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="apiName != null and apiName != ''"> and api_name like concat('%', #{apiName}, '%')</if>
|
<if test="apiName != null and apiName != ''"> and api_name like concat('%', #{apiName}, '%')</if>
|
||||||
<if test="isSuccess != null "> and is_success = #{isSuccess}</if>
|
<if test="isSuccess != null "> and is_success = #{isSuccess}</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,12 @@
|
||||||
resultMap="CopyWritingResult">
|
resultMap="CopyWritingResult">
|
||||||
<include refid="selectCopyWritingVo"/>
|
<include refid="selectCopyWritingVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="content != null and content != ''">and content = #{content}</if>
|
<if test="content != null and content != ''">and content like concat('%', #{content}, '%') </if>
|
||||||
<if test="source != null and source != ''">and source = #{source}</if>
|
<if test="source != null and source != ''">and source like concat('%', #{source}, '%') </if>
|
||||||
<if test="type != null ">and type = #{type}</if>
|
<if test="type != null ">and type = #{type}</if>
|
||||||
|
<if test="createTime != null and endCreateTime != null"> and create_time between #{createTime} and #{endCreateTime}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCopyWritingById" parameterType="Long" resultMap="CopyWritingResult">
|
<select id="selectCopyWritingById" parameterType="Long" resultMap="CopyWritingResult">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue