Commit 766e9f9d authored by 王晓旭's avatar 王晓旭
parents b4ba2459 619b968b
......@@ -478,7 +478,7 @@ export default {
size: this.rightSize,
matterName: `%${this.rightSearchVal}%`,
siteId: this.siteId,
deptCode: this.leftDept,
deptCode: this.deptSearch,
...search,
});
let { pageInfo, data } = res.data.data;
......
......@@ -238,8 +238,8 @@
<span v-else>--</span>
</template>
<!-- 所属窗口 -->
<template slot="windowName" slot-scope="text">
{{ text.windowName ? text.windowName : "--" }}
<template slot="windowId" slot-scope="text">
{{ text.windowId ? filterWindow(text.windowId) : "--" }}
</template>
<!-- 创建时间 -->
<template slot="time" slot-scope="text">
......@@ -357,7 +357,7 @@ const columns = [
{
title: "所属窗口",
scopedSlots: {
customRender: "windowName",
customRender: "windowId",
},
},
{
......@@ -400,6 +400,7 @@ export default {
siteId: local.getLocal("siteId"),
deptData: [], // 部门数据
windowData: [], // 窗口数据
windowFilterData: [], // 过滤工作人员所属窗口数据
WorkmanData: [], // 工作人员列表
deptSearch: "", //部门搜索
windowSearch: "", // 窗口搜索
......@@ -445,6 +446,9 @@ export default {
});
let { data } = res.data.data;
this.windowData = data;
if (!this.deptSearch) {
this.windowFilterData = data;
}
},
// 获取工作人员列表
async getWorkmanData(search = {}) {
......@@ -637,6 +641,15 @@ export default {
});
return name;
},
// 过滤窗口
filterWindow(id) {
let fromnum = "--";
let row = this.windowFilterData.find((v) => v.id == id);
if (row) {
fromnum = row.fromnum;
}
return fromnum;
},
},
};
</script>
......
......@@ -46,10 +46,6 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
private ValidCodeService validCodeService;
@Autowired
private ResourceService resourceService;
@Autowired
private MenuService menuService;
// @Autowired
// private ITokenService tokenService;
@Autowired
private ICacheService cacheService;
@Autowired
......
......@@ -388,4 +388,19 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
// }
// }).count();
}
public static void main(String[] args) throws Exception {
//eba467f81fb265befdf1f6ab041d39ab 原始admin密码
System.out.println(SecurityUtil.md5DoubleEncoding("adminADMIN@123!@#"));
//宜宾一体化账号密码
System.out.println(SecurityUtil.md5DoubleEncoding("yibinYTH@123!@#"));
//P@ssw0rd123
System.out.println(SecurityUtil.md5DoubleEncoding("P@ssw0rd123"));
}
}
\ No newline at end of file
......@@ -434,14 +434,14 @@ public class MatterDatumEntity extends MatterDatumVo {
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getMaterialName().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof MatterDatumEntity) {
MatterDatumEntity tmp = (MatterDatumEntity) obj;
if (this.getId() == tmp.getId()) {
if (this.getMaterialName() == tmp.getMaterialName()) {
return true;
}
}
......
......@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 事项申请材料
......@@ -58,4 +59,21 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
entity.setDatumFileList(matterDatumFileEntities);
return super.viewAfter(id, model, entity, context);
}
/**
* @param query
* @param model
* @param context
* @return
* @throws AppException
*/
@Override
protected int doListAfter(MatterDatumEntity query, Map<String, Object> model, Context context) throws AppException {
List<MatterDatumEntity> matterDatumEntities = (List<MatterDatumEntity>) model.get(KEY_RESULT_DATA);
//去重复
List<MatterDatumEntity> collect = matterDatumEntities.stream().distinct().collect(Collectors.toList());
model.put(KEY_RESULT_DATA,collect);
return super.doListAfter(query, model, context);
}
}
\ No newline at end of file
package com.mortals.xhx.module.window.service.impl;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.mortals.framework.ap.GlobalSysInfo;
......@@ -25,6 +26,7 @@ import com.mortals.xhx.module.workman.model.WorkmanEntity;
import com.mortals.xhx.module.workman.model.WorkmanQuery;
import com.mortals.xhx.module.workman.service.WorkmanService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -209,9 +211,9 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
protected void saveAfter(WindowEntity entity, Context context) throws AppException {
super.saveAfter(entity, context);
//判断是否存在id,如果不存在 查询后获取
if(entity.newEntity()){
if (entity.newEntity()) {
WindowEntity windowEntity = this.selectOne(new WindowQuery().siteId(entity.getSiteId()).fromnum(entity.getFromnum()));
if(!ObjectUtils.isEmpty(windowEntity)){
if (!ObjectUtils.isEmpty(windowEntity)) {
entity.setId(windowEntity.getId());
}
}
......@@ -238,4 +240,37 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
log.error("异常:", e);
}
}
/**
* @param list
* @param updateSupport
* @param context
* @return
*/
@Override
public String importList(List<WindowEntity> list, Boolean updateSupport, Context context) {
if (ObjectUtils.isEmpty(list)) {
throw new AppException("导入数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (WindowEntity entity : list) {
entity.setCreateUserId(this.getContextUserId(context));
entity.setCreateTime(new Date());
this.save(entity, context);
successNum++;
}
successMsg.insert(0, "数据导入成功!共 " + successNum + " 条");
if (failureNum > 0) {
failureMsg.insert(0, "导入失败!共 " + failureNum + " 条数据格式不正确");
successMsg.append("\n");
successMsg.append(failureMsg);
}
return successMsg.toString();
}
}
\ No newline at end of file
package com.mortals.xhx.module.workman.model.vo;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.workman.model.WorkmanEntity;
import com.mortals.xhx.module.workman.model.WorkmanQuery;
import lombok.Data;
import org.apache.poi.ss.usermodel.PictureData;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.ArrayList;
import java.util.List;
/**
* 工作人员视图对象
*
......@@ -28,4 +34,24 @@ public class WorkmanVo extends BaseEntityLong {
private String filePath;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WorkmanQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<WorkmanQuery> andConditionList;
public static void main(String[] args) {
WorkmanEntity workmanEntity = new WorkmanEntity();
ArrayList<WorkmanQuery> andConditionList = new ArrayList<>();
WorkmanQuery workmanQuery = new WorkmanQuery();
workmanQuery.setName("张三");
workmanQuery.setNumber("123");
andConditionList.add(workmanQuery);
workmanEntity.setAndConditionList(andConditionList);
System.out.println(JSON.toJSONString(workmanEntity));
}
}
\ No newline at end of file
......@@ -80,6 +80,8 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
} else {
entity.setLoginPwd(null);
}
//判断党员是否其它选项,如果
}
......@@ -262,9 +264,7 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
return successMsg.toString();
}
public static void main(String[] args) throws Exception {
System.out.println(SecurityUtil.md5DoubleEncoding("adminADMIN123!@#"));
}
}
\ No newline at end of file
......@@ -14,7 +14,9 @@ Content-Type: application/json
{
"page":1,
"size":10
"size":10,
"andConditionList":[{"name":"%张三%","number":"%123%","deptName":"%123%","windowName":"%123%"}]
}
......
......@@ -38,7 +38,6 @@
"@vue/cli-service": "~5.0.0",
"browserslist": "^4.21.4",
"caniuse-lite": "^1.0.30001442",
"filemanager-webpack-plugin": "^8.0.0",
"less": "^4.0.0",
"less-loader": "^8.0.0",
"postcss": "^8.4.12",
......
......@@ -553,4 +553,5 @@
.addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
border:none !important
}
......@@ -24,7 +24,8 @@ export default {
index:{
type:Number,
default:0
}
},
type:[String]
},
data(){
return{
......@@ -63,7 +64,7 @@ export default {
if(src.search(/http/ig)>-1){
return `${src}`
}else{
return `${process.env.VUE_APP_API_BASE_URL}/${src}`
return this.type=='php'?`${process.env.VUE_APP_API_PHP_URL}/${src}`:`${process.env.VUE_APP_API_BASE_URL}/${src}`
}
},
......
......@@ -17,7 +17,7 @@
<a-form-item label="联系电话:">{{ formState.phone || '--' }}</a-form-item>
<a-form-item label="身份证号:">{{ formState.idcard_IDCardNo || '--' }}</a-form-item>
<a-form-item label="注册时间:">{{ formState.update_time || '--' }}</a-form-item>
<a-form-item label="注册来源:">{{ regType[formState.register_type] || '--' }}</a-form-item>
<a-form-item label="注册来源:">{{ regType[formState.register_type] || '现场注册' }}</a-form-item>
<a-form-item label="户籍地址:">{{ formState.idcard_Address || '--' }}</a-form-item>
</a-form>
</div>
......@@ -57,7 +57,7 @@
{{ formState.idcard_Name }}<a-tag color="green" class="info_tag">实名认证</a-tag>
</div>
<a-row>
<a-col :span="8">年龄:{{ formState.idcard_Name }}</a-col>
<a-col :span="8">年龄:{{ formState.age }}岁</a-col>
<a-col :span="8">性别:{{ formState.idcard_Sex || '--' }}</a-col>
<a-col :span="8">民族:{{ formState.idcard_Nation }}</a-col>
</a-row>
......
......@@ -92,7 +92,7 @@
</div>
<div class="tabFont ellipsis">
样表全称:{{
record.materialFullName ? record.materialFullName : "--"
record.materiaFullName ? record.materiaFullName : "--"
}}
</div>
</template>
......@@ -216,7 +216,7 @@ export default {
"matterName",
"matterFullName",
"materialName",
"materialFullName",
"materiaFullName",
"idName",
"idCard",
"mobile",
......@@ -242,6 +242,8 @@ export default {
},
// 获取报表列表
async togetPrintList(searchForm = {}) {
let list = [];
let listTotal = 0;
let pramse = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
......@@ -261,8 +263,13 @@ export default {
if (code == 1) {
this.tableSourceData = data.data;
this.tablePagination.total = data.total;
return data.data;
list = data.data;
listTotal = data.total;
}
return {
data: list,
total: listTotal,
};
},
// 重置搜索
handleReset() {
......@@ -304,10 +311,9 @@ export default {
1: "本地打印",
2: "在线提交",
};
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
let data = this.$_.cloneDeep(this.tableSelectedRows);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
......@@ -315,27 +321,61 @@ export default {
}
});
});
} else {
data = this.$_.cloneDeep(
await this.togetPrintList({ page: 1, size: -1 })
export2Excel(
this.tHeader,
this.filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
} else {
this.dataSection(this.togetPrintList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
return;
}
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
// 数据切片
async dataSection(fn, searchForm, callback) {
let dataList = [];
let page = 1;
let size = 1000;
let execute = async () => {
let { data, total } = await fn({ page, size, ...searchForm });
dataList = [...dataList, ...data];
this.$app.progressFile.show = true;
this.$app.progressFile.percent = parseInt(
(dataList.length / total) * 100
);
if (dataList.length >= total || data.length == 0) {
if (callback) callback(dataList);
this.$app.progressFile.show = false;
this.$app.progressFile.percent = 1;
return;
}
setTimeout(() => {
page += 1;
execute();
});
};
execute();
},
},
};
</script>
......
......@@ -47,14 +47,14 @@
<div class="infoBox">
<span class="infoTitle imgBox">身份证人像面:</span>
<span class="infoContent">
<thumbImage v-if="userInfo.z_img" :src="userInfo.z_img" fileType="img" />
<thumbImage type="php" v-if="userInfo.z_img" :src="userInfo.z_img" fileType="img" />
<span v-else>--</span>
</span>
</div>
<div class="infoBox">
<span class="infoTitle imgBox">身份证国徽面:</span>
<span class="infoContent">
<thumbImage v-if="userInfo.b_img" :src="userInfo.b_img" fileType="img" />
<thumbImage type="php" v-if="userInfo.b_img" :src="userInfo.b_img" fileType="img" />
<span v-else>--</span>
</span>
</div>
......
......@@ -24,6 +24,9 @@
</a-select>
<a-select v-model="searchForm.id">
<a-select-option value=""> 全部设备 </a-select-option>
<a-select-option :value="0">
小程序
</a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
......
......@@ -190,6 +190,8 @@ export default {
this.togetBillList();
},
async togetBillList(searchForm = {}) {
let list = [];
let listTotal = 0;
let pramse = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
......@@ -208,8 +210,13 @@ export default {
if (code == 1) {
this.tableSourceData = data.data;
this.tablePagination.total = data.total;
return data.data;
list = data.data;
listTotal = data.total;
}
return {
data: list,
total: listTotal,
};
},
// 重置
......@@ -248,31 +255,58 @@ export default {
// 导出
async handleExportTable() {
this.btnLoading = true;
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
let data = [];
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
} else {
data = this.$_.cloneDeep(
await this.togetBillList({ page: 1, size: -1 })
export2Excel(
this.tHeader,
this.filterVal,
data,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
if (!data.length) return;
// for (let item of data) {
// Object.keys(obj).forEach((key) => {
// if (item.type == key) {
// item.type = obj[key];
// }
// });
// }
} else {
this.dataSection(this.togetBillList, {}, (data) => {
if (!data.length) {
this.$message.warning("暂无数据");
return;
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
});
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"样表记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
// 数据切片
async dataSection(fn, searchForm, callback) {
let dataList = [];
let page = 1;
let size = 1000;
let execute = async () => {
let { data, total } = await fn({ page, size, ...searchForm });
dataList = [...dataList, ...data];
this.$app.progressFile.show = true;
this.$app.progressFile.percent = parseInt(
(dataList.length / total) * 100
);
if (dataList.length >= total || data.length == 0) {
if (callback) callback(dataList);
this.$app.progressFile.show = false;
this.$app.progressFile.percent = 1;
return;
}
setTimeout(() => {
page += 1;
execute();
});
};
execute();
},
},
};
</script>
......
......@@ -190,23 +190,25 @@ export default {
async censusListInterface() {
this.siteId = Storage.get(2, "siteId");
let res = await censusListInterface({ siteId: this.siteId });
let {
CensusType_1,
CensusType_2,
CensusType_3,
CensusType_4,
CensusType_5,
} = res.data.data;
if (CensusType_1 && CensusType_1.length)
this.CensusType_1 = CensusType_1.filter((v) => v.status != 0);
if (CensusType_2 && CensusType_2.length)
this.CensusType_2 = CensusType_2.filter((v) => v.status != 0);
if (CensusType_3 && CensusType_3.length)
this.CensusType_3 = CensusType_3.filter((v) => v.status != 0);
if (CensusType_4 && CensusType_4.length)
this.CensusType_4 = CensusType_4.filter((v) => v.status != 0);
if (CensusType_5 && CensusType_5.length)
this.CensusType_5 = CensusType_5.filter((v) => v.status != 0);
if (res.code == 1) {
let {
CensusType_1,
CensusType_2,
CensusType_3,
CensusType_4,
CensusType_5,
} = res.data.data;
if (CensusType_1 && CensusType_1.length)
this.CensusType_1 = CensusType_1.filter((v) => v.status != 0);
if (CensusType_2 && CensusType_2.length)
this.CensusType_2 = CensusType_2.filter((v) => v.status != 0);
if (CensusType_3 && CensusType_3.length)
this.CensusType_3 = CensusType_3.filter((v) => v.status != 0);
if (CensusType_4 && CensusType_4.length)
this.CensusType_4 = CensusType_4.filter((v) => v.status != 0);
if (CensusType_5 && CensusType_5.length)
this.CensusType_5 = CensusType_5.filter((v) => v.status != 0);
}
},
// 查看数据
handleCkeck(path) {
......
......@@ -45,6 +45,7 @@
<div
class="list flex aic jcb"
v-for="(i, j) in listArr[active].curInfo"
:key="j"
>
<div class="app-name">{{ i.appName }}</div>
<img
......@@ -163,10 +164,11 @@ export default {
this.searchVal = "";
},
handleDowload(url, systemServiceName) {
console.log(systemServiceName);
let index = url.lastIndexOf(".");
let suffix = url.slice(index);
const a = document.createElement("a");
a.href = url;
a.download = systemServiceName;
a.download = systemServiceName + suffix;
a.click();
},
//获取列表
......@@ -176,7 +178,6 @@ export default {
i.curInfo = [];
});
this.listArr = [...res.data.data];
console.log(this.listArr);
this.getServiceList();
});
},
......
<template>
<div class="menuMgmt">
<div class="header_box">
<a-button type="primary" class="addclass" @click="showEditModal(1)">新增</a-button>
<a-button type="primary" class="addclass" @click="showEditModal(1)"
>新增</a-button
>
<span>
<a-input v-model="searchForm.name" placeholder="请输入菜单名称搜索">
<a-icon slot="prefix" type="search" />
......@@ -13,7 +15,9 @@
</a-select-option>
</a-select>
<a-button type="primary" class="addclass" @click="searchData">搜索</a-button>
<a-button type="primary" class="addclass" @click="searchData"
>搜索</a-button
>
<a-button @click="resetSearch">重置</a-button>
</span>
</div>
......@@ -89,7 +93,7 @@ export default {
api: process.env.VUE_APP_API_IMG_URL,
EditModalVisible: false,
searchForm: {
name: undefined,
name: "",
parentId: "",
},
tableLoading: false,
......@@ -218,8 +222,8 @@ export default {
// 搜索
async searchData() {
if (this.searchForm.parentId || this.searchForm.name) {
let obj = {...this.searchForm}
obj.name = '%'+this.searchForm.name+'%'
let obj = { ...this.searchForm };
obj.name = "%" + this.searchForm.name + "%";
let res = await menuList({
page: this.tablePagination.current,
size: -1,
......
......@@ -51,7 +51,7 @@
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="network" slot-scope="text, record, index">
<template slot="network" slot-scope="text">
<span
v-for="(item, idx) of dict.network"
v-show="text.indexOf(idx) != -1"
......@@ -61,7 +61,7 @@
</span>
</template>
<template slot="operation" slot-scope="text, record, index">
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm
title="确定要删除此应用吗?"
......@@ -163,7 +163,7 @@ export default {
},
],
query: {
interfaceName: undefined,
interfaceName: "",
interfaceSource: "",
interfaceTag: "",
productId: this.$route.query.id,
......@@ -188,6 +188,7 @@ export default {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.query,
interfaceName: `%${this.query.interfaceName}%`,
}).then((res) => {
if (res.code == 1) {
let { data, total, dict } = res.data;
......
<template>
<a-drawer :destroyOnClose="true" :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible"
@close="resetForm">
<a-form-model ref="ruleForm" :model="detailsForm" :rules="detailsRules" :label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }">
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item label="接口名称" prop="interfaceName">
<a-input v-model="detailsForm.interfaceName" placeholder="请输入" allowClear />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="detailsForm.versionNumber" placeholder="请输入" allowClear />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="请求类型" prop="requestType">
<a-select v-model="detailsForm.requestType" placeholder="请选择" allowClear>
<a-select-option value="1"> POST </a-select-option>
<a-select-option value="2"> GET </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="请求协议" prop="requestProtocol">
<a-select v-model="detailsForm.requestProtocol" placeholder="请选择" allowClear>
<a-select-option value="1"> HTTP </a-select-option>
<a-select-option value="2"> HTTPS </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-drawer
:destroyOnClose="true"
:title="modalInfo.title"
:width="modalInfo.width"
:visible="modalInfo.visible"
@close="resetForm"
>
<a-form-model
ref="ruleForm"
:model="detailsForm"
:rules="detailsRules"
:label-col="{ span: 5 }"
:wrapper-col="{ span: 19 }"
>
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item label="接口名称" prop="interfaceName">
<a-input
v-model="detailsForm.interfaceName"
placeholder="请输入"
allowClear
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="版本号" prop="versionNumber">
<a-input
v-model="detailsForm.versionNumber"
placeholder="请输入"
allowClear
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="请求类型" prop="requestType">
<a-select
v-model="detailsForm.requestType"
placeholder="请选择"
allowClear
>
<a-select-option value="1"> POST </a-select-option>
<a-select-option value="2"> GET </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="请求协议" prop="requestProtocol">
<a-select
v-model="detailsForm.requestProtocol"
placeholder="请选择"
allowClear
>
<a-select-option value="1"> HTTP </a-select-option>
<a-select-option value="2"> HTTPS </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="content-type" prop="contentType">
<a-select v-model="detailsForm.contentType" placeholder="请选择" allowClear>
<a-select-option v-for="item, index in ctList" :key="index" :value="item">{{ item
}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="超时时长" prop="timeoutValue">
<a-input v-model="detailsForm.timeoutValue" placeholder="请输入" allowClear>
<template slot="suffix"></template>
</a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="限流策略" prop="limitStrategy">
<a-select v-model="detailsForm.limitStrategy" placeholder="请选择" allowClear>
<a-select-option value="1"> 分钟 </a-select-option>
<a-select-option value="2"> 小时 </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="访问网络" prop="network">
<a-checkbox-group v-model="detailsForm.network" :options="options" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="接口标签" prop="interfaceTag">
<a-select v-model="detailsForm.interfaceTag" placeholder="请选择" allowClear>
<a-select-option v-for="(item, index) of dict.interfaceTag" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="content-type" prop="contentType">
<a-select
v-model="detailsForm.contentType"
placeholder="请选择"
allowClear
>
<a-select-option
v-for="(item, index) in ctList"
:key="index"
:value="item"
>{{ item }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="超时时长" prop="timeoutValue">
<a-input
v-model="detailsForm.timeoutValue"
placeholder="请输入"
allowClear
>
<template slot="suffix"></template>
</a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="限流策略" prop="limitStrategy">
<a-select
v-model="detailsForm.limitStrategy"
placeholder="请选择"
allowClear
showSearch
optionFilterProp="label"
>
<a-select-option
v-for="(v, key) of dict.limitStrategy"
:key="key"
:value="Number(key)"
:label="v"
>
{{ v }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="访问网络" prop="network">
<a-checkbox-group
v-model="detailsForm.network"
:options="options"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="接口标签" prop="interfaceTag">
<a-select
v-model="detailsForm.interfaceTag"
placeholder="请选择"
allowClear
>
<a-select-option
v-for="(item, index) of dict.interfaceTag"
:key="index"
:value="Number(index)"
>
{{ item }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="接口来源" prop="interfaceSource">
<a-select v-model="detailsForm.interfaceSource" placeholder="请选择" allowClear>
<a-select-option value="1"> 自建发布 </a-select-option>
<a-select-option value="2"> 对接转化 </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="请求路径" prop="requestUrl">
<a-input v-model="detailsForm.requestUrl" placeholder="请输入" allowClear />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="描述" prop="description">
<a-textarea v-model="detailsForm.description" placeholder="请输入" :rows="4" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="接口来源" prop="interfaceSource">
<a-select
v-model="detailsForm.interfaceSource"
placeholder="请选择"
allowClear
>
<a-select-option :value="1"> 自建发布 </a-select-option>
<a-select-option :value="2"> 对接转化 </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="流控信息" prop="authInfo">
<a-input
v-model="detailsForm.authInfo"
placeholder="请输入"
allowClear
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="授权信息" prop="flowInfo">
<a-input
v-model="detailsForm.flowInfo"
placeholder="请输入"
allowClear
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="请求路径" prop="requestUrl">
<a-input
v-model="detailsForm.requestUrl"
placeholder="请输入"
allowClear
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="描述" prop="description">
<a-textarea
v-model="detailsForm.description"
placeholder="请输入"
:rows="4"
/>
</a-form-model-item>
</a-col>
</a-row>
</a-row>
<h1 class="title_">请求参数</h1>
<div class="flex aic jcb mb10">
<a-radio-group
v-model="requestPam.type"
button-style="solid"
@change="onReqType('new')"
>
<a-radio-button value="path"> 路径参数 </a-radio-button>
<a-radio-button value="headers"> headers </a-radio-button>
<a-radio-button value="query"> query </a-radio-button>
<a-radio-button value="body"> body </a-radio-button>
</a-radio-group>
<div class="flex aic">
<div class="mr10">入参是否加密</div>
<a-radio-group v-model="detailsForm.inEncrypt">
<a-radio :value="0">不加密</a-radio>
<a-radio :value="1">加密</a-radio>
</a-radio-group>
</div>
</div>
<h1 class="title_">请求参数</h1>
<div class="flex aic jcb mb10">
<a-radio-group v-model="requestPam.type" button-style="solid" @change="onReqType('new')">
<a-radio-button value="path"> 路径参数 </a-radio-button>
<a-radio-button value="headers"> headers </a-radio-button>
<a-radio-button value="query"> query </a-radio-button>
<a-radio-button value="body"> body </a-radio-button>
</a-radio-group>
<div class="flex aic">
<div class="mr10">入参是否加密</div>
<a-radio-group v-model="detailsForm.inEncrypt">
<a-radio :value="0">不加密</a-radio>
<a-radio :value="1">加密</a-radio>
</a-radio-group>
</div>
</div>
<a-table
size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns"
:dataSource="requestPam.table"
>
<template slot="参数名" slot-scope="text, record">
<a-input v-model="record.name" placeholder="请输入" allowClear />
</template>
<template slot="参数值类型" slot-scope="text, record">
<a-select
v-model="record.type"
placeholder="请选择"
allowClear
:disabled="record.isType"
>
<a-select-option value="String"> String </a-select-option>
<a-select-option value="Int"> Int </a-select-option>
<a-select-option value="Object"> Object </a-select-option>
<a-select-option value="[String]"> [String] </a-select-option>
<a-select-option value="[Int]"> [Int] </a-select-option>
<a-select-option value="[Object]"> [Object] </a-select-option>
</a-select>
</template>
<template slot="默认值" slot-scope="text, record">
<a-input v-model="record.default" placeholder="请输入" allowClear />
</template>
<template slot="是否必填" slot-scope="text, record">
<a-select v-model="record.isMust" placeholder="请选择" allowClear>
<a-select-option value="1"></a-select-option>
<a-select-option value="0"></a-select-option>
</a-select>
</template>
<template slot="描述" slot-scope="text, record">
<a-input v-model="record.describe" placeholder="请输入" allowClear />
</template>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }"
:pagination="false" :columns="table_columns" :dataSource="requestPam.table">
<template slot="参数名" slot-scope="text, record, index">
<a-input v-model="record.name" placeholder="请输入" allowClear />
</template>
<template slot="参数值类型" slot-scope="text, record, index">
<a-select v-model="record.type" placeholder="请选择" allowClear :disabled="record.isType">
<a-select-option value="String"> String </a-select-option>
<a-select-option value="Int"> Int </a-select-option>
<a-select-option value="Object"> Object </a-select-option>
<a-select-option value="[String]"> [String] </a-select-option>
<a-select-option value="[Int]"> [Int] </a-select-option>
<a-select-option value="[Object]"> [Object] </a-select-option>
</a-select>
</template>
<template slot="默认值" slot-scope="text, record, index">
<a-input v-model="record.default" placeholder="请输入" allowClear />
</template>
<template slot="是否必填" slot-scope="text, record, index">
<a-select v-model="record.isMust" placeholder="请选择" allowClear>
<a-select-option value="1"></a-select-option>
<a-select-option value="0"></a-select-option>
</a-select>
</template>
<template slot="描述" slot-scope="text, record, index">
<a-input v-model="record.describe" placeholder="请输入" allowClear />
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button
type="link"
@click="delTabRow('requestPam', index)"
style="color: #ff4420"
>删除</a-button
>
</template>
</a-table>
<div class="table_footer" v-if="requestPam.type != 'path'">
<a-button type="primary" class="addclass" @click="onReqType('add')">
添加参数
</a-button>
</div>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="delTabRow('requestPam', index)" style="color: #ff4420">删除</a-button>
</template>
</a-table>
<div class="table_footer" v-if="requestPam.type != 'path'">
<a-button type="primary" class="addclass" @click="onReqType('add')"> 添加参数 </a-button>
</div>
<div class="flex aic jcb mt20">
<h1 class="title_">响应数据</h1>
<div class="flex aic">
<div class="mr10">出参是否加密</div>
<a-radio-group v-model="detailsForm.outEncrypt">
<a-radio :value="0">不加密</a-radio>
<a-radio :value="1">加密</a-radio>
</a-radio-group>
</div>
</div>
<div class="flex aic jcb mt20">
<h1 class="title_">响应数据</h1>
<div class="flex aic">
<div class="mr10">出参是否加密</div>
<a-radio-group v-model="detailsForm.outEncrypt">
<a-radio :value="0">不加密</a-radio>
<a-radio :value="1">加密</a-radio>
</a-radio-group>
</div>
</div>
<a-table
size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns"
:dataSource="responsePam.table"
>
<template slot="参数名" slot-scope="text, record">
<a-input v-model="record.name" placeholder="请输入" allowClear />
</template>
<template slot="参数值类型" slot-scope="text, record">
<a-select v-model="record.type" placeholder="请选择" allowClear>
<a-select-option value="String"> String </a-select-option>
<a-select-option value="Int"> Int </a-select-option>
<a-select-option value="Object"> Object </a-select-option>
<a-select-option value="[String]"> [String] </a-select-option>
<a-select-option value="[Int]"> [Int] </a-select-option>
<a-select-option value="[Object]"> [Object] </a-select-option>
</a-select>
</template>
<template slot="默认值" slot-scope="text, record">
<a-input v-model="record.default" placeholder="请输入" allowClear />
</template>
<template slot="是否必填" slot-scope="text, record">
<a-select v-model="record.isMust" placeholder="请选择" allowClear>
<a-select-option value="1"></a-select-option>
<a-select-option value="0"></a-select-option>
</a-select>
</template>
<template slot="描述" slot-scope="text, record">
<a-input v-model="record.describe" placeholder="请输入" allowClear />
</template>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }"
:pagination="false" :columns="table_columns" :dataSource="responsePam.table">
<template slot="参数名" slot-scope="text, record, index">
<a-input v-model="record.name" placeholder="请输入" allowClear />
</template>
<template slot="参数值类型" slot-scope="text, record, index">
<a-select v-model="record.type" placeholder="请选择" allowClear>
<a-select-option value="String"> String </a-select-option>
<a-select-option value="Int"> Int </a-select-option>
<a-select-option value="Object"> Object </a-select-option>
<a-select-option value="[String]"> [String] </a-select-option>
<a-select-option value="[Int]"> [Int] </a-select-option>
<a-select-option value="[Object]"> [Object] </a-select-option>
</a-select>
</template>
<template slot="默认值" slot-scope="text, record, index">
<a-input v-model="record.default" placeholder="请输入" allowClear />
</template>
<template slot="是否必填" slot-scope="text, record, index">
<a-select v-model="record.isMust" placeholder="请选择" allowClear>
<a-select-option value="1"></a-select-option>
<a-select-option value="0"></a-select-option>
</a-select>
</template>
<template slot="描述" slot-scope="text, record, index">
<a-input v-model="record.describe" placeholder="请输入" allowClear />
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button
type="link"
@click="delTabRow('responsePam', index)"
style="color: #ff4420"
>删除</a-button
>
</template>
</a-table>
<div class="table_footer">
<a-button type="primary" class="addclass" @click="addResPam">
添加参数
</a-button>
</div>
<!-- 变更记录 -->
<div class="flex aic jcb mt20">
<h1 class="title_">变更记录</h1>
</div>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="delTabRow('responsePam', index)" style="color: #ff4420">删除</a-button>
</template>
</a-table>
<div class="table_footer">
<a-button type="primary" class="addclass" @click="addResPam"> 添加参数 </a-button>
</div>
<div class="drawer_footer">
<a-button type="primary" class="addclass" @click="modalSubmit"> 保存 </a-button>
<a-button @click="resetForm"> 取消 </a-button>
</div>
</a-form-model>
</a-drawer>
<a-table
size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns2"
:dataSource="updatePam.table"
>
<template slot="版本号" slot-scope="text, record">
<a-input v-model="record.version" placeholder="请输入" allowClear />
</template>
<template slot="变更说明" slot-scope="text, record">
<a-input v-model="record.remark" placeholder="请输入" allowClear />
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button
type="link"
@click="delTabRow('updatePam', index)"
style="color: #ff4420"
>删除</a-button
>
</template>
</a-table>
<div class="table_footer">
<a-button type="primary" class="addclass" @click="addUpdatePam">
添加记录
</a-button>
</div>
<div class="drawer_footer">
<a-button type="primary" class="addclass" @click="modalSubmit">
保存
</a-button>
<a-button @click="resetForm"> 取消 </a-button>
</div>
</a-form-model>
</a-drawer>
</template>
<script>
import modal from "../mixins/modal";
import {
getInterfaceSave, getInterfaceInfo
} from '@/api/thePlatformIsSet.js'
import { getInterfaceSave, getInterfaceInfo } from "@/api/thePlatformIsSet.js";
export default {
mixins: [modal],
name: "PortalAdminVuePicWorks",
props: ["dict"],
data() {
return {
detailsForm: {
productId: this.$route.query.id,
interfaceName: undefined,
versionNumber: undefined,
requestType: undefined,
requestProtocol: undefined,
requestUrl: undefined,
timeoutValue: undefined,
timeoutValue: undefined,
network: undefined,
description: undefined,
flowControl: undefined,
authorizeInfo: undefined,
contentType: undefined,
interfaceTag: undefined,
inEncrypt: 0,
outEncrypt: 0
},
detailsRules: {
interfaceName: [{ required: true, message: "请输入", trigger: "blur" }],
versionNumber: [{ required: true, message: "请输入", trigger: "blur" }],
requestType: [{ required: true, message: "请选择", trigger: "change" }],
requestProtocol: [{ required: true, message: "请选择", trigger: "change" }],
requestUrl: [{ required: true, message: "请输入", trigger: "blur" }],
timeoutValue: [{ required: true, message: "请输入", trigger: "blur" }],
},
options: [{
label: "互联网",
value: "1",
},
{
label: "政务网",
value: "2",
},
],
table_columns: [{
title: "参数名",
align: "center",
dataIndex: "name",
scopedSlots: {
customRender: "参数名",
},
},
{
title: "参数值类型",
align: "center",
dataIndex: "type",
scopedSlots: {
customRender: "参数值类型",
},
},
{
title: "默认值",
align: "center",
dataIndex: "default",
scopedSlots: {
customRender: "默认值",
},
},
{
title: "是否必填",
align: "center",
dataIndex: "isMust",
scopedSlots: {
customRender: "是否必填",
},
},
{
title: "描述",
align: "center",
dataIndex: "describe",
scopedSlots: {
customRender: "描述",
},
width: 200
},
mixins: [modal],
name: "PortalAdminVuePicWorks",
props: ["dict"],
data() {
return {
detailsForm: {
productId: this.$route.query.id,
interfaceName: "",
versionNumber: "",
requestType: undefined,
requestProtocol: undefined,
requestUrl: "",
timeoutValue: "",
timeoutValue: "",
network: [],
description: "",
flowControl: "",
authorizeInfo: "",
contentType: undefined,
interfaceTag: undefined,
authInfo: "", // 授权信息
flowInfo: "", // 流控信息
// 变更信息
productInterfaceLogList: [],
inEncrypt: 0,
outEncrypt: 0,
},
detailsRules: {
interfaceName: [{ required: true, message: "请输入", trigger: "blur" }],
versionNumber: [{ required: true, message: "请输入", trigger: "blur" }],
requestType: [{ required: true, message: "请选择", trigger: "change" }],
requestProtocol: [
{ required: true, message: "请选择", trigger: "change" },
],
requestUrl: [{ required: true, message: "请输入", trigger: "blur" }],
timeoutValue: [{ required: true, message: "请输入", trigger: "blur" }],
},
options: [
{
label: "互联网",
value: "1",
},
{
label: "政务网",
value: "2",
},
],
table_columns: [
{
title: "参数名",
align: "center",
dataIndex: "name",
scopedSlots: {
customRender: "参数名",
},
},
{
title: "参数值类型",
align: "center",
dataIndex: "type",
scopedSlots: {
customRender: "参数值类型",
},
},
{
title: "默认值",
align: "center",
dataIndex: "default",
scopedSlots: {
customRender: "默认值",
},
},
{
title: "是否必填",
align: "center",
dataIndex: "isMust",
scopedSlots: {
customRender: "是否必填",
},
},
{
title: "描述",
align: "center",
dataIndex: "describe",
scopedSlots: {
customRender: "描述",
},
width: 200,
},
{
title: "操作",
align: "center",
width: "60px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
},
],
table_columns2: [
{
title: "版本号",
align: "center",
width: "18%",
scopedSlots: {
customRender: "版本号",
},
},
{
title: "变更说明",
align: "center",
scopedSlots: {
customRender: "变更说明",
},
},
{
title: "操作",
align: "center",
width: "60px",
scopedSlots: {
customRender: "operation",
},
},
],
requestPam: {
type: "path",
table: [],
},
responsePam: {
table: [
{
name: ``,
type: undefined,
default: ``,
isMust: undefined,
describe: ``,
},
],
},
updatePam: {
table: [
{
version: ``,
remark: ``,
},
],
},
errorCode_columns: [
{
title: "Http Code",
align: "center",
dataIndex: "httpCode",
scopedSlots: {
customRender: "Http Code",
},
},
{
title: "Error Code",
align: "center",
dataIndex: "errorCode",
scopedSlots: {
customRender: "Error Code",
},
},
{
title: "错误信息",
align: "center",
dataIndex: "errorMessage",
scopedSlots: {
customRender: "错误信息",
},
},
{
title: "操作",
align: "center",
width: "60px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
},
],
errorCode: [
{
httpCode: ``,
errorCode: ``,
errorMessage: ``,
},
],
changeHistory_columns: [
{
title: "变更时间",
align: "center",
dataIndex: "time",
scopedSlots: {
customRender: "变更时间",
},
},
{
title: "变更内容概要",
align: "center",
dataIndex: "content",
scopedSlots: {
customRender: "变更内容概要",
},
},
],
changeHistory: [
{
time: "",
content: "",
},
],
ctList: [
"text/html",
"text/xml",
"application/json",
"application/xml",
"application/x-www-form-urlencoded",
"multipart/form-data",
],
};
},
{
title: "操作",
align: "center",
width: "60px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
},
],
requestPam: {
type: 'path',
table: []
},
responsePam: {
table: [{
name: ``,
type: undefined,
default: ``,
isMust: undefined,
describe: ``,
}]
},
errorCode_columns: [{
title: "Http Code",
align: "center",
dataIndex: "httpCode",
scopedSlots: {
customRender: "Http Code",
}
},
{
title: "Error Code",
align: "center",
dataIndex: "errorCode",
scopedSlots: {
customRender: "Error Code",
},
},
{
title: "错误信息",
align: "center",
dataIndex: "errorMessage",
scopedSlots: {
customRender: "错误信息",
},
},
{
title: "操作",
align: "center",
width: "60px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
}
],
errorCode: [{
httpCode: ``,
errorCode: ``,
errorMessage: ``
}],
changeHistory_columns: [{
title: "变更时间",
align: "center",
dataIndex: "time",
scopedSlots: {
customRender: "变更时间",
}
},
{
title: "变更内容概要",
align: "center",
dataIndex: "content",
scopedSlots: {
customRender: "变更内容概要",
},
}
],
changeHistory: [{
time: '',
content: ''
}],
ctList: ["text/html", "text/xml", "application/json", "application/xml", "application/x-www-form-urlencoded", "multipart/form-data"]
};
},
mounted() {},
mounted() { },
methods: {
getInfo(id) {
getInterfaceInfo({ id: id }).then((res) => {
res.data.network = res.data.network.split(",");
this.detailsForm = res.data;
this.requestPam = JSON.parse(res.data.requestParameters);
this.responsePam = JSON.parse(res.data.responseParameters);
this.updatePam.table = this.detailsForm.productInterfaceLogList || [];
});
},
modalSubmit() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
let json = JSON.parse(JSON.stringify(this.detailsForm));
if (json.network.length) json.network = json.network.join(",");
json.requestParameters = JSON.stringify(this.requestPam);
json.responseParameters = JSON.stringify(this.responsePam);
json.productInterfaceLogList = this.updatePam.table;
getInterfaceSave(json).then((res) => {
let { code } = res;
if (code == 1) {
this.$message.success("保存成功");
this.resetForm();
this.modalInfo.visible = false;
this.$parent.getList();
}
});
} else {
return false;
}
});
},
//type
onReqType(type) {
let index = this.requestPam.type;
if (index == "path") {
this.requestPam.table = [];
} else {
let obj = {
name: ``,
type: "String",
default: ``,
isMust: undefined,
describe: ``,
isType: true,
};
if (index == "body") {
obj.isType = false;
}
if (type == "new") {
this.requestPam.table = [obj];
} else {
this.requestPam.table.push(obj);
}
}
},
addResPam() {
this.responsePam.table.push({
name: ``,
type: undefined,
default: ``,
isMust: undefined,
describe: ``,
});
},
methods: {
getInfo(id) {
getInterfaceInfo({ id: id }).then(res => {
res.data.network = res.data.network.split(',')
this.detailsForm = res.data
this.requestPam = JSON.parse(res.data.requestParameters)
this.responsePam = JSON.parse(res.data.responseParameters)
})
},
modalSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let json = JSON.parse(JSON.stringify(this.detailsForm))
if (json.network.length) json.network = json.network.join(',')
json.requestParameters = JSON.stringify(this.requestPam)
json.responseParameters = JSON.stringify(this.responsePam)
getInterfaceSave(json).then(res => {
let { code, msg } = res
if (code == 1) {
this.$message.success('保存成功');
this.resetForm();
this.modalInfo.visible = false
this.$parent.getList()
} else {
this.$message.error(msg);
}
})
} else {
return false;
}
});
},
//type
onReqType(type) {
let index = this.requestPam.type
if (index == 'path') {
this.requestPam.table = []
} else {
let obj = {
name: ``,
type: 'String',
default: ``,
isMust: undefined,
describe: ``,
isType: true
}
if (index == 'body') {
obj.isType = false
}
if (type == 'new') {
this.requestPam.table = [obj]
} else {
this.requestPam.table.push(obj)
}
}
},
addResPam() {
this.responsePam.table.push({
name: ``,
type: undefined,
default: ``,
isMust: undefined,
describe: ``,
})
},
delTabRow(key, index) {
this[key].table.splice(index, 1)
},
resetForm() {
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
this.detailsForm.id=""
this.requestPam = {
type: 'path',
table: []
}
this.responsePam = {
table: [{
name: ``,
type: undefined,
default: ``,
isMust: undefined,
describe: ``,
}]
}
this.modalInfo.visible = false;
});
}
},
addUpdatePam() {
this.updatePam.table.push({
version: ``,
remark: ``,
});
},
delTabRow(key, index) {
this[key].table.splice(index, 1);
},
resetForm() {
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
this.detailsForm.id = "";
this.requestPam = {
type: "path",
table: [],
};
this.responsePam = {
table: [
{
name: ``,
type: undefined,
default: ``,
isMust: undefined,
describe: ``,
},
],
};
this.updatePam = {
table: [
{
version: ``,
remark: ``,
},
],
};
this.modalInfo.visible = false;
});
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-drawer-content {
overflow-x: hidden !important;
overflow-x: hidden !important;
}
.drawer_footer {
z-index: 1;
text-align: left;
background: #fff;
padding: 10px 16px;
border-top: 1px solid #e9e9e9;
width: 100%;
bottom: 0;
right: 0;
position: absolute;
z-index: 1;
text-align: left;
background: #fff;
padding: 10px 16px;
border-top: 1px solid #e9e9e9;
width: 100%;
bottom: 0;
right: 0;
position: absolute;
}
.title_ {
font-size: 16px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
font-size: 16px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
}
.table_footer {
text-align: center;
padding-top: 10px;
text-align: center;
padding-top: 10px;
}
/deep/.ant-drawer-body {
margin-bottom: 100px;
margin-bottom: 100px;
}
</style>
\ No newline at end of file
......@@ -2,11 +2,7 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<a-button
type="primary"
class="addclass"
@click="openDetails()"
>
<a-button type="primary" class="addclass" @click="openDetails()">
<span>新增</span>
</a-button>
</div>
......@@ -30,10 +26,7 @@
</a-select-option>
</a-select>
<a-button
type="primary"
class="addclass"
@click="getList()"
<a-button type="primary" class="addclass" @click="getList()"
>搜索</a-button
>
</span>
......@@ -50,11 +43,11 @@
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index">
<template slot="operation" slot-scope="text, record">
<a-button
type="link"
v-if="record.appFileUrl"
@click="handleDowload(record.appFileUrl)"
@click="handleDowload(record.appFileUrl, record.appName)"
>下载应用</a-button
>
<a-button type="link" @click="openDetails(record)">编辑</a-button>
......@@ -83,6 +76,7 @@ export default {
name: "PortalAdminVueAlerting",
data() {
return {
api: process.env.VUE_APP_API_IMG_URL,
tableHeaders: [
{
title: "序号",
......@@ -194,11 +188,12 @@ export default {
}
});
},
handleDowload(url) {
let arr = url.split("/");
handleDowload(url, fileName) {
let index = url.lastIndexOf(".");
let suffix = url.slice(index);
const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL + "/" + url;
a.download = arr[arr.length - 1];
a.href = this.api + url;
a.download = fileName + suffix;
a.click();
},
openDetails(item) {
......
......@@ -31,11 +31,11 @@
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index">
<template slot="operation" slot-scope="text, record">
<a-button
type="link"
v-if="record.docFileUrl"
@click="handleDowload(record.docFileUrl)"
@click="handleDowload(record.docFileUrl, record.docName)"
>下载</a-button
>
<a-button type="link" @click="openDetails(record)">编辑</a-button>
......@@ -63,6 +63,7 @@ export default {
name: "PortalAdminVueAlerting",
data() {
return {
api: process.env.VUE_APP_API_IMG_URL,
tableHeaders: [
{
title: "序号",
......@@ -159,11 +160,12 @@ export default {
}
});
},
handleDowload(url) {
let arr = url.split("/");
handleDowload(url, fileName) {
let index = url.lastIndexOf(".");
let suffix = url.slice(index);
const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL + "/" + url;
a.download = arr[arr.length - 1];
a.href = this.api + url;
a.download = fileName + suffix;
a.click();
},
openDetails(item) {
......
const { defineConfig } = require("@vue/cli-service");
const FileManagerPlugin = require("filemanager-webpack-plugin"); // 压缩文件夹
const isDev = process.env.NODE_ENV === "development";
let plugins = [];
// 避免打本地启项目时自动打zip包
if (!isDev) {
plugins.push(
new FileManagerPlugin({
events: {
onEnd: {
// mkdir: ["./dist"],
delete: ["./zip/"],
copy: [{ source: "./dist", destination: "./zip/dist" }],
archive: [{ source: "./zip", destination: "./zip/门户系统.zip" }],
},
},
})
);
}
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
// 打包目录
outputDir: "dist",
configureWebpack: {
plugins: [...plugins],
plugins: [],
},
devServer: {
proxy: {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
ALTER TABLE mortals_xhx_product_interface ADD COLUMN `authInfo` varchar(255) COMMENT '授权信息' ;
ALTER TABLE mortals_xhx_product_interface ADD COLUMN `flowInfo` varchar(255) COMMENT '流控信息' ;
-- ----------------------------
-- 产品接口表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_product_interface_log`;
CREATE TABLE mortals_xhx_product_interface_log(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`interfaceId` bigint(20) COMMENT '接口id',
`requestParameters` text COMMENT '请求参数',
`version` varchar(255) COMMENT '版本号',
`content` varchar(255) COMMENT '内容说明',
`remark` varchar(255) COMMENT '备注',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品接口';
......@@ -61,7 +61,7 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dbasedir="$BASEDIR" \
-Djava.io.tmpdir=$TEMP_PATH \
-Dloader.path="file://$BASEDIR/conf,file://$BASEDIR/lib" \
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5505 \
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=21072 \
-jar $MAIN_CLASS \
> /dev/null &
......
......@@ -16,11 +16,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* token验证处理
......@@ -48,7 +50,7 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
@Value("${token.prefix:}")
private String tokenPrefix;
protected static final Long MILLIS_SECOND = 1000l;
protected static final Long MILLIS_SECOND = 1l;
protected static final Long MILLIS_MINUTE = 60 * MILLIS_SECOND;
......@@ -235,6 +237,15 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
public String createToken(IUser user) {
// String token = IdUtil.fastSimpleUUID();
// user.setToken(token);
//todo 删除当前用户之前的令牌
if (!user.isAdmin()) {
Set<String> keys = cacheService.scan(SysConstains.LOGIN_TOKEN_KEY + user.getId());
if (!ObjectUtils.isEmpty(keys)) {
for (String key : keys) {
cacheService.del(key);
}
}
}
refreshToken(user);
Map<String, Object> claims = new HashMap<>();
claims.put(SysConstains.LOGIN_USER_KEY, user.getToken());
......@@ -283,7 +294,7 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
.setExpiration(DateUtils.addCurrDate(7))
.setClaims(claims)
.signWith(SignatureAlgorithm.HS256, Base64.getEncoder()
.encodeToString(secret.getBytes())).compact();
.encodeToString(secret.getBytes())).compact();
return token;
}
......
......@@ -41,8 +41,6 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@Autowired
private MenuService menuService;
@Autowired
private ICacheService cacheService;
@Autowired
private IAuthTokenService authTokenService;
@Autowired
private IApiModelFeign apiModelFeign;
......@@ -67,9 +65,9 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
userEntity.setLoginTime(System.currentTimeMillis());
String tmpToken = userEntity.getId() + ":" + IdUtil.fastSimpleUUID();
userEntity.setToken(tmpToken);
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
userEntity.setExpireTime(DateUtils.addCurrDate(3).getTime());
String token = authTokenService.createToken(userEntity);
//删除之前登录的token
data.put("token", token);
List<MenuEntity> menuList = menuService.findTreeMenuByUser(userEntity);
userEntity.setMenuList(menuList);
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum LimitStrategyEnum {
不限流(0, "不限流"),
一万次日(1, "10000次/日"),
一千次日(2, "1000次/日"),
一百次日(3, "100次/日"),
一千次小时(4, "1000次/小时"),
一百次小时(5, "100次/小时"),
一百次分钟(6, "100次/分钟"),
十次分钟(7, "10次/分钟"),
一次分钟(8, "1次/分钟");
private Integer value;
private String desc;
LimitStrategyEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static LimitStrategyEnum getByValue(Integer value) {
for (LimitStrategyEnum statusEnum : LimitStrategyEnum.values()) {
if (statusEnum.getValue() == value) {
return statusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (LimitStrategyEnum item : LimitStrategyEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import java.util.List;
/**
* 产品接口Dao
* 产品接口 DAO接口
*
* @author zxfei
* @date 2023-07-18
*/
public interface ProductInterfaceLogDao extends ICRUDDao<ProductInterfaceLogEntity,Long>{
}
package com.mortals.xhx.module.product.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.product.dao.ProductInterfaceLogDao;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品接口DaoImpl DAO接口
*
* @author zxfei
* @date 2023-07-18
*/
@Repository("productInterfaceLogDao")
public class ProductInterfaceLogDaoImpl extends BaseCRUDDaoMybatis<ProductInterfaceLogEntity,Long> implements ProductInterfaceLogDao {
}
package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import lombok.Data;
/**
* 产品接口实体对象
*
* @author zxfei
* @date 2023-05-29
* @date 2023-07-18
*/
@Data
public class ProductInterfaceEntity extends ProductInterfaceVo {
......@@ -38,7 +45,7 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
/**
* 超时时间(秒)
*/
private Long timeoutValue;
private Integer timeoutValue;
/**
* 限流策略1:分钟,2:小时
*/
......@@ -91,6 +98,25 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 异常返回示例
*/
private String abnormalResponse;
/**
* 授权信息
*/
private String authInfo;
/**
* 流控信息
*/
private String flowInfo;
/**
* 产品接口信息
*/
private List<ProductInterfaceLogEntity> productInterfaceLogList=new ArrayList<>();;
public List<ProductInterfaceLogEntity> getProductInterfaceLogList(){
return productInterfaceLogList;
}
public void setProductInterfaceLogList(List<ProductInterfaceLogEntity> productInterfaceLogList){
this.productInterfaceLogList = productInterfaceLogList;
}
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -121,7 +147,7 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.requestUrl = "";
this.timeoutValue = -1L;
this.timeoutValue = -1;
this.limitStrategy = -1;
......@@ -148,5 +174,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.normalResponse = "";
this.abnormalResponse = "";
this.authInfo = "";
this.flowInfo = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceLogVo;
import lombok.Data;
/**
* 产品接口实体对象
*
* @author zxfei
* @date 2023-07-18
*/
@Data
public class ProductInterfaceLogEntity extends ProductInterfaceLogVo {
private static final long serialVersionUID = 1L;
/**
* 接口id
*/
private Long interfaceId;
/**
* 请求参数
*/
private String requestParameters;
/**
* 版本号
*/
private String version;
/**
* 内容说明
*/
private String content;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof ProductInterfaceLogEntity) {
ProductInterfaceLogEntity tmp = (ProductInterfaceLogEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.interfaceId = -1L;
this.requestParameters = "";
this.version = "";
this.content = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.model;
import java.util.List;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
/**
* 产品接口查询对象
*
* @author zxfei
* @date 2023-07-18
*/
public class ProductInterfaceLogQuery extends ProductInterfaceLogEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
/** 结束 序号,主键,自增长 */
private Long idEnd;
/** 增加 序号,主键,自增长 */
private Long idIncrement;
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 接口id */
private Long interfaceIdStart;
/** 结束 接口id */
private Long interfaceIdEnd;
/** 增加 接口id */
private Long interfaceIdIncrement;
/** 接口id列表 */
private List <Long> interfaceIdList;
/** 接口id排除列表 */
private List <Long> interfaceIdNotList;
/** 请求参数 */
private List<String> requestParametersList;
/** 请求参数排除列表 */
private List <String> requestParametersNotList;
/** 版本号 */
private List<String> versionList;
/** 版本号排除列表 */
private List <String> versionNotList;
/** 内容说明 */
private List<String> contentList;
/** 内容说明排除列表 */
private List <String> contentNotList;
/** 备注 */
private List<String> remarkList;
/** 备注排除列表 */
private List <String> remarkNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceLogQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<ProductInterfaceLogQuery> andConditionList;
public ProductInterfaceLogQuery(){}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 接口id
* @return interfaceIdStart
*/
public Long getInterfaceIdStart(){
return this.interfaceIdStart;
}
/**
* 设置 开始 接口id
* @param interfaceIdStart
*/
public void setInterfaceIdStart(Long interfaceIdStart){
this.interfaceIdStart = interfaceIdStart;
}
/**
* 获取 结束 接口id
* @return $interfaceIdEnd
*/
public Long getInterfaceIdEnd(){
return this.interfaceIdEnd;
}
/**
* 设置 结束 接口id
* @param interfaceIdEnd
*/
public void setInterfaceIdEnd(Long interfaceIdEnd){
this.interfaceIdEnd = interfaceIdEnd;
}
/**
* 获取 增加 接口id
* @return interfaceIdIncrement
*/
public Long getInterfaceIdIncrement(){
return this.interfaceIdIncrement;
}
/**
* 设置 增加 接口id
* @param interfaceIdIncrement
*/
public void setInterfaceIdIncrement(Long interfaceIdIncrement){
this.interfaceIdIncrement = interfaceIdIncrement;
}
/**
* 获取 接口id
* @return interfaceIdList
*/
public List<Long> getInterfaceIdList(){
return this.interfaceIdList;
}
/**
* 设置 接口id
* @param interfaceIdList
*/
public void setInterfaceIdList(List<Long> interfaceIdList){
this.interfaceIdList = interfaceIdList;
}
/**
* 获取 接口id
* @return interfaceIdNotList
*/
public List<Long> getInterfaceIdNotList(){
return this.interfaceIdNotList;
}
/**
* 设置 接口id
* @param interfaceIdNotList
*/
public void setInterfaceIdNotList(List<Long> interfaceIdNotList){
this.interfaceIdNotList = interfaceIdNotList;
}
/**
* 获取 请求参数
* @return requestParametersList
*/
public List<String> getRequestParametersList(){
return this.requestParametersList;
}
/**
* 设置 请求参数
* @param requestParametersList
*/
public void setRequestParametersList(List<String> requestParametersList){
this.requestParametersList = requestParametersList;
}
/**
* 获取 请求参数
* @return requestParametersNotList
*/
public List<String> getRequestParametersNotList(){
return this.requestParametersNotList;
}
/**
* 设置 请求参数
* @param requestParametersNotList
*/
public void setRequestParametersNotList(List<String> requestParametersNotList){
this.requestParametersNotList = requestParametersNotList;
}
/**
* 获取 版本号
* @return versionList
*/
public List<String> getVersionList(){
return this.versionList;
}
/**
* 设置 版本号
* @param versionList
*/
public void setVersionList(List<String> versionList){
this.versionList = versionList;
}
/**
* 获取 版本号
* @return versionNotList
*/
public List<String> getVersionNotList(){
return this.versionNotList;
}
/**
* 设置 版本号
* @param versionNotList
*/
public void setVersionNotList(List<String> versionNotList){
this.versionNotList = versionNotList;
}
/**
* 获取 内容说明
* @return contentList
*/
public List<String> getContentList(){
return this.contentList;
}
/**
* 设置 内容说明
* @param contentList
*/
public void setContentList(List<String> contentList){
this.contentList = contentList;
}
/**
* 获取 内容说明
* @return contentNotList
*/
public List<String> getContentNotList(){
return this.contentNotList;
}
/**
* 设置 内容说明
* @param contentNotList
*/
public void setContentNotList(List<String> contentNotList){
this.contentNotList = contentNotList;
}
/**
* 获取 备注
* @return remarkList
*/
public List<String> getRemarkList(){
return this.remarkList;
}
/**
* 设置 备注
* @param remarkList
*/
public void setRemarkList(List<String> remarkList){
this.remarkList = remarkList;
}
/**
* 获取 备注
* @return remarkNotList
*/
public List<String> getRemarkNotList(){
return this.remarkNotList;
}
/**
* 设置 备注
* @param remarkNotList
*/
public void setRemarkNotList(List<String> remarkNotList){
this.remarkNotList = remarkNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 序号,主键,自增长
* @param id
*/
public ProductInterfaceLogQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public ProductInterfaceLogQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public ProductInterfaceLogQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public ProductInterfaceLogQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public ProductInterfaceLogQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public ProductInterfaceLogQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 接口id
* @param interfaceId
*/
public ProductInterfaceLogQuery interfaceId(Long interfaceId){
setInterfaceId(interfaceId);
return this;
}
/**
* 设置 开始 接口id
* @param interfaceIdStart
*/
public ProductInterfaceLogQuery interfaceIdStart(Long interfaceIdStart){
this.interfaceIdStart = interfaceIdStart;
return this;
}
/**
* 设置 结束 接口id
* @param interfaceIdEnd
*/
public ProductInterfaceLogQuery interfaceIdEnd(Long interfaceIdEnd){
this.interfaceIdEnd = interfaceIdEnd;
return this;
}
/**
* 设置 增加 接口id
* @param interfaceIdIncrement
*/
public ProductInterfaceLogQuery interfaceIdIncrement(Long interfaceIdIncrement){
this.interfaceIdIncrement = interfaceIdIncrement;
return this;
}
/**
* 设置 接口id
* @param interfaceIdList
*/
public ProductInterfaceLogQuery interfaceIdList(List<Long> interfaceIdList){
this.interfaceIdList = interfaceIdList;
return this;
}
/**
* 设置 接口id
* @param interfaceIdNotList
*/
public ProductInterfaceLogQuery interfaceIdNotList(List<Long> interfaceIdNotList){
this.interfaceIdNotList = interfaceIdNotList;
return this;
}
/**
* 设置 请求参数
* @param requestParameters
*/
public ProductInterfaceLogQuery requestParameters(String requestParameters){
setRequestParameters(requestParameters);
return this;
}
/**
* 设置 请求参数
* @param requestParametersList
*/
public ProductInterfaceLogQuery requestParametersList(List<String> requestParametersList){
this.requestParametersList = requestParametersList;
return this;
}
/**
* 设置 版本号
* @param version
*/
public ProductInterfaceLogQuery version(String version){
setVersion(version);
return this;
}
/**
* 设置 版本号
* @param versionList
*/
public ProductInterfaceLogQuery versionList(List<String> versionList){
this.versionList = versionList;
return this;
}
/**
* 设置 内容说明
* @param content
*/
public ProductInterfaceLogQuery content(String content){
setContent(content);
return this;
}
/**
* 设置 内容说明
* @param contentList
*/
public ProductInterfaceLogQuery contentList(List<String> contentList){
this.contentList = contentList;
return this;
}
/**
* 设置 备注
* @param remark
*/
public ProductInterfaceLogQuery remark(String remark){
setRemark(remark);
return this;
}
/**
* 设置 备注
* @param remarkList
*/
public ProductInterfaceLogQuery remarkList(List<String> remarkList){
this.remarkList = remarkList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public ProductInterfaceLogQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public ProductInterfaceLogQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public ProductInterfaceLogQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public ProductInterfaceLogQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public ProductInterfaceLogQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public ProductInterfaceLogQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public ProductInterfaceLogQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public ProductInterfaceLogQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public ProductInterfaceLogQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public ProductInterfaceLogQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public ProductInterfaceLogQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public ProductInterfaceLogQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<ProductInterfaceLogQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<ProductInterfaceLogQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<ProductInterfaceLogQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<ProductInterfaceLogQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.List;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
/**
* 产品接口查询对象
*
* @author zxfei
* @date 2023-05-29
* @date 2023-07-18
*/
public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */
......@@ -84,19 +86,19 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 请求路径排除列表 */
private List <String> requestUrlNotList;
/** 开始 超时时间(秒) */
private Long timeoutValueStart;
private Integer timeoutValueStart;
/** 结束 超时时间(秒) */
private Long timeoutValueEnd;
private Integer timeoutValueEnd;
/** 增加 超时时间(秒) */
private Long timeoutValueIncrement;
private Integer timeoutValueIncrement;
/** 超时时间(秒)列表 */
private List <Long> timeoutValueList;
private List <Integer> timeoutValueList;
/** 超时时间(秒)排除列表 */
private List <Long> timeoutValueNotList;
private List <Integer> timeoutValueNotList;
/** 开始 限流策略1:分钟,2:小时 */
private Integer limitStrategyStart;
......@@ -203,6 +205,26 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 接口描述排除列表 */
private List <String> remarkNotList;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** 授权信息 */
private List<String> authInfoList;
/** 授权信息排除列表 */
private List <String> authInfoNotList;
/** 流控信息 */
private List<String> flowInfoList;
/** 流控信息排除列表 */
private List <String> flowInfoNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
......@@ -245,16 +267,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceQuery> orConditionList;
......@@ -687,7 +699,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 开始 超时时间(秒)
* @return timeoutValueStart
*/
public Long getTimeoutValueStart(){
public Integer getTimeoutValueStart(){
return this.timeoutValueStart;
}
......@@ -695,7 +707,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 开始 超时时间(秒)
* @param timeoutValueStart
*/
public void setTimeoutValueStart(Long timeoutValueStart){
public void setTimeoutValueStart(Integer timeoutValueStart){
this.timeoutValueStart = timeoutValueStart;
}
......@@ -703,7 +715,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 结束 超时时间(秒)
* @return $timeoutValueEnd
*/
public Long getTimeoutValueEnd(){
public Integer getTimeoutValueEnd(){
return this.timeoutValueEnd;
}
......@@ -711,7 +723,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 结束 超时时间(秒)
* @param timeoutValueEnd
*/
public void setTimeoutValueEnd(Long timeoutValueEnd){
public void setTimeoutValueEnd(Integer timeoutValueEnd){
this.timeoutValueEnd = timeoutValueEnd;
}
......@@ -719,7 +731,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 增加 超时时间(秒)
* @return timeoutValueIncrement
*/
public Long getTimeoutValueIncrement(){
public Integer getTimeoutValueIncrement(){
return this.timeoutValueIncrement;
}
......@@ -727,7 +739,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 增加 超时时间(秒)
* @param timeoutValueIncrement
*/
public void setTimeoutValueIncrement(Long timeoutValueIncrement){
public void setTimeoutValueIncrement(Integer timeoutValueIncrement){
this.timeoutValueIncrement = timeoutValueIncrement;
}
......@@ -735,7 +747,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 超时时间(秒)
* @return timeoutValueList
*/
public List<Long> getTimeoutValueList(){
public List<Integer> getTimeoutValueList(){
return this.timeoutValueList;
}
......@@ -743,7 +755,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒)
* @param timeoutValueList
*/
public void setTimeoutValueList(List<Long> timeoutValueList){
public void setTimeoutValueList(List<Integer> timeoutValueList){
this.timeoutValueList = timeoutValueList;
}
......@@ -751,7 +763,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 超时时间(秒)
* @return timeoutValueNotList
*/
public List<Long> getTimeoutValueNotList(){
public List<Integer> getTimeoutValueNotList(){
return this.timeoutValueNotList;
}
......@@ -759,7 +771,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒)
* @param timeoutValueNotList
*/
public void setTimeoutValueNotList(List<Long> timeoutValueNotList){
public void setTimeoutValueNotList(List<Integer> timeoutValueNotList){
this.timeoutValueNotList = timeoutValueNotList;
}
......@@ -1361,6 +1373,134 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.remarkNotList = remarkNotList;
}
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/**
* 获取 授权信息
* @return authInfoList
*/
public List<String> getAuthInfoList(){
return this.authInfoList;
}
/**
* 设置 授权信息
* @param authInfoList
*/
public void setAuthInfoList(List<String> authInfoList){
this.authInfoList = authInfoList;
}
/**
* 获取 授权信息
* @return authInfoNotList
*/
public List<String> getAuthInfoNotList(){
return this.authInfoNotList;
}
/**
* 设置 授权信息
* @param authInfoNotList
*/
public void setAuthInfoNotList(List<String> authInfoNotList){
this.authInfoNotList = authInfoNotList;
}
/**
* 获取 流控信息
* @return flowInfoList
*/
public List<String> getFlowInfoList(){
return this.flowInfoList;
}
/**
* 设置 流控信息
* @param flowInfoList
*/
public void setFlowInfoList(List<String> flowInfoList){
this.flowInfoList = flowInfoList;
}
/**
* 获取 流控信息
* @return flowInfoNotList
*/
public List<String> getFlowInfoNotList(){
return this.flowInfoNotList;
}
/**
* 设置 流控信息
* @param flowInfoNotList
*/
public void setFlowInfoNotList(List<String> flowInfoNotList){
this.flowInfoNotList = flowInfoNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
......@@ -1587,70 +1727,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -1928,7 +2004,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒)
* @param timeoutValue
*/
public ProductInterfaceQuery timeoutValue(Long timeoutValue){
public ProductInterfaceQuery timeoutValue(Integer timeoutValue){
setTimeoutValue(timeoutValue);
return this;
}
......@@ -1937,7 +2013,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 开始 超时时间(秒)
* @param timeoutValueStart
*/
public ProductInterfaceQuery timeoutValueStart(Long timeoutValueStart){
public ProductInterfaceQuery timeoutValueStart(Integer timeoutValueStart){
this.timeoutValueStart = timeoutValueStart;
return this;
}
......@@ -1946,7 +2022,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 结束 超时时间(秒)
* @param timeoutValueEnd
*/
public ProductInterfaceQuery timeoutValueEnd(Long timeoutValueEnd){
public ProductInterfaceQuery timeoutValueEnd(Integer timeoutValueEnd){
this.timeoutValueEnd = timeoutValueEnd;
return this;
}
......@@ -1955,7 +2031,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 增加 超时时间(秒)
* @param timeoutValueIncrement
*/
public ProductInterfaceQuery timeoutValueIncrement(Long timeoutValueIncrement){
public ProductInterfaceQuery timeoutValueIncrement(Integer timeoutValueIncrement){
this.timeoutValueIncrement = timeoutValueIncrement;
return this;
}
......@@ -1964,7 +2040,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒)
* @param timeoutValueList
*/
public ProductInterfaceQuery timeoutValueList(List<Long> timeoutValueList){
public ProductInterfaceQuery timeoutValueList(List<Integer> timeoutValueList){
this.timeoutValueList = timeoutValueList;
return this;
}
......@@ -1973,7 +2049,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒)
* @param timeoutValueNotList
*/
public ProductInterfaceQuery timeoutValueNotList(List<Long> timeoutValueNotList){
public ProductInterfaceQuery timeoutValueNotList(List<Integer> timeoutValueNotList){
this.timeoutValueNotList = timeoutValueNotList;
return this;
}
......@@ -2362,6 +2438,82 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
return this;
}
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/**
* 设置 授权信息
* @param authInfo
*/
public ProductInterfaceQuery authInfo(String authInfo){
setAuthInfo(authInfo);
return this;
}
/**
* 设置 授权信息
* @param authInfoList
*/
public ProductInterfaceQuery authInfoList(List<String> authInfoList){
this.authInfoList = authInfoList;
return this;
}
/**
* 设置 流控信息
* @param flowInfo
*/
public ProductInterfaceQuery flowInfo(String flowInfo){
setFlowInfo(flowInfo);
return this;
}
/**
* 设置 流控信息
* @param flowInfoList
*/
public ProductInterfaceQuery flowInfoList(List<String> flowInfoList){
this.flowInfoList = flowInfoList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
......@@ -2472,44 +2624,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
}
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
package com.mortals.xhx.module.product.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 产品接口视图对象
*
* @author zxfei
* @date 2023-07-18
*/
@Data
public class ProductInterfaceLogVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.product.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.dao.ProductInterfaceLogDao;
/**
* ProductInterfaceLogService
*
* 产品接口 service接口
*
* @author zxfei
* @date 2023-07-18
*/
public interface ProductInterfaceLogService extends ICRUDService<ProductInterfaceLogEntity,Long>{
ProductInterfaceLogDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.product.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.product.dao.ProductInterfaceDao;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
/**
* ProductInterfaceService
*
* 产品接口 service接口
*
* @author zxfei
* @date 2023-02-22
*/
public interface ProductInterfaceService extends ICRUDService<ProductInterfaceEntity,Long>{
/**
* ProductInterfaceService
* <p>
* 产品接口 service接口
*
* @author zxfei
* @date 2023-02-22
*/
public interface ProductInterfaceService extends ICRUDService<ProductInterfaceEntity, Long> {
ProductInterfaceDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.product.dao.ProductInterfaceLogDao;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceLogService;
import lombok.extern.slf4j.Slf4j;
/**
* ProductInterfaceLogService
* 产品接口 service实现
*
* @author zxfei
* @date 2023-07-18
*/
@Service("productInterfaceLogService")
@Slf4j
public class ProductInterfaceLogServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceLogDao, ProductInterfaceLogEntity, Long> implements ProductInterfaceLogService {
}
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl;
import com.mortals.framework.util.StringUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
......@@ -7,25 +8,77 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.product.dao.ProductInterfaceDao;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.model.ProductInterfaceLogQuery;
import com.mortals.xhx.module.product.service.ProductInterfaceLogService;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* ProductInterfaceService
* 产品接口 service实现
*
* @author zxfei
* @date 2023-02-22
*/
* ProductInterfaceService
* 产品接口 service实现
*
* @author zxfei
* @date 2023-07-18
*/
@Service("productInterfaceService")
@Slf4j
public class ProductInterfaceServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceDao, ProductInterfaceEntity, Long> implements ProductInterfaceService {
@Autowired
private ProductInterfaceLogService productInterfaceLogService;
@Override
protected void saveAfter(ProductInterfaceEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getProductInterfaceLogList())) {
entity.getProductInterfaceLogList().stream().peek(item -> {
item.setInterfaceId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
}).count();
productInterfaceLogService.save(entity.getProductInterfaceLogList());
}
super.saveAfter(entity, context);
}
@Override
protected void updateAfter(ProductInterfaceEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getProductInterfaceLogList())) {
// Long[] productInterfaceLogIds = productInterfaceLogService.find(new ProductInterfaceLogQuery().interfaceId(entity.getId())).stream().map(ProductInterfaceLogEntity::getId).toArray(Long[]::new);
// productInterfaceLogService.remove(productInterfaceLogIds, context);
entity.getProductInterfaceLogList().stream().peek(item -> {
item.setInterfaceId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date());
}).count();
productInterfaceLogService.save(entity.getProductInterfaceLogList());
}
super.updateAfter(entity, context);
}
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<ProductInterfaceLogEntity> productInterfaceLoglist = productInterfaceLogService.find(new ProductInterfaceLogQuery().interfaceIdList(Arrays.asList(ids)));
productInterfaceLogService.removeList(productInterfaceLoglist, context);
super.removeAfter(ids, context, result);
}
@Override
protected void validData(ProductInterfaceEntity entity, Context context) throws AppException {
if(entity.getProductId()==null){
if (entity.getProductId() == null) {
throw new AppException("产品id不能为空");
}
if(StringUtils.isEmpty(entity.getInterfaceName())){
if (StringUtils.isEmpty(entity.getInterfaceName())) {
throw new AppException("接口名称不能为空");
}
if(StringUtils.isEmpty(entity.getVersionNumber())){
if (StringUtils.isEmpty(entity.getVersionNumber())) {
throw new AppException("版本号不能为空");
}
}
......
......@@ -2,6 +2,7 @@ package com.mortals.xhx.module.product.web;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.LimitStrategyEnum;
import com.mortals.xhx.module.param.service.ParamService;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceService;
......@@ -32,7 +33,7 @@ public class ProductInterfaceController extends BaseCRUDJsonBodyMappingControlle
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "requestType", paramService.getParamBySecondOrganize("ProductInterface","requestType"));
this.addDict(model, "requestProtocol", paramService.getParamBySecondOrganize("ProductInterface","requestProtocol"));
this.addDict(model, "limitStrategy", paramService.getParamBySecondOrganize("ProductInterface","limitStrategy"));
this.addDict(model, "limitStrategy", LimitStrategyEnum.getEnumMap());
this.addDict(model, "contentType", paramService.getParamBySecondOrganize("ProductInterface","contentType"));
this.addDict(model, "network", paramService.getParamBySecondOrganize("ProductInterface","network"));
this.addDict(model, "interfaceTag", paramService.getParamBySecondOrganize("ProductInterface","interfaceTag"));
......
package com.mortals.xhx.module.product.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceLogService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 产品接口
*
* @author zxfei
* @date 2023-07-18
*/
@RestController
@RequestMapping("product/interface/log")
public class ProductInterfaceLogController extends BaseCRUDJsonBodyMappingController<ProductInterfaceLogService,ProductInterfaceLogEntity,Long> {
public ProductInterfaceLogController(){
super.setModuleDesc( "产品接口");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.product.dao.ibatis.ProductInterfaceLogDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="ProductInterfaceLogEntity" id="ProductInterfaceLogEntity-Map">
<id property="id" column="id" />
<result property="interfaceId" column="interfaceId" />
<result property="requestParameters" column="requestParameters" />
<result property="version" column="version" />
<result property="content" column="content" />
<result property="remark" column="remark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('interfaceId') or colPickMode == 1 and data.containsKey('interfaceId')))">
a.interfaceId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('requestParameters') or colPickMode == 1 and data.containsKey('requestParameters')))">
a.requestParameters,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('version') or colPickMode == 1 and data.containsKey('version')))">
a.version,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceLogEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product_interface_log
(interfaceId,requestParameters,version,content,remark,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{interfaceId},#{requestParameters},#{version},#{content},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product_interface_log
(interfaceId,requestParameters,version,content,remark,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.interfaceId},#{item.requestParameters},#{item.version},#{item.content},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_product_interface_log as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('interfaceId')) or (colPickMode==1 and !data.containsKey('interfaceId'))">
a.interfaceId=#{data.interfaceId},
</if>
<if test="(colPickMode==0 and data.containsKey('interfaceIdIncrement')) or (colPickMode==1 and !data.containsKey('interfaceIdIncrement'))">
a.interfaceId=ifnull(a.interfaceId,0) + #{data.interfaceIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('requestParameters')) or (colPickMode==1 and !data.containsKey('requestParameters'))">
a.requestParameters=#{data.requestParameters},
</if>
<if test="(colPickMode==0 and data.containsKey('version')) or (colPickMode==1 and !data.containsKey('version'))">
a.version=#{data.version},
</if>
<if test="(colPickMode==0 and data.containsKey('content')) or (colPickMode==1 and !data.containsKey('content'))">
a.content=#{data.content},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_product_interface_log as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="interfaceId=(case" suffix="ELSE interfaceId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('interfaceId')) or (colPickMode==1 and !item.containsKey('interfaceId'))">
when a.id=#{item.id} then #{item.interfaceId}
</when>
<when test="(colPickMode==0 and item.containsKey('interfaceIdIncrement')) or (colPickMode==1 and !item.containsKey('interfaceIdIncrement'))">
when a.id=#{item.id} then ifnull(a.interfaceId,0) + #{item.interfaceIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="requestParameters=(case" suffix="ELSE requestParameters end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('requestParameters')) or (colPickMode==1 and !item.containsKey('requestParameters'))">
when a.id=#{item.id} then #{item.requestParameters}
</if>
</foreach>
</trim>
<trim prefix="version=(case" suffix="ELSE version end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('version')) or (colPickMode==1 and !item.containsKey('version'))">
when a.id=#{item.id} then #{item.version}
</if>
</foreach>
</trim>
<trim prefix="content=(case" suffix="ELSE content end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('content')) or (colPickMode==1 and !item.containsKey('content'))">
when a.id=#{item.id} then #{item.content}
</if>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
when a.id=#{item.id} then #{item.remark}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="ProductInterfaceLogEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_product_interface_log as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_product_interface_log as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_product_interface_log where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_product_interface_log where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_product_interface_log where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_product_interface_log as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="ProductInterfaceLogEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_product_interface_log as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_product_interface_log as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('interfaceId')">
<if test="conditionParamRef.interfaceId != null ">
${_conditionType_} a.interfaceId = #{${_conditionParam_}.interfaceId}
</if>
<if test="conditionParamRef.interfaceId == null">
${_conditionType_} a.interfaceId is null
</if>
</if>
<if test="conditionParamRef.containsKey('interfaceIdList') and conditionParamRef.interfaceIdList.size() > 0">
${_conditionType_} a.interfaceId in
<foreach collection="conditionParamRef.interfaceIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceIdNotList') and conditionParamRef.interfaceIdNotList.size() > 0">
${_conditionType_} a.interfaceId not in
<foreach collection="conditionParamRef.interfaceIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceIdStart') and conditionParamRef.interfaceIdStart != null">
${_conditionType_} a.interfaceId <![CDATA[ >= ]]> #{${_conditionParam_}.interfaceIdStart}
</if>
<if test="conditionParamRef.containsKey('interfaceIdEnd') and conditionParamRef.interfaceIdEnd != null">
${_conditionType_} a.interfaceId <![CDATA[ <= ]]> #{${_conditionParam_}.interfaceIdEnd}
</if>
<if test="conditionParamRef.containsKey('requestParameters')">
<if test="conditionParamRef.requestParameters != null and conditionParamRef.requestParameters != ''">
${_conditionType_} a.requestParameters like #{${_conditionParam_}.requestParameters}
</if>
<if test="conditionParamRef.requestParameters == null">
${_conditionType_} a.requestParameters is null
</if>
</if>
<if test="conditionParamRef.containsKey('requestParametersList') and conditionParamRef.requestParametersList.size() > 0">
${_conditionType_} a.requestParameters in
<foreach collection="conditionParamRef.requestParametersList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('requestParametersNotList') and conditionParamRef.requestParametersNotList.size() > 0">
${_conditionType_} a.requestParameters not in
<foreach collection="conditionParamRef.requestParametersNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('version')">
<if test="conditionParamRef.version != null and conditionParamRef.version != ''">
${_conditionType_} a.version like #{${_conditionParam_}.version}
</if>
<if test="conditionParamRef.version == null">
${_conditionType_} a.version is null
</if>
</if>
<if test="conditionParamRef.containsKey('versionList') and conditionParamRef.versionList.size() > 0">
${_conditionType_} a.version in
<foreach collection="conditionParamRef.versionList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('versionNotList') and conditionParamRef.versionNotList.size() > 0">
${_conditionType_} a.version not in
<foreach collection="conditionParamRef.versionNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('content')">
<if test="conditionParamRef.content != null and conditionParamRef.content != ''">
${_conditionType_} a.content like #{${_conditionParam_}.content}
</if>
<if test="conditionParamRef.content == null">
${_conditionType_} a.content is null
</if>
</if>
<if test="conditionParamRef.containsKey('contentList') and conditionParamRef.contentList.size() > 0">
${_conditionType_} a.content in
<foreach collection="conditionParamRef.contentList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('contentNotList') and conditionParamRef.contentNotList.size() > 0">
${_conditionType_} a.content not in
<foreach collection="conditionParamRef.contentNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark}
</if>
<if test="conditionParamRef.remark == null">
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
${_conditionType_} a.remark in
<foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
${_conditionType_} a.remark not in
<foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('interfaceId')">
a.interfaceId
<if test='orderCol.interfaceId != null and "DESC".equalsIgnoreCase(orderCol.interfaceId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('requestParameters')">
a.requestParameters
<if test='orderCol.requestParameters != null and "DESC".equalsIgnoreCase(orderCol.requestParameters)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('version')">
a.version
<if test='orderCol.version != null and "DESC".equalsIgnoreCase(orderCol.version)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('content')">
a.content
<if test='orderCol.content != null and "DESC".equalsIgnoreCase(orderCol.content)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')">
a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
......@@ -24,13 +24,27 @@
<result property="outEncrypt" column="outEncrypt" />
<result property="responseParameters" column="responseParameters" />
<result property="remark" column="remark" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
<result property="authInfo" column="authInfo" />
<result property="flowInfo" column="flowInfo" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<collection property="productInterfaceLogList" column="id" ofType="ProductInterfaceLogEntity" javaType="ArrayList" select="getProductInterfaceLogByInterfaceId"></collection>
</resultMap>
<resultMap type="ProductInterfaceLogEntity" id="ProductInterfaceLogEntity-Map">
<result property="id" column="id" />
<result property="interfaceId" column="interfaceId" />
<result property="requestParameters" column="requestParameters" />
<result property="version" column="version" />
<result property="content" column="content" />
<result property="remark" column="remark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
</resultMap>
......@@ -94,6 +108,18 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('normalResponse') or colPickMode == 1 and data.containsKey('normalResponse')))">
a.normalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('abnormalResponse') or colPickMode == 1 and data.containsKey('abnormalResponse')))">
a.abnormalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('authInfo') or colPickMode == 1 and data.containsKey('authInfo')))">
a.authInfo,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowInfo') or colPickMode == 1 and data.containsKey('flowInfo')))">
a.flowInfo,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
......@@ -106,29 +132,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('normalResponse') or colPickMode == 1 and data.containsKey('normalResponse')))">
a.normalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('abnormalResponse') or colPickMode == 1 and data.containsKey('abnormalResponse')))">
a.abnormalResponse,
</if>
</trim>
</sql>
<!-- 子表所有列 -->
<sql id="_columns_sub">
<trim suffixOverrides="," suffix="">
b.id,b.interfaceId,b.requestParameters,b.version,b.content,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse)
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,normalResponse,abnormalResponse,authInfo,flowInfo,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{normalResponse},#{abnormalResponse})
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{normalResponse},#{abnormalResponse},#{authInfo},#{flowInfo},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse)
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,normalResponse,abnormalResponse,authInfo,flowInfo,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.normalResponse},#{item.abnormalResponse})
(#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.normalResponse},#{item.abnormalResponse},#{item.authInfo},#{item.flowInfo},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -219,6 +245,18 @@
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark},
</if>
<if test="(colPickMode==0 and data.containsKey('normalResponse')) or (colPickMode==1 and !data.containsKey('normalResponse'))">
a.normalResponse=#{data.normalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('abnormalResponse')) or (colPickMode==1 and !data.containsKey('abnormalResponse'))">
a.abnormalResponse=#{data.abnormalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('authInfo')) or (colPickMode==1 and !data.containsKey('authInfo'))">
a.authInfo=#{data.authInfo},
</if>
<if test="(colPickMode==0 and data.containsKey('flowInfo')) or (colPickMode==1 and !data.containsKey('flowInfo'))">
a.flowInfo=#{data.flowInfo},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
......@@ -237,12 +275,6 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('normalResponse')) or (colPickMode==1 and !data.containsKey('normalResponse'))">
a.normalResponse=#{data.normalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('abnormalResponse')) or (colPickMode==1 and !data.containsKey('abnormalResponse'))">
a.abnormalResponse=#{data.abnormalResponse},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -426,6 +458,34 @@
</if>
</foreach>
</trim>
<trim prefix="normalResponse=(case" suffix="ELSE normalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('normalResponse')) or (colPickMode==1 and !item.containsKey('normalResponse'))">
when a.id=#{item.id} then #{item.normalResponse}
</if>
</foreach>
</trim>
<trim prefix="abnormalResponse=(case" suffix="ELSE abnormalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('abnormalResponse')) or (colPickMode==1 and !item.containsKey('abnormalResponse'))">
when a.id=#{item.id} then #{item.abnormalResponse}
</if>
</foreach>
</trim>
<trim prefix="authInfo=(case" suffix="ELSE authInfo end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('authInfo')) or (colPickMode==1 and !item.containsKey('authInfo'))">
when a.id=#{item.id} then #{item.authInfo}
</if>
</foreach>
</trim>
<trim prefix="flowInfo=(case" suffix="ELSE flowInfo end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('flowInfo')) or (colPickMode==1 and !item.containsKey('flowInfo'))">
when a.id=#{item.id} then #{item.flowInfo}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -464,20 +524,6 @@
</if>
</foreach>
</trim>
<trim prefix="normalResponse=(case" suffix="ELSE normalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('normalResponse')) or (colPickMode==1 and !item.containsKey('normalResponse'))">
when a.id=#{item.id} then #{item.normalResponse}
</if>
</foreach>
</trim>
<trim prefix="abnormalResponse=(case" suffix="ELSE abnormalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('abnormalResponse')) or (colPickMode==1 and !item.containsKey('abnormalResponse'))">
when a.id=#{item.id} then #{item.abnormalResponse}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -538,6 +584,14 @@
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取子列表 -->
<select id="getProductInterfaceLogByInterfaceId" parameterType="java.lang.Long" resultMap="ProductInterfaceLogEntity-Map">
select <include refid="_columns_sub"/>
from mortals_xhx_product_interface_log as b
<trim suffixOverrides="where" suffix="">
where b.interfaceId = #{id}
</trim>
</select>
......@@ -1053,6 +1107,90 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponse')">
<if test="conditionParamRef.normalResponse != null and conditionParamRef.normalResponse != ''">
${_conditionType_} a.normalResponse like #{${_conditionParam_}.normalResponse}
</if>
<if test="conditionParamRef.normalResponse == null">
${_conditionType_} a.normalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('normalResponseList') and conditionParamRef.normalResponseList.size() > 0">
${_conditionType_} a.normalResponse in
<foreach collection="conditionParamRef.normalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponseNotList') and conditionParamRef.normalResponseNotList.size() > 0">
${_conditionType_} a.normalResponse not in
<foreach collection="conditionParamRef.normalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponse')">
<if test="conditionParamRef.abnormalResponse != null and conditionParamRef.abnormalResponse != ''">
${_conditionType_} a.abnormalResponse like #{${_conditionParam_}.abnormalResponse}
</if>
<if test="conditionParamRef.abnormalResponse == null">
${_conditionType_} a.abnormalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseList') and conditionParamRef.abnormalResponseList.size() > 0">
${_conditionType_} a.abnormalResponse in
<foreach collection="conditionParamRef.abnormalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseNotList') and conditionParamRef.abnormalResponseNotList.size() > 0">
${_conditionType_} a.abnormalResponse not in
<foreach collection="conditionParamRef.abnormalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('authInfo')">
<if test="conditionParamRef.authInfo != null and conditionParamRef.authInfo != ''">
${_conditionType_} a.authInfo like #{${_conditionParam_}.authInfo}
</if>
<if test="conditionParamRef.authInfo == null">
${_conditionType_} a.authInfo is null
</if>
</if>
<if test="conditionParamRef.containsKey('authInfoList') and conditionParamRef.authInfoList.size() > 0">
${_conditionType_} a.authInfo in
<foreach collection="conditionParamRef.authInfoList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('authInfoNotList') and conditionParamRef.authInfoNotList.size() > 0">
${_conditionType_} a.authInfo not in
<foreach collection="conditionParamRef.authInfoNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('flowInfo')">
<if test="conditionParamRef.flowInfo != null and conditionParamRef.flowInfo != ''">
${_conditionType_} a.flowInfo like #{${_conditionParam_}.flowInfo}
</if>
<if test="conditionParamRef.flowInfo == null">
${_conditionType_} a.flowInfo is null
</if>
</if>
<if test="conditionParamRef.containsKey('flowInfoList') and conditionParamRef.flowInfoList.size() > 0">
${_conditionType_} a.flowInfo in
<foreach collection="conditionParamRef.flowInfoList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('flowInfoNotList') and conditionParamRef.flowInfoNotList.size() > 0">
${_conditionType_} a.flowInfo not in
<foreach collection="conditionParamRef.flowInfoNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
......@@ -1137,48 +1275,6 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('normalResponse')">
<if test="conditionParamRef.normalResponse != null and conditionParamRef.normalResponse != ''">
${_conditionType_} a.normalResponse like #{${_conditionParam_}.normalResponse}
</if>
<if test="conditionParamRef.normalResponse == null">
${_conditionType_} a.normalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('normalResponseList') and conditionParamRef.normalResponseList.size() > 0">
${_conditionType_} a.normalResponse in
<foreach collection="conditionParamRef.normalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponseNotList') and conditionParamRef.normalResponseNotList.size() > 0">
${_conditionType_} a.normalResponse not in
<foreach collection="conditionParamRef.normalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponse')">
<if test="conditionParamRef.abnormalResponse != null and conditionParamRef.abnormalResponse != ''">
${_conditionType_} a.abnormalResponse like #{${_conditionParam_}.abnormalResponse}
</if>
<if test="conditionParamRef.abnormalResponse == null">
${_conditionType_} a.abnormalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseList') and conditionParamRef.abnormalResponseList.size() > 0">
${_conditionType_} a.abnormalResponse in
<foreach collection="conditionParamRef.abnormalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseNotList') and conditionParamRef.abnormalResponseNotList.size() > 0">
${_conditionType_} a.abnormalResponse not in
<foreach collection="conditionParamRef.abnormalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -1287,6 +1383,26 @@
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('normalResponse')">
a.normalResponse
<if test='orderCol.normalResponse != null and "DESC".equalsIgnoreCase(orderCol.normalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('abnormalResponse')">
a.abnormalResponse
<if test='orderCol.abnormalResponse != null and "DESC".equalsIgnoreCase(orderCol.abnormalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('authInfo')">
a.authInfo
<if test='orderCol.authInfo != null and "DESC".equalsIgnoreCase(orderCol.authInfo)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('flowInfo')">
a.flowInfo
<if test='orderCol.flowInfo != null and "DESC".equalsIgnoreCase(orderCol.flowInfo)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
......@@ -1307,16 +1423,6 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('normalResponse')">
a.normalResponse
<if test='orderCol.normalResponse != null and "DESC".equalsIgnoreCase(orderCol.normalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('abnormalResponse')">
a.abnormalResponse
<if test='orderCol.abnormalResponse != null and "DESC".equalsIgnoreCase(orderCol.abnormalResponse)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
......
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###产品接口列表
POST {{baseUrl}}/product/interface/log/list
Content-Type: application/json
{
"page":1,
"size":10
}
###产品接口更新与保存
POST {{baseUrl}}/product/interface/log/save
Authorization: {{authToken}}
Content-Type: application/json
{
"interfaceId":62,
"requestParameters":"pb92dy",
"version":"8lkpuh",
"content":"e7kwqt",
"remark":"riyuuu",
}
> {%
client.global.set("ProductInterfaceLog_id", JSON.parse(response.body).data.id);
%}
###产品接口查看
GET {{baseUrl}}/product/interface/log/info?id={{ProductInterfaceLog_id}}
Accept: application/json
###产品接口编辑
GET {{baseUrl}}/product/interface/log/edit?id={{ProductInterfaceLog_id}}
Accept: application/json
###产品接口删除
GET {{baseUrl}}/product/interface/log/delete?id={{ProductInterfaceLog_id}}
Authorization: {{authToken}}
Accept: application/json
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum LimitStrategyEnum {
不限流(0, "不限流"),
一万次日(1, "10000次/日"),
一千次日(2, "1000次/日"),
一百次日(3, "100次/日"),
一千次小时(4, "1000次/小时"),
一百次小时(5, "100次/小时"),
一百次分钟(6, "100次/分钟"),
十次分钟(7, "10次/分钟"),
一次分钟(8, "1次/分钟");
private Integer value;
private String desc;
LimitStrategyEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static LimitStrategyEnum getByValue(Integer value) {
for (LimitStrategyEnum statusEnum : LimitStrategyEnum.values()) {
if (statusEnum.getValue() == value) {
return statusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (LimitStrategyEnum item : LimitStrategyEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
......@@ -124,6 +124,15 @@ spring:
metadata:
response-timeout: 200000
connect-timeout: 200000
# etl数据清洗
- id: etl-manager
#uri: http://192.168.0.98:21080
uri: lb://etl-manager
predicates:
- Path=/etl/**
metadata:
response-timeout: 200000
connect-timeout: 200000
nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment