Commit 258de1d2 authored by xj's avatar xj
parents 6fbe8761 081e1fb6
......@@ -9,6 +9,3 @@ VUE_APP_API_PHP_URL=http://112.19.80.237:8090
#宜宾
#VUE_APP_API_BASE_URL=http://10.12.185.213:11072
#正式
VUE_APP_API_PRP_RUL=http://112.19.80.237:11007
......@@ -6,3 +6,5 @@ VUE_APP_API_BASE_URL=/basics_api
VUE_APP_API_PHP_URL=/zwfw_api
#图片显示拼接
VUE_APP_API_IMG_URL =
VUE_APP_API_PRP_RUL=http://112.19.80.237:11007
\ No newline at end of file
import http from "../request/http";
let baseURL = "http://8.136.255.30"
let proURL = process.env.VUE_APP_API_PRP_RUL;
let proURL = process.env.VUE_APP_API_BASE_URL;
// 查询客户管理列表
export function getCustomer(params) {
......@@ -9,5 +9,5 @@ export function getCustomer(params) {
// 窗口列表
export function windowList(params) {
return http.post(`${proURL}/basics_api/base/window/list`, params);
return http.post(`${proURL}/base/window/list`, params);
}
......@@ -5,20 +5,53 @@ let baseURL = process.env.VUE_APP_API_BASE_URL;
// ----------ps-----------------
// 查询产品信息列表
// 产品列表
export function getProduct(params) {
return http.post(`${baseURL}/zwfw/product/list`, params);
}
// 产品信息
// 保存更新产品
export function saveProduct(params) {
return http.post(`${baseURL}/zwfw/product/save`, params);
}
// 产品信息
// 删除产品
export function deleteProduct(params) {
return http.get(`${baseURL}/zwfw/product/delete`, params);
}
// 应用列表
export function getApps(params) {
return http.post(`${baseURL}/zwfw/product/apps/list`, params);
}
// 查看产品应用
export function getAppsInfo(params) {
return http.get(`${baseURL}/zwfw/product/apps/info`, params);
}
// 保存更新产品应用
export function saveApps(params) {
return http.post(`${baseURL}/zwfw/product/apps/save`, params);
}
// 删除产品应用
export function deleteApps(params) {
return http.get(`${baseURL}/zwfw/product/apps/delete`, params);
}
// 查询产品资料列表
export function getDocument(params) {
return http.post(`${baseURL}/zwfw/product/document/list`, params);
}
// 产品资料
export function getDocumentInfo(params) {
return http.get(`${baseURL}/zwfw/product/document/info`, params);
}
// 保存更新产品资料
export function saveDocument(params) {
return http.post(`${baseURL}/zwfw/product/document/save`, params);
}
// 删除产品资料
export function deleteDocument(params) {
return http.get(`${baseURL}/zwfw/product/document/delete`, params);
}
//-------------xj: --------------------
......
<template>
<div class="myUploadFile">
<a-upload
:name="defaultInfo.name"
:action="defaultInfo.action"
:listType="defaultInfo.listType"
:multiple="defaultInfo.multiple"
:showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.fileList"
:disabled="defaultInfo.disabled"
:directory="defaultInfo.directory"
:data="defaultInfo.objAttach"
:headers="headers"
:beforeUpload="beforeImageUpload"
:remove="uploadRemove"
@change="uploadChange"
@preview="handlePreview"
>
<a-upload :name="defaultInfo.name" :action="defaultInfo.action" :listType="defaultInfo.listType"
:multiple="defaultInfo.multiple" :showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled"
:directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers"
:beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview">
<slot></slot>
</a-upload>
<a-modal
:visible="defaultInfo.previewVisible"
:footer="null"
@cancel="defaultInfo.previewVisible = false"
>
<a-modal :visible="defaultInfo.previewVisible" :footer="null" @cancel="defaultInfo.previewVisible = false">
<img alt="example" style="width: 100%" :src="defaultInfo.previewImage" />
</a-modal>
</div>
......@@ -81,20 +66,20 @@ export default {
if (this.defaultInfo["prePath"]) {
this.defaultInfo[
"action"
] = `${this.VUE_APP_API_BASE_URL}${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`;
] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`;
} else {
this.defaultInfo[
"action"
] = `${this.VUE_APP_API_BASE_URL}${this.fileCommonupload}`;
] = `${this.fileCommonupload}`;
}
// console.log(this.defaultInfo);
console.log(this.defaultInfo);
},
deep: true,
immediate: true,
},
},
created() {},
created() { },
methods: {
uploadRemove(file) {
if (file.id != undefined) {
......@@ -103,6 +88,10 @@ export default {
this.defaultInfo.fileList = this.defaultInfo.fileList.filter(
(item) => item.uid != file.uid
);
console.log(this.defaultInfo.fileList.length,"=--------")
if(!this.defaultInfo.fileList.length){
this.$emit("input", ""); //相对地址
}
},
beforeImageUpload(file, fileList) {
let whiteFileList = this.defaultInfo.whiteFileList; //文件类型限制
......@@ -128,6 +117,7 @@ export default {
return result;
},
uploadChange({ file, fileList }) {
console.log(fileList)
if (file.status === "error") {
return;
this.$message.error(`${file.name} 上传失败.`);
......@@ -139,7 +129,7 @@ export default {
} else if (file.status === "removed") {
// this.$message.success(`${file.name} 删除成功`);
if (!this.defaultInfo.multiple && this.defaultInfo.limit == 1) {
this.$emit("input", undefined); //相对地址
this.$emit("input", ""); //相对地址
}
}
this.defaultInfo.fileList = fileList;
......
......@@ -626,6 +626,15 @@ const routes = [
),
meta: { title: "接口信息" },
},
{
path: "dictionary",
name: "dictionary",
component: () =>
import(
/* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/dictionary/dictionary.vue"
),
meta: { title: "字典管理" },
},
{
path: "permissionsModel",
name: "permissionsModel",
......
......@@ -31,6 +31,9 @@
<p>
<span>预约方式:</span>{{ orderInfo.up_type=='phone'?'微官网':orderInfo.up_type=='app'?'自助终端':orderInfo.up_type=='tftb'?'天府通办':'--' }}
</p>
<p>
<span>预约事项:</span>--
</p>
</div>
<div class="qrcode">
<!-- <img src="~@/assets/images/logo.png" alt="" /> -->
......
......@@ -3,11 +3,7 @@
<div class="search_box" ref="search_box">
<h3>API服务</h3>
<h4>
<a-input
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="getServiceApiList"
/>
<a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="getServiceApiList" />
<button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span>
</button>
......@@ -16,13 +12,9 @@
<div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left">
<a-steps progress-dot direction="vertical">
<a-step
v-for="(item, index) in stepsList"
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<a-step v-for="(item, index) in stepsList" :status="active === index ? 'process' : 'wait'" :key="index">
<span slot="title" @click="handleChange(item, index)">{{
item.serviceName
item.productName
}}</span>
</a-step>
</a-steps>
......@@ -30,16 +22,12 @@
<div class="_right">
<div class="list_box step_sign">
<div class="title-box">
<span class="list_title">{{ curApiInfo.serviceName }}</span>
<span class="count primary">{{ curApiInfo.count }}</span>
<span class="list_title">{{ curApiInfo.name }}</span>
<span class="count primary">{{ curApiInfo.total }}</span>
</div>
<div
class="list flex aic jcb"
v-for="v in curApiInfo.serviceList"
:key="v.id"
>
<div class="api-name">{{ v.apiName }}</div>
<span class="service-name">{{ v.systemServiceName }}</span>
<div class="list flex aic jcb" v-for="v in curApiInfo.list" :key="v.id">
<div class="api-name">{{ v.interfaceName }}</div>
<span class="service-name">{{ v.description }}</span>
<a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)">
查看文档
</a-button>
......@@ -51,7 +39,8 @@
</template>
<script>
import { serviceApiList } from "@/api/APIServe.js";
// import { serviceApiList } from "@/api/APIServe.js";
import { getProduct, getInterfaceList } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common";
export default {
name: "PortalAdminVueAPIServe",
......@@ -62,6 +51,7 @@ export default {
stepsList: [],
isSearch: false,
active: 0,
curApiInfo: {}, // 当前api信息
};
},
......@@ -74,22 +64,35 @@ export default {
methods: {
getServiceApiList() {
serviceApiList({
getProduct({
page: 1,
size: -1, //每页条数
apiName: `%${this.searchVal}%`,
productName: `%${this.searchVal}%`,
}).then((res) => {
let { code, data } = res;
if (code == 1) {
if (data.data.length) {
this.stepsList = data.data;
this.curApiInfo = data.data[0];
this.getApiDetail(data.data[0])
} else {
this.curApiInfo = {};
}
}
});
},
getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then((res) => {
let { code, data } = res;
if (code == 1) {
this.curApiInfo = {
name: item.productName,
list: data.data,
total: data.total
}
}
});
},
handleSearch() {
this.isSearch = !this.isSearch;
if (this.isSearch) {
......@@ -104,15 +107,14 @@ export default {
// 切换设备
handleChange(row, index) {
this.active = index;
this.curApiInfo = row;
this.searchVal = "";
this.getApiDetail(row)
},
pushroeuter() {
this.$message.warning("暂未开通文档查看");
// this.$router.push({
// path: "/home/thePlatformIsSet/portDocument",
// // query: { testoption: "test001" },
// });
pushroeuter(v) {
this.$router.push({
path: "/home/thePlatformIsSet/portDocument",
query: { id: v.id },
});
},
},
};
......@@ -120,12 +122,14 @@ export default {
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
width: 100%;
height: 100vh;
background: #f5f5f5;
display: flex;
flex-direction: column;
.search_box {
height: 300px;
background: url("~@/assets/images/u210.png") top no-repeat;
......@@ -134,16 +138,19 @@ export default {
align-items: center;
display: flex;
flex-flow: column;
h3 {
font-size: 2.4rem;
color: #fff;
font-weight: bold;
padding: 4rem 0 2rem;
}
h4 {
display: flex;
align-items: center;
}
/deep/.ant-input {
width: 30rem !important;
margin-right: 2rem;
......@@ -169,7 +176,8 @@ export default {
line-height: 42px;
padding: 0;
border: none;
& > span {
&>span {
position: relative;
display: block;
width: 100%;
......@@ -213,8 +221,8 @@ export default {
width: 100%;
}
& > span:before,
& > span:after {
&>span:before,
&>span:after {
position: absolute;
content: "";
left: 0;
......@@ -227,39 +235,43 @@ export default {
transition: all 0.3s ease;
}
& > span:before {
&>span:before {
width: 2px;
height: 0%;
}
& > span:after {
&>span:after {
height: 2px;
width: 0%;
}
& > span:hover:before {
&>span:hover:before {
height: 100%;
}
& > span:hover:after {
&>span:hover:after {
width: 100%;
}
}
}
.stepbox {
width: 90%;
margin-left: 5%;
flex: 1;
display: flex;
/deep/.ant-steps-item-content {
cursor: pointer;
}
._left {
width: 300px;
height: 100%;
padding: 20px;
margin-right: 20px;
overflow: auto;
&::-webkit-scrollbar {
width: 3px;
height: 3px;
......@@ -282,6 +294,7 @@ export default {
height: 100%;
padding: 20px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 3px;
height: 3px;
......@@ -297,16 +310,20 @@ export default {
border-radius: 3px;
background: #fff;
}
.title-box {
font-size: 24px;
.list_title {
margin-right: 10px;
font-weight: 600;
}
.count {
font-weight: 600;
}
}
.list {
width: 100%;
height: 80px;
......@@ -314,38 +331,35 @@ export default {
padding: 0px 20px;
background-color: #fff;
border-radius: 4px;
.api-name {
font-size: 16px;
font-weight: 600;
}
.service-name {
font-size: 14px;
}
}
}
}
&::before {
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(
174deg,
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(108, 53, 247, 1) 85%);
background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
rgba(108, 53, 247, 1) 85%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
}
</style>
\ No newline at end of file
......@@ -2,88 +2,73 @@
<div class="Container">
<div class="content">
<div class="top">
<h1 class="title_text">RecognizeAccountPage - 户口页识别</h1>
<h1 class="title_text">{{ detailsForm.interfaceName }}</h1>
<button class="go_back" @click="$router.go(-1)">返回上一级</button>
</div>
<a-card title="接口信息" :bordered="false" class="card_box">
<p class="text1">
户口页识别能力可以对户口本常住人口登记卡进行结构化识别,输出姓名、籍贯、民族、性别、身份证号、出生地、出生日期、户主或户主关系、承办人签章、注册章位置、其他印章位置,共11个关键字段信息。
</p>
<div class="matter_box">
<p>输入限制:</p>
<p v-for="item of 4">
{{ item }}.图像格式:JPEG、JPG、PNG、BMP、GIF。
</p>
</div>
<a-descriptions>
<a-descriptions-item label="接口名称">{{ detailsForm.interfaceName }}</a-descriptions-item>
<a-descriptions-item label="版本号">{{ detailsForm.versionNumber }}</a-descriptions-item>
<a-descriptions-item label="请求类型">{{ detailsForm.requestType == 1 ? 'GET' : 'POST' }}</a-descriptions-item>
<a-descriptions-item label="请求协议">{{ detailsForm.requestProtocol == 1 ? 'HTTP' : 'HTTPS'
}}</a-descriptions-item>
<a-descriptions-item label="content-type">{{ detailsForm.contentType }}</a-descriptions-item>
<a-descriptions-item label="超时时长">{{ detailsForm.timeoutValue }}</a-descriptions-item>
<a-descriptions-item label="限流策略">{{ detailsForm.limitStrategy == 1 ? '分钟' : '小时' }}</a-descriptions-item>
<a-descriptions-item label="访问网络" v-if="detailsForm && detailsForm.network">
<span v-for="item, idx of dict.network" v-show="detailsForm.network.indexOf(idx) != -1" :key="idx"> {{ item }}
</span>
</a-descriptions-item>
<a-descriptions-item label="接口标签" v-if="dict.interfaceTag">{{ dict.interfaceTag[detailsForm.interfaceTag]
}}</a-descriptions-item>
<a-descriptions-item label="接口来源" v-if="dict.interfaceSource">{{
dict.interfaceSource[detailsForm.interfaceSource] }}</a-descriptions-item>
<a-descriptions-item label="请求路径">{{ detailsForm.requestUrl }}</a-descriptions-item>
<br>
<a-descriptions-item label="描述" span="{3}">{{ detailsForm.description }}</a-descriptions-item>
</a-descriptions>
</a-card>
<a-card title="请求参数" :bordered="false" class="card_box">
<a-table
bordered
:row-key="(record) => record.key"
:pagination="false"
:columns="tableHeaders"
:dataSource="sourceData"
>
<div class="flex aic jcb mb10">
<a-radio-group v-model="requestPam.type" button-style="solid" disabled>
<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>
<div>{{ detailsForm.inEncrypt == 1 ? '加密' : '不加密' }}</div>
</div>
</div>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }" :pagination="false"
:columns="table_columns" :dataSource="requestPam.table">
</a-table>
</a-card>
<a-card title="响应数据" :bordered="false" class="card_box">
<div class="flex aic mb10" style="justify-content: flex-end;">
<div class="flex aic">
<div class="mr10">出参是否加密</div>
<div>{{ detailsForm.outEncrypt == 1 ? '加密' : '不加密' }}</div>
</div>
</div>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }" :pagination="false"
:columns="table_columns" :dataSource="responsePam.table">
</a-table>
</a-card>
<a-card title="返回示例" :bordered="false" class="card_box">
<p>正常返回示例</p>
<div v-highlight>
<pre>
<code class="json">
{
RequestId: "8D588F22-3E14-4674-9EAE-49AE1BA10EA2",
Data: {
Gender: '"Gender": "女",
TitleArea: {
Top: 17,
Width: 30,
Height: 30,
Left: 205,
},
Angle: 0,
RegisterStampAreas: [
{
Top: 2215,
Width: 152,
Height: 138,
Left: 330,
},
],
Nationality: "彝族",
BirthPlace: "四川省雷波县",
OtherStampAreas: [
{
Top: 10,
Width: 10,
Height: 10,
Left: 10,
},
],
UndertakeStampAreas: [
{
Top: 10,
Width: 10,
Height: 10,
Left: 10,
},
],
BirthDate: "2002年12月27日",
Relation: "孙女",
NativePlace: "四川省雷波县",
Name: "杨冬",
IDNumber: "513437200212271325",
InvalidStampAreas: [
{
Top: 10,
Width: 10,
Height: 10,
Left: 10,
},
],
},
}
</code>
<code class="json" v-html="allResData"></code>
</pre>
</div>
<p>错误返回示例</p>
<div v-highlight>
<pre>
<code class="json" v-html="errJson"></code>
</pre>
</div>
</a-card>
......@@ -95,6 +80,9 @@
import Vue from "vue";
import hljs from "highlight.js";
import "highlight.js/styles/monokai-sublime.css";
import {
getInterfaceInfo
} from '@/api/thePlatformIsSet.js'
Vue.directive("highlight", function (el) {
let blocks = el.querySelectorAll("pre code");
blocks.forEach((block) => {
......@@ -105,59 +93,58 @@ export default {
name: "PortalAdminVuePortDocument",
data() {
return {
tableHeaders: [
{
title: "名称",
dataIndex: "name",
detailsForm: {},
requestPam: {},
responsePam: {},
dict: {},
table_columns: [{
title: "参数名",
align: "center",
dataIndex: "name"
},
{
title: "类型",
dataIndex: "type",
title: "参数值类型",
align: "center",
dataIndex: "type",
},
{
title: "必填",
dataIndex: "mustFillIn",
title: "默认值",
align: "center",
dataIndex: "default",
},
{
title: "描述",
dataIndex: "describe",
title: "是否必填",
align: "center",
dataIndex: "isMust",
customRender: (text, record, index) => `${text == 1 ? '' : ''}`,
},
{
title: "示例值及参考API",
dataIndex: "reference",
title: "描述",
align: "center",
},
],
sourceData: [
{
key: "01",
name: "ImageURL",
type: "String",
mustFillIn: "",
describe: "图片URL地址。当前仅支持广安地域的OSS链接。",
reference:
"示例值:http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeAccountPage/hky1.jpg",
},
{
key: "02",
name: "ImageURL",
type: "String",
mustFillIn: "",
describe: "图片URL地址。当前仅支持广安地域的OSS链接。",
reference:
"示例值:http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeAccountPage/hky1.jpg",
},
dataIndex: "describe",
width: 200
}
],
allResData: null,
errJson: { "msg": "请选择待查看产品接口信息", "code": -1 }
};
},
mounted() {},
mounted() {
this.getInfo()
},
methods: {
getInfo() {
getInterfaceInfo({ id: this.$route.query.id }).then(res => {
this.allResData = 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.dict = res.dict
})
},
toJson(res) {
return JSON.stringify(res);
},
......@@ -167,16 +154,24 @@ export default {
<style lang="less" scoped>
@headerH: 4.5rem;
::v-deep .ant-table {
width: 100%;
}
.Container {
background: #f5f5f5;
.content {
width: 75rem;
margin: 0 auto;
padding: 2.5rem 0;
.top {
display: flex;
justify-content: space-between;
align-items: center;
.title_text {
font-size: 1.2rem;
margin-bottom: 1rem;
......@@ -230,41 +225,39 @@ export default {
}
}
}
.TheSample {
background: #f5f5f5;
padding: 1rem;
}
.card_box {
.text1 {
margin-bottom: 1rem;
}
& + .card_box {
&+.card_box {
margin-top: 1rem;
}
}
}
&::before {
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(
174deg,
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(108, 53, 247, 1) 85%);
background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
rgba(108, 53, 247, 1) 85%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
}
</style>
\ No newline at end of file
<template>
<div class="Container">
<div class="my-card">
<div class="head-menu">
<div>属性字典</div>
</div>
<div class="pd20">
<div class="from-item">
<div class="name">排队机分辨率:</div>
<div>
<a-tag color="blue" closable v-for="item, index in fblList" :key="index">
{{ item.name }}
</a-tag>
</div>
<a-button icon="plus" size="small" @click="addZdShow('fblList', '排队机分辨率')">添加字典值</a-button>
</div>
<div class="from-item">
<div class="name">接口标签:</div>
<div>
<a-tag color="blue" closable v-for="item, index in bqList" :key="index">
{{ item.name }}
</a-tag>
</div>
<a-button icon="plus" size="small" @click="addZdShow('bqList', '接口标签')">添加字典值</a-button>
</div>
</div>
</div>
<a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false"
width="30%">
<a-form-model :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }" layout="horizontal" ref="appInfoFome"
:model="appInfoFome" :rules="appInfoRules">
<a-form-model-item label="字典值" prop="productName">
<a-input placeholder="请输入字典值" allowClear v-model="appInfoFome.productName" />
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">重置</a-button>
</template>
</a-modal>
</div>
</template>
<script>
import common from "@/mixins/common";
export default {
name: "dictionary",
mixins: [common],
data() {
return {
fblList: [{
name: "1920*1080"
}, {
name: "1080*1920"
}, {
name: "1280*1280"
}],
bqList: [
{ name: "政务外网" },
{ name: "便民服务" },
{ name: "三化建设" },
],
VisibleTitle: "",
Visible: false,
appInfoFome: {
productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId"))
}, //页面表单信息
appInfoRules: {
productName: [
{
required: true, //是否必选
whitespace: true, //必选时,空格是否会被视为错误
message: "请输入字典值",
trigger: "blur",
}
],
},
keyName: ""
};
},
created() {
},
mounted() {
},
methods: {
addZdShow(key, title) {
this.Visible = true
this.resetForm()
this.keyName = key
this.VisibleTitle = title
},
Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => {
if (valid) {
this[this.keyName].push({
name: this.appInfoFome.productName
})
this.Visible = false
this.resetForm()
} else {
this.$message.error(`请完善表单信息!`);
return false;
}
});
},
resetForm() {
this.$nextTick(() => {
this.appInfoFome.productName = ''
});
},
},
};
</script>
<style lang="less" scoped>
.from-item {
display: flex;
align-items: center;
margin-bottom: 20px;
.name {
width: 150px;
text-align: right;
padding-right: 20px;
}
}
.Container {
width: 100%;
min-height: 100vh;
background: #f5f5f5;
padding-top: 72px;
.my-card {
margin: 40px 80px;
background: #fff;
border-radius: 6px;
overflow: hidden;
min-height: 500px;
}
.head-menu {
display: flex;
align-items: center;
border-bottom: 1px solid #efefef;
div {
height: 52px;
line-height: 52px;
font-size: 16px;
font-weight: bold;
color: #0595FD;
border-bottom: 2px solid #0595FD;
padding: 0 30px;
margin-left: 20px;
}
}
}
</style>
\ No newline at end of file
......@@ -2,83 +2,44 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn" @click="openDetails('新增',{})">
<button class="add_btn" @click="openDetails()">
<span>新增</span>
</button>
</div>
<span>
<a-input
allowClear
v-model="query.interfaceName"
placeholder="请输入接口名称查询"
>
<a-input allowClear v-model="query.interfaceName" placeholder="请输入接口名称查询">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 来源001 </a-select-option>
<a-select-option value="002"> 来源002 </a-select-option>
<a-select v-model="query.interfaceSource">
<a-select-option value="">所有来源</a-select-option>
<a-select-option v-for="(item, index) of dict.interfaceSource" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 标签001 </a-select-option>
<a-select-option value="002"> 标签002 </a-select-option>
<a-select v-model="query.interfaceTag">
<a-select-option value="">所有标签</a-select-option>
<a-select-option v-for="(item, index) of dict.interfaceTag" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 策略001 </a-select-option>
<a-select-option value="002"> 策略002 </a-select-option>
</a-select>
<button class="search_btn">搜索</button>
<button class="search_btn" @click="getList()">搜索</button>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="network" slot-scope="text, record,index">
<span v-for="item, idx of dict.network" v-show="text.indexOf(idx) != -1" :key="idx"> {{ item }} </span>
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="openDetails('详情',record)"
>详情</a-button
>
<a-button type="link" @click="openDetails('编辑',record)"
>编辑</a-button
>
<a-button type="link" style="color: #ff4420"
>删除</a-button
>
<a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除</a-button>
</a-popconfirm>
</template>
</a-table>
<Details ref="Details" />
<Details ref="Details" :dict="dict" />
</div>
</div>
</template>
......@@ -86,7 +47,7 @@
<script>
import table from "@/mixins/table";
import Details from "./components/Details.vue";
import {getInterfaceList} from '@/api/thePlatformIsSet.js'
import { getInterfaceList, getInterfaceDelete } from '@/api/thePlatformIsSet.js'
export default {
mixins: [table],
name: "PortalAdminVueAlerting",
......@@ -116,12 +77,13 @@ export default {
title: "标签",
align: "center",
dataIndex: "interfaceTag",
customRender: (text, record, index) => this.dict.interfaceTag[text]
},
{
title: "请求协议",
align: "center",
dataIndex: "requestProtocol",
customRender: (text, record, index) => `${record.requestProtocol == 1 ? 'HTTP' : 'HTTPS'}`,
customRender: (text, record, index) => this.dict.requestProtocol[text]
},
{
title: "版本",
......@@ -132,7 +94,7 @@ export default {
title: "来源",
align: "center",
dataIndex: "interfaceSource",
customRender: (text, record, index) => `${record.interfaceSource == 1 ? '自有' : '非自有'}`,
customRender: (text, record, index) => this.dict.interfaceSource[text]
},
{
title: "策略",
......@@ -144,7 +106,9 @@ export default {
title: "访问网络",
align: "center",
dataIndex: "network",
customRender: (text, record, index) => `${record.network == 1 ? '互联网' : '政务网'}`,
scopedSlots: {
customRender: "network",
}
},
{
......@@ -157,12 +121,20 @@ export default {
},
},
],
query:{
query: {
interfaceName: undefined,
page:1,
size:10,
interfaceSource: "",
interfaceTag: "",
productId: this.$route.query.id,
},
total:0
tablePagination: {
current: 1,
pageSize: 10
},
dict: {
},
total: 0
};
},
components: {
......@@ -173,8 +145,22 @@ export default {
},
methods: {
getList() {
getInterfaceList(this.query).then(res=>{
this.tableSourceData = res.data.data
getInterfaceList({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.query
}).then(res => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
}
})
},
QueueState(type) {
......@@ -188,11 +174,35 @@ export default {
return "type0";
}
},
openDetails(type) {
this.$refs.Details.modalInfo.title = type;
delRow(item) {
getInterfaceDelete({
id: item.id
}).then((res) => {
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑接口";
this.$refs.Details.getInfo(item.id)
} else {
this.$refs.Details.modalInfo.title = "新增接口";
}
this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "55%";
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.getList();
},
},
};
</script>
......@@ -201,13 +211,15 @@ export default {
/deep/.ant-spin-container {
display: block;
}
.PoliticsShow-Container {
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
&>div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -227,6 +239,7 @@ export default {
overflow: hidden;
background: #43a4ff;
color: ghostwhite;
& span {
position: relative;
z-index: 10;
......@@ -262,7 +275,7 @@ export default {
}
}
& > span {
&>span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -271,21 +284,26 @@ export default {
width: 15rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
......@@ -317,13 +335,16 @@ export default {
}
}
}
.main {
.type0 {
color: #888888;
}
.type1 {
color: #f94545;
}
.levelState {
padding: 5px 8px;
border-radius: 8px;
......@@ -331,12 +352,15 @@ export default {
background: #ffedeb;
border: 1px solid #f94545;
}
.type2 {
color: #04ca8f;
}
/deep/.ant-btn-link {
padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important;
}
}
......
<template>
<a-drawer :destroyOnClose="true" :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible"
@close="modalClose">
@close="resetForm">
<a-form-model ref="ruleForm" :model="detailsForm" :rules="detailsRules" :label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }">
<a-row :gutter="16">
......@@ -30,14 +30,18 @@
</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 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="requestUrl">
<a-input v-model="detailsForm.requestUrl" placeholder="请输入" allowClear>
<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>
......@@ -56,48 +60,68 @@
</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 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="接口来源" 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="flowControl">
<a-textarea v-model="detailsForm.flowControl" placeholder="请输入" :rows="4" />
<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="authorizeInfo">
<a-textarea v-model="detailsForm.authorizeInfo" placeholder="请输入" :rows="4" />
<a-form-model-item label="描述" prop="description">
<a-textarea v-model="detailsForm.description" placeholder="请输入" :rows="4" />
</a-form-model-item>
</a-col>
</a-row>
<h1 class="title_">请求参数</h1>
<a-radio-group v-model="type" button-style="solid">
<a-radio-button value="路径参数"> 路径参数 </a-radio-button>
<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" :pagination="false"
:columns="table_columns" :dataSource="requestParameters[type]">
<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.association" placeholder="请选择" allowClear>
<a-select-option value="001"> 选项001 </a-select-option>
</a-select>
</template>
<template slot="参数值类型" slot-scope="text, record, index">
<a-select v-model="record.type" placeholder="请选择" allowClear>
<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="jsonPath" slot-scope="text, record, index">
<a-input v-model="record.jsonPath" placeholder="请输入" allowClear />
</template>
<template slot="默认值" slot-scope="text, record, index">
<a-input v-model="record.default" placeholder="请输入" allowClear />
</template>
......@@ -112,33 +136,39 @@
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" style="color: #ff4420">删除</a-button>
<a-button type="link" @click="delTabRow('requestPam', index)" style="color: #ff4420">删除</a-button>
</template>
</a-table>
<div class="table_footer">
<a-button type="primary" class="addclass" @click="ceshidayin"> 添加参数 </a-button>
<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>
<a-table size="middle" bordered :row-key="(record) => record.id" :pagination="false"
:columns="table_columns" :dataSource="responseParameters">
<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.association" placeholder="请选择" allowClear>
<a-select-option value="001"> 选项001 </a-select-option>
</a-select>
</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="jsonPath" slot-scope="text, record, index">
<a-input v-model="record.jsonPath" placeholder="请输入" allowClear />
</template>
<template slot="默认值" slot-scope="text, record, index">
<a-input v-model="record.default" placeholder="请输入" allowClear />
</template>
......@@ -153,72 +183,33 @@
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" style="color: #ff4420">删除</a-button>
<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="ceshidayin"> 添加参数 </a-button>
<a-button type="primary" class="addclass" @click="addResPam"> 添加参数 </a-button>
</div>
<!-- <h1 class="title_">错误码</h1>
<a-table size="middle" bordered :row-key="(record) => record.id" :pagination="false"
:columns="errorCode_columns" :dataSource="errorCode">
<template slot="Http Code" slot-scope="text, record, index">
<a-input v-model="record.httpCode" placeholder="请输入" allowClear />
</template>
<template slot="Error Code" slot-scope="text, record, index">
<a-input v-model="record.errorCode" placeholder="请输入" allowClear />
</template>
<template slot="错误信息" slot-scope="text, record, index">
<a-input v-model="record.errorMessage" placeholder="请输入" allowClear />
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" style="color: #ff4420">删除</a-button>
</template>
</a-table>
<div class="table_footer">
<a-button type="primary" class="addclass" @click="ceshidayin"> 添加参数 </a-button>
</div>
<h1 class="title_">变更历史</h1>
<a-table size="middle" bordered :row-key="(record) => record.id" :pagination="false"
:columns="changeHistory_columns" :dataSource="changeHistory">
<template slot="变更时间" slot-scope="text, record, index">
<a-input v-model="record.time" placeholder="请输入" allowClear />
</template>
<template slot="变更内容概要" slot-scope="text, record, index">
<a-input v-model="record.content" placeholder="请输入" allowClear />
</template>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" style="color: #ff4420">删除</a-button>
</template>
</a-table>
<div class="table_footer">
<a-button type="primary" class="addclass" @click="ceshidayin"> 添加参数 </a-button>
</div> -->
<div class="drawer_footer">
<a-button type="primary" class="addclass" @click="modalSubmit"> 保存 </a-button>
<a-button @click="modalClose"> 取消 </a-button>
<a-button @click="resetForm"> 取消 </a-button>
</div>
</a-form-model>
</a-drawer>
</template>
<script>
import modal from "../mixins/modal";
import {
getInterfaceSave
} from '@/api/thePlatformIsSet.js'
export default {
import modal from "../mixins/modal";
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,
......@@ -230,43 +221,18 @@
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",
}, ],
network: [{
required: true,
message: "请输入",
trigger: "change",
}, ],
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: "互联网",
......@@ -285,14 +251,6 @@
customRender: "参数名",
},
},
{
title: "关联参数",
align: "center",
dataIndex: "association",
scopedSlots: {
customRender: "关联参数",
},
},
{
title: "参数值类型",
align: "center",
......@@ -301,14 +259,6 @@
customRender: "参数值类型",
},
},
{
title: "jsonPath",
align: "center",
dataIndex: "jsonPath",
scopedSlots: {
customRender: "jsonPath",
},
},
{
title: "默认值",
align: "center",
......@@ -332,6 +282,7 @@
scopedSlots: {
customRender: "描述",
},
width: 200
},
{
......@@ -344,54 +295,19 @@
},
},
],
type: '路径参数',
requestParameters: {
'路径参数': [{
name: ``,
association: undefined,
type: undefined,
jsonPath: ``,
default: ``,
isMust: undefined,
describe: ``,
}],
'headers': [{
name: ``,
association: undefined,
type: undefined,
jsonPath: ``,
default: ``,
isMust: undefined,
describe: ``,
}],
'query': [{
name: ``,
association: undefined,
type: undefined,
jsonPath: ``,
default: ``,
isMust: undefined,
describe: ``,
}],
'body': [{
requestPam: {
type: 'path',
table: []
},
responsePam: {
table: [{
name: ``,
association: undefined,
type: undefined,
jsonPath: ``,
default: ``,
isMust: undefined,
describe: ``,
}]
},
responseParameters: [{
name: ``,
association: undefined,
type: undefined,
jsonPath: ``,
default: ``,
isMust: undefined,
describe: ``,
}],
errorCode_columns: [{
title: "Http Code",
align: "center",
......@@ -451,35 +367,111 @@
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)
})
},
modalSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
alert('submit!');
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;
}
});
},
ceshidayin() {
console.log(this.请求参数_dataSource);
//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;
});
}
},
};
};
</script>
<style lang="less" scoped>
/deep/.ant-drawer-content {
/deep/.ant-drawer-content {
overflow-x: hidden !important;
}
}
.drawer_footer {
.drawer_footer {
z-index: 1;
text-align: left;
background: #fff;
......@@ -489,25 +481,21 @@
bottom: 0;
right: 0;
position: absolute;
}
}
.title_ {
.title_ {
font-size: 16px;
font-weight: bold;
color: #333;
margin-bottom: 10px;
}
}
.table_footer {
.table_footer {
text-align: center;
padding-top: 10px;
}
}
/deep/.ant-drawer-body {
/deep/.ant-drawer-body {
margin-bottom: 100px;
}
/deep/.ant-radio-group {
margin-bottom: 10px !important;
}
}
</style>
\ No newline at end of file
......@@ -36,11 +36,7 @@ export default {
whitespace: true, //必选时,空格是否会被视为错误
message: "请输入产品名称",
trigger: "blur",
},
// {
// pattern: /^[A-Za-z]+$/,
// message: "请输入正确的用户名格式!",
// },
}
],
},
};
......
......@@ -2,63 +2,45 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn">
<button class="add_btn" @click="openDetails()">
<span>新增</span>
</button>
</div>
<span>
<a-input
allowClear
v-model="searchName"
placeholder="请输入应用名称查询"
>
<a-input allowClear v-model="searchForm.appName" placeholder="请输入应用名称查询">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 语言001 </a-select-option>
<a-select-option value="002"> 语言002 </a-select-option>
<a-select v-model="searchForm.deveLanguage">
<a-select-option value="">全部</a-select-option>
<a-select-option v-for="(item, index) of dict.deveLanguage" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
<button class="search_btn">搜索</button>
<button class="search_btn" @click="getList()">搜索</button>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="operation" slot-scope="text, record, index">
<a-button type="link">下载应用{{ index + 1 }}</a-button>
<a-button type="link" @click="openDetails"
>编辑{{ index + 1 }}</a-button
>
<a-button type="link" style="color: #ff4420"
>删除{{ index + 1 }}</a-button
>
<a-button type="link" v-if="record.appFileUrl"
@click="handleDowload(record.appFileUrl)">下载应用</a-button>
<a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除</a-button>
</a-popconfirm>
</template>
</a-table>
<Details ref="Details" />
<Details ref="Details" :deveLanguage="dict.deveLanguage" />
</div>
</div>
</template>
<script>
import { getApps, deleteApps } from "@/api/thePlatformIsSet.js";
import table from "@/mixins/table";
import Details from "./components/Details.vue";
export default {
......@@ -78,34 +60,35 @@ export default {
{
title: "应用名称",
align: "center",
dataIndex: "应用名称",
dataIndex: "appName",
},
{
title: "开发语言",
align: "center",
dataIndex: "开发语言",
dataIndex: "deveLanguage",
},
{
title: "版本",
align: "center",
dataIndex: "版本",
dataIndex: "versionNumber",
},
{
title: "版本信息",
align: "center",
dataIndex: "版本信息",
dataIndex: "versionInfo",
},
{
title: "是否启用",
align: "center",
dataIndex: "是否启用",
dataIndex: "isEnable",
customRender: (text, record, index) => text == 1 ? '' : "",
},
{
title: "上传时间",
align: "center",
dataIndex: "上传时间",
dataIndex: "createTime",
customRender: (text, record, index) => this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"),
},
{
title: "操作",
align: "center",
......@@ -116,7 +99,18 @@ export default {
},
},
],
searchName: undefined,
tablePagination: {
current: 1,
pageSize: 10
},
searchForm: {
deveLanguage: "",
productId: this.$route.query.id,
},
dict: {
deveLanguage: {},
isEnable: {}
}
};
},
components: {
......@@ -124,23 +118,66 @@ export default {
},
mounted() {
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
应用名称: `排队信息查询接口${key + 1}`,
开发语言: `PHP${key + 1}`,
版本: `v${key + 1}.0`,
版本信息: `修复unit功能及部分鉴权问题${key + 1}`,
是否启用: 1,
上传时间: `2022-07-03 20:00:00`,
});
}
this.getList();
},
methods: {
openDetails() {
getList(search) {
getApps({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.searchForm,
...search,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
}
})
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.getList();
},
delRow(item) {
deleteApps({
id: item.id
}).then((res) => {
console.log(res)
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
handleDowload(url) {
let arr = url.split('/')
const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL+'/' + url;
a.download = arr[arr.length - 1];
a.click();
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑应用";
this.$refs.Details.getInfo(item.id)
} else {
this.$refs.Details.modalInfo.title = "新增应用";
}
this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "30%";
},
},
};
......@@ -150,13 +187,15 @@ export default {
/deep/.ant-spin-container {
display: block;
}
.PoliticsShow-Container {
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
&>div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -176,6 +215,7 @@ export default {
overflow: hidden;
background: #43a4ff;
color: ghostwhite;
& span {
position: relative;
z-index: 10;
......@@ -211,7 +251,7 @@ export default {
}
}
& > span {
&>span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -220,21 +260,26 @@ export default {
width: 15rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
......@@ -266,13 +311,16 @@ export default {
}
}
}
.main {
.type0 {
color: #888888;
}
.type1 {
color: #f94545;
}
.levelState {
padding: 5px 8px;
border-radius: 8px;
......@@ -280,12 +328,15 @@ export default {
background: #ffedeb;
border: 1px solid #f94545;
}
.type2 {
color: #04ca8f;
}
/deep/.ant-btn-link {
padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important;
}
}
......
<template>
<a-modal
:width="modalInfo.width"
:visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
centered
destroyOnClose
>
<a-form-model
:label-col="{
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title"
@cancel="modalInfo.visible = false" centered destroyOnClose>
<a-form-model :label-col="{
span: 5,
}"
:wrapper-col="{
}" :wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="应用名称" prop="应用名称">
<a-input v-model="appForm.应用名称" placeholder="请输入" allowClear />
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules">
<a-form-model-item label="应用名称" prop="appName">
<a-input v-model="appForm.appName" placeholder="请输入" allowClear />
</a-form-model-item>
<a-form-model-item label="开发语言" prop="开发语言">
<a-select v-model="appForm.开发语言" placeholder="请选择" allowClear>
<a-select-option value="001"> 选项001 </a-select-option>
<a-form-model-item label="开发语言" prop="deveLanguage">
<a-select v-model="appForm.deveLanguage" placeholder="请选择" allowClear>
<a-select-option v-for="(item, index) of deveLanguage" :key="index" :value="index">
{{ item }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="版本号" prop="版本号">
<a-input v-model="appForm.版本号" placeholder="请输入" allowClear />
<a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear />
</a-form-model-item>
<a-form-model-item label="版本信息" prop="版本信息">
<a-textarea v-model="appForm.版本信息" placeholder="请输入" :rows="4" />
<a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" />
</a-form-model-item>
<a-form-model-item label="应用包" prop="应用包">
<MyUpload
v-model="appForm.应用包"
:uploadInfo="uploadInfo"
@uploadChange="uploadChange"
>
<a-form-model-item label="应用包" prop="appFileUrl">
<MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo">
<a-button style="background: #04ca8f; color: #fff">上传文件</a-button>
</MyUpload>
</a-form-model-item>
<a-form-model-item label="是否启用" prop="是否启用">
<a-switch v-model="appForm.是否启用" />
<a-form-model-item label="是否启用" prop="isEnable">
<a-switch v-model="appForm.isEnable" />
</a-form-model-item>
</a-form-model>
<template slot="footer">
......@@ -54,9 +39,11 @@
</template>
<script>
import { saveApps, getAppsInfo } from "@/api/thePlatformIsSet.js";
import { deepClone } from "@/utils/js/common.js";
export default {
name: "PortalAdminVueDetails",
props: ["deveLanguage"],
data() {
return {
modalInfo: {
......@@ -65,12 +52,13 @@ export default {
width: "30%",
},
appForm: {
应用名称: undefined,
开发语言: undefined,
版本号: undefined,
版本信息: undefined,
应用包: undefined,
是否启用: true,
productId: this.$route.query.id,
appName: "",
deveLanguage: undefined,
versionNumber: "",
versionInfo: "",
appFileUrl: "",
isEnable: false,
},
uploadInfo: {
removeFileList: [], //移除文件列表
......@@ -82,23 +70,52 @@ export default {
// 其他参数 data
// test: "001",
},
verload: 3, // 单位 M
verload: 300, // 单位 M
limit: 1, //限制文件上传数量
whiteFileList: ["apk"],
},
appRules: {},
appRules: {
appName: [{ required: true, message: "请输入应用名称", trigger: ['blur', 'change'] }],
deveLanguage: [{ required: true, message: "请选择开发语言", trigger: ['blur', 'change'] }],
},
};
},
mounted() {},
mounted() {
},
methods: {
uploadChange(fileInfo) {
this.uploadInfo.fileList = deepClone(fileInfo.fileList);
getInfo(id) {
getAppsInfo({ id: id }).then(res => {
res.data.isEnable = res.data.isEnable == 1
this.appForm = res.data
if (res.data.appFileUrl) {
this.uploadInfo.fileList = [
{
uid: id,
name: res.data.appFileUrl,
url: res.data.appFileUrl,
}
]
}
})
},
Modal_Ok() {
this.$refs.appForm.validate((valid) => {
if (valid) {
console.log(this.appForm);
let json = JSON.parse(JSON.stringify(this.appForm))
json.isEnable = json.isEnable ? 1 : 0
saveApps(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 {
this.$message.error(`请完善表单信息!`);
return false;
......
<template>
<a-modal
:width="modalInfo.width"
:visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
centered
destroyOnClose
>
<a-form-model
:label-col="{
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title"
@cancel="modalInfo.visible = false" centered destroyOnClose>
<a-form-model :label-col="{
span: 4,
}"
:wrapper-col="{
}" :wrapper-col="{
span: 20,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="材料名称" prop="材料名称">
<a-input v-model="appForm.材料名称" placeholder="请输入" allowClear />
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules">
<a-form-model-item label="材料名称" prop="docName">
<a-input v-model="appForm.docName" placeholder="请输入" allowClear />
</a-form-model-item>
<a-form-model-item label="版本号" prop="版本号">
<a-input v-model="appForm.版本号" placeholder="请输入" allowClear />
<a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear />
</a-form-model-item>
<a-form-model-item label="版本信息" prop="版本信息">
<a-textarea v-model="appForm.版本信息" placeholder="请输入" :rows="4" />
<a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" />
</a-form-model-item>
<a-form-model-item label="材料文件" prop="材料文件">
<MyUpload
v-model="appForm.材料文件"
:uploadInfo="uploadInfo"
@uploadChange="uploadChange"
>
<a-form-model-item label="材料文件" prop="docFileUrl">
<MyUpload v-model="appForm.docFileUrl" :uploadInfo="uploadInfo">
<a-button style="background: #04ca8f; color: #fff">上传文件</a-button>
</MyUpload>
</a-form-model-item>
......@@ -47,6 +30,7 @@
</template>
<script>
import { saveDocument, getDocumentInfo } from "@/api/thePlatformIsSet.js";
import { deepClone } from "@/utils/js/common.js";
export default {
name: "PortalAdminVueDetails",
......@@ -58,38 +42,60 @@ export default {
width: "30%",
},
appForm: {
材料名称: undefined,
版本号: undefined,
版本信息: undefined,
材料文件: undefined,
productId: this.$route.query.id,
docName: "",
versionNumber: "",
versionInfo: "",
docFileUrl: ""
},
uploadInfo: {
removeFileList: [], //移除文件列表
fileList: [], //文件列表
defaultFileList: [],
multiple: false, //多文件
listType: "text", //text, picture 和 picture-card
prePath: "file/fileupload", //附件存放相对路径 否 不填时候默认为 file/fileupload
objAttach: {
// 其他参数 data
// test: "001",
},
verload: 3, // 单位 M
objAttach: {},
verload: 300, // 单位 M
limit: 1, //限制文件上传数量
whiteFileList: ["doc"],
whiteFileList: ["doc", "docx", "pdf", "xlsx", "xls"],
},
appRules: {
docName: [{ required: true, message: "请输入材料名称", trigger: ['blur', 'change'] }],
},
appRules: {},
};
},
mounted() {},
mounted() { },
methods: {
uploadChange(fileInfo) {
this.uploadInfo.fileList = deepClone(fileInfo.fileList);
getInfo(id) {
getDocumentInfo({ id: id }).then(res => {
this.appForm = res.data
if (res.data.docFileUrl) {
this.uploadInfo.fileList = [
{
uid: id,
name: res.data.docFileUrl,
url: res.data.docFileUrl,
}
]
}
})
},
Modal_Ok() {
this.$refs.appForm.validate((valid) => {
if (valid) {
console.log(this.appForm);
saveDocument(this.appForm).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 {
this.$message.error(`请完善表单信息!`);
return false;
......
......@@ -2,55 +2,26 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn">
<button class="add_btn" @click="openDetails()">
<span>新增</span>
</button>
</div>
<span>
<a-input
allowClear
v-model="searchName"
placeholder="请输入应用名称查询"
>
<a-input allowClear v-model="searchName" placeholder="请输入资料名称查询">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 语言001 </a-select-option>
<a-select-option value="002"> 语言002 </a-select-option>
</a-select>
<button class="search_btn">搜索</button>
<button class="search_btn" @click="getList()">搜索</button>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="operation" slot-scope="text, record, index">
<a-button type="link">下载{{ index + 1 }}</a-button>
<a-button type="link" @click="openDetails"
>编辑{{ index + 1 }}</a-button
>
<a-button type="link" style="color: #ff4420"
>删除{{ index + 1 }}</a-button
>
<a-button type="link" v-if="record.docFileUrl" @click="handleDowload(record.docFileUrl)">下载</a-button>
<a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)">
<a-button type="link" style="color: #ff4420">删除</a-button>
</a-popconfirm>
</template>
</a-table>
<Details ref="Details" />
......@@ -59,6 +30,7 @@
</template>
<script>
import { getDocument, deleteDocument } from "@/api/thePlatformIsSet.js";
import table from "@/mixins/table";
import Details from "./components/Details.vue";
export default {
......@@ -78,24 +50,25 @@ export default {
{
title: "材料名称",
align: "center",
dataIndex: "材料名称",
dataIndex: "docName",
},
{
title: "版本",
align: "center",
dataIndex: "版本",
dataIndex: "versionNumber",
},
{
title: "材料信息",
align: "center",
dataIndex: "材料信息",
dataIndex: "versionInfo",
},
{
title: "上传时间",
align: "center",
dataIndex: "上传时间",
dataIndex: "createTime",
customRender: (text, record, index) => this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"),
},
{
......@@ -109,6 +82,10 @@ export default {
},
],
searchName: undefined,
tablePagination: {
current: 1,
pageSize: 10
},
};
},
components: {
......@@ -116,21 +93,66 @@ export default {
},
mounted() {
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
材料名称: `排队信息查询接口${key + 1}`,
版本: `v${key + 1}.0`,
材料信息: `修复unit功能及部分鉴权问题${key + 1}`,
上传时间: `2022-07-03 20:00:00`,
});
}
this.getList();
},
methods: {
openDetails() {
getList(search) {
getDocument({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
docName: this.searchName,
productId: this.$route.query.id,
...search,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
}
})
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.getList();
},
delRow(item) {
deleteDocument({
id: item.id
}).then((res) => {
console.log(res)
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
handleDowload(url) {
let arr = url.split('/')
const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL + '/' + url;
a.download = arr[arr.length - 1];
a.click();
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑材料";
this.$refs.Details.getInfo(item.id)
} else {
this.$refs.Details.modalInfo.title = "新增材料";
}
this.$refs.Details.modalInfo.visible = true;
this.$refs.Details.modalInfo.width = "27%";
this.$refs.Details.modalInfo.width = "30%";
},
},
};
......@@ -140,13 +162,15 @@ export default {
/deep/.ant-spin-container {
display: block;
}
.PoliticsShow-Container {
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
&>div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -166,6 +190,7 @@ export default {
overflow: hidden;
background: #43a4ff;
color: ghostwhite;
& span {
position: relative;
z-index: 10;
......@@ -201,7 +226,7 @@ export default {
}
}
& > span {
&>span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -210,21 +235,26 @@ export default {
width: 15rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
......@@ -256,13 +286,16 @@ export default {
}
}
}
.main {
.type0 {
color: #888888;
}
.type1 {
color: #f94545;
}
.levelState {
padding: 5px 8px;
border-radius: 8px;
......@@ -270,12 +303,15 @@ export default {
background: #ffedeb;
border: 1px solid #f94545;
}
.type2 {
color: #04ca8f;
}
/deep/.ant-btn-link {
padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important;
}
}
......
......@@ -15,7 +15,7 @@
</a-button>
<ul class="content">
<li class="list" v-for="item, index of listData" :key="index">
<a-popover placement="leftBottom">
<a-popover placement="leftBottom" trigger="click">
<template slot="content">
<div class="popoverContent">
<p>
......@@ -24,7 +24,7 @@
</a-button>
</p>
<p>
<a-popconfirm title="确定要删除此产品吗?" ok-text="Yes" cancel-text="No" @confirm="delModal(item)">
<a-popconfirm title="确定要删除此产品吗?" ok-text="确定" cancel-text="取消" @confirm="delModal(item)">
<a-button type="link" size="small" style="color: #ff4d4f">
删除
</a-button>
......@@ -91,12 +91,6 @@ export default {
this.listData = res.data.data
})
},
pushroeuter() {
this.$router.push({
path: "/home/thePlatformIsSet/portDocument",
// query: { testoption: "test001" },
});
},
showModal(item) {
if (item) {
this.$refs.AddEditAppName.VisibleTitle = "编辑";
......
......@@ -19,32 +19,33 @@ CREATE TABLE `mortals_xhx_product` (
-- 产品接口表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_product_interface`;
CREATE TABLE `mortals_xhx_product_interface` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '序号,主键,自增长',
CREATE TABLE mortals_xhx_product_interface(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`productId` bigint(20) NOT NULL COMMENT '产品id',
`interfaceName` varchar(128) NOT NULL COMMENT '接口名称',
`versionNumber` varchar(64) NOT NULL COMMENT '版本号',
`requestType` tinyint(2) DEFAULT '1' COMMENT '请求类型1:POST,2:GET',
`requestProtocol` tinyint(2) DEFAULT '1' COMMENT '请求协议1:HTTP,2:HTTPS',
`requestUrl` varchar(128) DEFAULT NULL COMMENT '请求路径',
`timeoutValue` int(8) DEFAULT NULL COMMENT '超时时间(秒)',
`limitStrategy` tinyint(2) DEFAULT NULL COMMENT '限流策略1:分钟,2:小时',
`network` varchar(64) DEFAULT NULL COMMENT '访问网络1互联网2政务网',
`requestUrl` varchar(128) COMMENT '请求路径',
`timeoutValue` int(8) COMMENT '超时时间(秒)',
`limitStrategy` tinyint(2) COMMENT '限流策略1:分钟,2:小时',
`network` varchar(64) COMMENT '访问网络1互联网2政务网',
`description` text COMMENT '接口描述',
`flowControl` text COMMENT '流控信息',
`authorizeInfo` text COMMENT '授权信息',
`interfaceTag` tinyint(2) DEFAULT NULL COMMENT '标签',
`contentType` varchar(128) COMMENT '内容类型',
`interfaceTag` tinyint(2) COMMENT '标签',
`interfaceSource` tinyint(2) DEFAULT '1' COMMENT '来源1自有2非自有',
`inEncrypt` tinyint(2) COMMENT '入参是否加密',
`requestParameters` text COMMENT '请求参数',
`outEncrypt` tinyint(2) COMMENT '出参是否加密',
`responseParameters` text COMMENT '响应数据',
`errorCode` text COMMENT '错误码',
`changeHistory` text COMMENT '变更历史',
`remark` text COMMENT '接口描述',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) DEFAULT NULL COMMENT '更新用户',
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品接口表';
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品接口';
-- ----------------------------
-- 产品应用表
......
......@@ -2,11 +2,11 @@ package com.mortals.xhx.module.product.model;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
/**
* 产品接口实体对象
*
* @author zxfei
* @date 2023-02-22
*/
* 产品接口实体对象
*
* @author zxfei
* @date 2023-05-16
*/
public class ProductInterfaceEntity extends ProductInterfaceVo {
private static final long serialVersionUID = 1L;
......@@ -52,13 +52,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
*/
private String description;
/**
* 流控信息
*/
private String flowControl;
/**
* 授权信息
* 内容类型
*/
private String authorizeInfo;
private String contentType;
/**
* 标签
*/
......@@ -67,22 +63,26 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 来源1自有2非自有
*/
private Integer interfaceSource;
/**
* 入参是否加密
*/
private Integer inEncrypt;
/**
* 请求参数
*/
private String requestParameters;
/**
* 响应数据
* 出参是否加密
*/
private String responseParameters;
private Integer outEncrypt;
/**
* 错误码
* 响应数据
*/
private String errorCode;
private String responseParameters;
/**
* 变更历史
* 接口描述
*/
private String changeHistory;
private String remark;
......@@ -228,32 +228,18 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.description = description;
}
/**
* 获取 流控信息
* @return String
*/
public String getFlowControl(){
return flowControl;
}
/**
* 设置 流控信息
* @param flowControl
*/
public void setFlowControl(String flowControl){
this.flowControl = flowControl;
}
/**
* 获取 授权信息
* 获取 内容类型
* @return String
*/
public String getAuthorizeInfo(){
return authorizeInfo;
public String getContentType(){
return contentType;
}
/**
* 设置 授权信息
* @param authorizeInfo
* 设置 内容类型
* @param contentType
*/
public void setAuthorizeInfo(String authorizeInfo){
this.authorizeInfo = authorizeInfo;
public void setContentType(String contentType){
this.contentType = contentType;
}
/**
* 获取 标签
......@@ -283,6 +269,20 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
public void setInterfaceSource(Integer interfaceSource){
this.interfaceSource = interfaceSource;
}
/**
* 获取 入参是否加密
* @return Integer
*/
public Integer getInEncrypt(){
return inEncrypt;
}
/**
* 设置 入参是否加密
* @param inEncrypt
*/
public void setInEncrypt(Integer inEncrypt){
this.inEncrypt = inEncrypt;
}
/**
* 获取 请求参数
* @return String
......@@ -297,6 +297,20 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
public void setRequestParameters(String requestParameters){
this.requestParameters = requestParameters;
}
/**
* 获取 出参是否加密
* @return Integer
*/
public Integer getOutEncrypt(){
return outEncrypt;
}
/**
* 设置 出参是否加密
* @param outEncrypt
*/
public void setOutEncrypt(Integer outEncrypt){
this.outEncrypt = outEncrypt;
}
/**
* 获取 响应数据
* @return String
......@@ -312,32 +326,18 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.responseParameters = responseParameters;
}
/**
* 获取 错误码
* @return String
*/
public String getErrorCode(){
return errorCode;
}
/**
* 设置 错误码
* @param errorCode
*/
public void setErrorCode(String errorCode){
this.errorCode = errorCode;
}
/**
* 获取 变更历史
* 获取 接口描述
* @return String
*/
public String getChangeHistory(){
return changeHistory;
public String getRemark(){
return remark;
}
/**
* 设置 变更历史
* @param changeHistory
* 设置 接口描述
* @param remark
*/
public void setChangeHistory(String changeHistory){
this.changeHistory = changeHistory;
public void setRemark(String remark){
this.remark = remark;
}
......@@ -371,14 +371,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
sb.append(",limitStrategy:").append(getLimitStrategy());
sb.append(",network:").append(getNetwork());
sb.append(",description:").append(getDescription());
sb.append(",flowControl:").append(getFlowControl());
sb.append(",authorizeInfo:").append(getAuthorizeInfo());
sb.append(",contentType:").append(getContentType());
sb.append(",interfaceTag:").append(getInterfaceTag());
sb.append(",interfaceSource:").append(getInterfaceSource());
sb.append(",inEncrypt:").append(getInEncrypt());
sb.append(",requestParameters:").append(getRequestParameters());
sb.append(",outEncrypt:").append(getOutEncrypt());
sb.append(",responseParameters:").append(getResponseParameters());
sb.append(",errorCode:").append(getErrorCode());
sb.append(",changeHistory:").append(getChangeHistory());
sb.append(",remark:").append(getRemark());
return sb.toString();
}
......@@ -404,20 +404,20 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.description = "";
this.flowControl = "";
this.authorizeInfo = "";
this.contentType = "";
this.interfaceTag = null;
this.interfaceSource = 1;
this.inEncrypt = null;
this.requestParameters = "";
this.responseParameters = "";
this.outEncrypt = null;
this.errorCode = "";
this.responseParameters = "";
this.changeHistory = "";
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.ProductInterfaceEntity;
/**
* 产品接口查询对象
*
* @author zxfei
* @date 2023-02-22
*/
* 产品接口查询对象
*
* @author zxfei
* @date 2023-05-16
*/
public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
......@@ -124,16 +123,11 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 接口描述排除列表 */
private List <String> descriptionNotList;
/** 流控信息 */
private List<String> flowControlList;
/** 流控信息排除列表 */
private List <String> flowControlNotList;
/** 授权信息 */
private List<String> authorizeInfoList;
/** 内容类型 */
private List<String> contentTypeList;
/** 授权信息排除列表 */
private List <String> authorizeInfoNotList;
/** 内容类型排除列表 */
private List <String> contentTypeNotList;
/** 开始 标签 */
private Integer interfaceTagStart;
......@@ -164,26 +158,51 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 来源1自有2非自有排除列表 */
private List <Integer> interfaceSourceNotList;
/** 开始 入参是否加密 */
private Integer inEncryptStart;
/** 结束 入参是否加密 */
private Integer inEncryptEnd;
/** 增加 入参是否加密 */
private Integer inEncryptIncrement;
/** 入参是否加密列表 */
private List <Integer> inEncryptList;
/** 入参是否加密排除列表 */
private List <Integer> inEncryptNotList;
/** 请求参数 */
private List<String> requestParametersList;
/** 请求参数排除列表 */
private List <String> requestParametersNotList;
/** 开始 出参是否加密 */
private Integer outEncryptStart;
/** 结束 出参是否加密 */
private Integer outEncryptEnd;
/** 增加 出参是否加密 */
private Integer outEncryptIncrement;
/** 出参是否加密列表 */
private List <Integer> outEncryptList;
/** 出参是否加密排除列表 */
private List <Integer> outEncryptNotList;
/** 响应数据 */
private List<String> responseParametersList;
/** 响应数据排除列表 */
private List <String> responseParametersNotList;
/** 错误码 */
private List<String> errorCodeList;
/** 错误码排除列表 */
private List <String> errorCodeNotList;
/** 变更历史 */
private List<String> changeHistoryList;
/** 接口描述 */
private List<String> remarkList;
/** 变更历史排除列表 */
private List <String> changeHistoryNotList;
/** 接口描述排除列表 */
private List <String> remarkNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
......@@ -881,67 +900,35 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
}
/**
* 获取 流控信息
* @return flowControlList
*/
public List<String> getFlowControlList(){
return this.flowControlList;
}
/**
* 设置 流控信息
* @param flowControlList
*/
public void setFlowControlList(List<String> flowControlList){
this.flowControlList = flowControlList;
}
/**
* 获取 流控信息
* @return flowControlNotList
*/
public List<String> getFlowControlNotList(){
return this.flowControlNotList;
}
/**
* 设置 流控信息
* @param flowControlNotList
* 获取 内容类型
* @return contentTypeList
*/
public void setFlowControlNotList(List<String> flowControlNotList){
this.flowControlNotList = flowControlNotList;
public List<String> getContentTypeList(){
return this.contentTypeList;
}
/**
* 获取 授权信息
* @return authorizeInfoList
* 设置 内容类型
* @param contentTypeList
*/
public List<String> getAuthorizeInfoList(){
return this.authorizeInfoList;
public void setContentTypeList(List<String> contentTypeList){
this.contentTypeList = contentTypeList;
}
/**
* 设置 授权信息
* @param authorizeInfoList
* 获取 内容类型
* @return contentTypeNotList
*/
public void setAuthorizeInfoList(List<String> authorizeInfoList){
this.authorizeInfoList = authorizeInfoList;
public List<String> getContentTypeNotList(){
return this.contentTypeNotList;
}
/**
* 获取 授权信息
* @return authorizeInfoNotList
* 设置 内容类型
* @param contentTypeNotList
*/
public List<String> getAuthorizeInfoNotList(){
return this.authorizeInfoNotList;
}
/**
* 设置 授权信息
* @param authorizeInfoNotList
*/
public void setAuthorizeInfoNotList(List<String> authorizeInfoNotList){
this.authorizeInfoNotList = authorizeInfoNotList;
public void setContentTypeNotList(List<String> contentTypeNotList){
this.contentTypeNotList = contentTypeNotList;
}
/**
......@@ -1106,6 +1093,87 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
}
/**
* 获取 开始 入参是否加密
* @return inEncryptStart
*/
public Integer getInEncryptStart(){
return this.inEncryptStart;
}
/**
* 设置 开始 入参是否加密
* @param inEncryptStart
*/
public void setInEncryptStart(Integer inEncryptStart){
this.inEncryptStart = inEncryptStart;
}
/**
* 获取 结束 入参是否加密
* @return $inEncryptEnd
*/
public Integer getInEncryptEnd(){
return this.inEncryptEnd;
}
/**
* 设置 结束 入参是否加密
* @param inEncryptEnd
*/
public void setInEncryptEnd(Integer inEncryptEnd){
this.inEncryptEnd = inEncryptEnd;
}
/**
* 获取 增加 入参是否加密
* @return inEncryptIncrement
*/
public Integer getInEncryptIncrement(){
return this.inEncryptIncrement;
}
/**
* 设置 增加 入参是否加密
* @param inEncryptIncrement
*/
public void setInEncryptIncrement(Integer inEncryptIncrement){
this.inEncryptIncrement = inEncryptIncrement;
}
/**
* 获取 入参是否加密
* @return inEncryptList
*/
public List<Integer> getInEncryptList(){
return this.inEncryptList;
}
/**
* 设置 入参是否加密
* @param inEncryptList
*/
public void setInEncryptList(List<Integer> inEncryptList){
this.inEncryptList = inEncryptList;
}
/**
* 获取 入参是否加密
* @return inEncryptNotList
*/
public List<Integer> getInEncryptNotList(){
return this.inEncryptNotList;
}
/**
* 设置 入参是否加密
* @param inEncryptNotList
*/
public void setInEncryptNotList(List<Integer> inEncryptNotList){
this.inEncryptNotList = inEncryptNotList;
}
/**
* 获取 请求参数
* @return requestParametersList
......@@ -1139,99 +1207,148 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
}
/**
* 获取 响应数据
* @return responseParametersList
* 获取 开始 出参是否加密
* @return outEncryptStart
*/
public List<String> getResponseParametersList(){
return this.responseParametersList;
public Integer getOutEncryptStart(){
return this.outEncryptStart;
}
/**
* 设置 响应数据
* @param responseParametersList
* 设置 开始 出参是否加密
* @param outEncryptStart
*/
public void setResponseParametersList(List<String> responseParametersList){
this.responseParametersList = responseParametersList;
public void setOutEncryptStart(Integer outEncryptStart){
this.outEncryptStart = outEncryptStart;
}
/**
* 获取 响应数据
* @return responseParametersNotList
* 获取 结束 出参是否加密
* @return $outEncryptEnd
*/
public List<String> getResponseParametersNotList(){
return this.responseParametersNotList;
public Integer getOutEncryptEnd(){
return this.outEncryptEnd;
}
/**
* 设置 响应数据
* @param responseParametersNotList
* 设置 结束 出参是否加密
* @param outEncryptEnd
*/
public void setResponseParametersNotList(List<String> responseParametersNotList){
this.responseParametersNotList = responseParametersNotList;
public void setOutEncryptEnd(Integer outEncryptEnd){
this.outEncryptEnd = outEncryptEnd;
}
/**
* 获取 增加 出参是否加密
* @return outEncryptIncrement
*/
public Integer getOutEncryptIncrement(){
return this.outEncryptIncrement;
}
/**
* 获取 错误码
* @return errorCodeList
* 设置 增加 出参是否加密
* @param outEncryptIncrement
*/
public List<String> getErrorCodeList(){
return this.errorCodeList;
public void setOutEncryptIncrement(Integer outEncryptIncrement){
this.outEncryptIncrement = outEncryptIncrement;
}
/**
* 设置 错误码
* @param errorCodeList
* 获取 出参是否加密
* @return outEncryptList
*/
public void setErrorCodeList(List<String> errorCodeList){
this.errorCodeList = errorCodeList;
public List<Integer> getOutEncryptList(){
return this.outEncryptList;
}
/**
* 获取 错误码
* @return errorCodeNotList
* 设置 出参是否加密
* @param outEncryptList
*/
public List<String> getErrorCodeNotList(){
return this.errorCodeNotList;
public void setOutEncryptList(List<Integer> outEncryptList){
this.outEncryptList = outEncryptList;
}
/**
* 设置 错误码
* @param errorCodeNotList
* 获取 出参是否加密
* @return outEncryptNotList
*/
public void setErrorCodeNotList(List<String> errorCodeNotList){
this.errorCodeNotList = errorCodeNotList;
public List<Integer> getOutEncryptNotList(){
return this.outEncryptNotList;
}
/**
* 获取 变更历史
* @return changeHistoryList
* 设置 出参是否加密
* @param outEncryptNotList
*/
public List<String> getChangeHistoryList(){
return this.changeHistoryList;
public void setOutEncryptNotList(List<Integer> outEncryptNotList){
this.outEncryptNotList = outEncryptNotList;
}
/**
* 设置 变更历史
* @param changeHistoryList
* 获取 响应数据
* @return responseParametersList
*/
public void setChangeHistoryList(List<String> changeHistoryList){
this.changeHistoryList = changeHistoryList;
public List<String> getResponseParametersList(){
return this.responseParametersList;
}
/**
* 获取 变更历史
* @return changeHistoryNotList
* 设置 响应数据
* @param responseParametersList
*/
public List<String> getChangeHistoryNotList(){
return this.changeHistoryNotList;
public void setResponseParametersList(List<String> responseParametersList){
this.responseParametersList = responseParametersList;
}
/**
* 设置 变更历史
* @param changeHistoryNotList
* 获取 响应数据
* @return responseParametersNotList
*/
public void setChangeHistoryNotList(List<String> changeHistoryNotList){
this.changeHistoryNotList = changeHistoryNotList;
public List<String> getResponseParametersNotList(){
return this.responseParametersNotList;
}
/**
* 设置 响应数据
* @param responseParametersNotList
*/
public void setResponseParametersNotList(List<String> responseParametersNotList){
this.responseParametersNotList = responseParametersNotList;
}
/**
* 获取 接口描述
* @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;
}
/**
......@@ -1881,39 +1998,20 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/**
* 设置 流控信息
* @param flowControl
* 设置 内容类型
* @param contentType
*/
public ProductInterfaceQuery flowControl(String flowControl){
setFlowControl(flowControl);
public ProductInterfaceQuery contentType(String contentType){
setContentType(contentType);
return this;
}
/**
* 设置 流控信息
* @param flowControlList
* 设置 内容类型
* @param contentTypeList
*/
public ProductInterfaceQuery flowControlList(List<String> flowControlList){
this.flowControlList = flowControlList;
return this;
}
/**
* 设置 授权信息
* @param authorizeInfo
*/
public ProductInterfaceQuery authorizeInfo(String authorizeInfo){
setAuthorizeInfo(authorizeInfo);
return this;
}
/**
* 设置 授权信息
* @param authorizeInfoList
*/
public ProductInterfaceQuery authorizeInfoList(List<String> authorizeInfoList){
this.authorizeInfoList = authorizeInfoList;
public ProductInterfaceQuery contentTypeList(List<String> contentTypeList){
this.contentTypeList = contentTypeList;
return this;
}
......@@ -2025,6 +2123,60 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
return this;
}
/**
* 设置 入参是否加密
* @param inEncrypt
*/
public ProductInterfaceQuery inEncrypt(Integer inEncrypt){
setInEncrypt(inEncrypt);
return this;
}
/**
* 设置 开始 入参是否加密
* @param inEncryptStart
*/
public ProductInterfaceQuery inEncryptStart(Integer inEncryptStart){
this.inEncryptStart = inEncryptStart;
return this;
}
/**
* 设置 结束 入参是否加密
* @param inEncryptEnd
*/
public ProductInterfaceQuery inEncryptEnd(Integer inEncryptEnd){
this.inEncryptEnd = inEncryptEnd;
return this;
}
/**
* 设置 增加 入参是否加密
* @param inEncryptIncrement
*/
public ProductInterfaceQuery inEncryptIncrement(Integer inEncryptIncrement){
this.inEncryptIncrement = inEncryptIncrement;
return this;
}
/**
* 设置 入参是否加密
* @param inEncryptList
*/
public ProductInterfaceQuery inEncryptList(List<Integer> inEncryptList){
this.inEncryptList = inEncryptList;
return this;
}
/**
* 设置 入参是否加密
* @param inEncryptNotList
*/
public ProductInterfaceQuery inEncryptNotList(List<Integer> inEncryptNotList){
this.inEncryptNotList = inEncryptNotList;
return this;
}
/**
* 设置 请求参数
......@@ -2044,60 +2196,95 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
return this;
}
/**
* 设置 出参是否加密
* @param outEncrypt
*/
public ProductInterfaceQuery outEncrypt(Integer outEncrypt){
setOutEncrypt(outEncrypt);
return this;
}
/**
* 设置 响应数据
* @param responseParameters
* 设置 开始 出参是否加密
* @param outEncryptStart
*/
public ProductInterfaceQuery responseParameters(String responseParameters){
setResponseParameters(responseParameters);
public ProductInterfaceQuery outEncryptStart(Integer outEncryptStart){
this.outEncryptStart = outEncryptStart;
return this;
}
/**
* 设置 响应数据
* @param responseParametersList
* 设置 结束 出参是否加密
* @param outEncryptEnd
*/
public ProductInterfaceQuery responseParametersList(List<String> responseParametersList){
this.responseParametersList = responseParametersList;
public ProductInterfaceQuery outEncryptEnd(Integer outEncryptEnd){
this.outEncryptEnd = outEncryptEnd;
return this;
}
/**
* 设置 增加 出参是否加密
* @param outEncryptIncrement
*/
public ProductInterfaceQuery outEncryptIncrement(Integer outEncryptIncrement){
this.outEncryptIncrement = outEncryptIncrement;
return this;
}
/**
* 设置 出参是否加密
* @param outEncryptList
*/
public ProductInterfaceQuery outEncryptList(List<Integer> outEncryptList){
this.outEncryptList = outEncryptList;
return this;
}
/**
* 设置 出参是否加密
* @param outEncryptNotList
*/
public ProductInterfaceQuery outEncryptNotList(List<Integer> outEncryptNotList){
this.outEncryptNotList = outEncryptNotList;
return this;
}
/**
* 设置 错误码
* @param errorCode
* 设置 响应数据
* @param responseParameters
*/
public ProductInterfaceQuery errorCode(String errorCode){
setErrorCode(errorCode);
public ProductInterfaceQuery responseParameters(String responseParameters){
setResponseParameters(responseParameters);
return this;
}
/**
* 设置 错误码
* @param errorCodeList
* 设置 响应数据
* @param responseParametersList
*/
public ProductInterfaceQuery errorCodeList(List<String> errorCodeList){
this.errorCodeList = errorCodeList;
public ProductInterfaceQuery responseParametersList(List<String> responseParametersList){
this.responseParametersList = responseParametersList;
return this;
}
/**
* 设置 变更历史
* @param changeHistory
* 设置 接口描述
* @param remark
*/
public ProductInterfaceQuery changeHistory(String changeHistory){
setChangeHistory(changeHistory);
public ProductInterfaceQuery remark(String remark){
setRemark(remark);
return this;
}
/**
* 设置 变更历史
* @param changeHistoryList
* 设置 接口描述
* @param remarkList
*/
public ProductInterfaceQuery changeHistoryList(List<String> changeHistoryList){
this.changeHistoryList = changeHistoryList;
public ProductInterfaceQuery remarkList(List<String> remarkList){
this.remarkList = remarkList;
return this;
}
......
......@@ -33,9 +33,12 @@ public class ProductInterfaceController extends BaseCRUDJsonBodyMappingControlle
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, "contentType", paramService.getParamBySecondOrganize("ProductInterface","contentType"));
this.addDict(model, "network", paramService.getParamBySecondOrganize("ProductInterface","network"));
this.addDict(model, "interfaceTag", paramService.getParamBySecondOrganize("ProductInterface","interfaceTag"));
this.addDict(model, "interfaceSource", paramService.getParamBySecondOrganize("ProductInterface","interfaceSource"));
this.addDict(model, "inEncrypt", paramService.getParamBySecondOrganize("ProductApps","isEnable"));
this.addDict(model, "outEncrypt", paramService.getParamBySecondOrganize("ProductApps","isEnable"));
super.init(model, context);
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.product.dao.ibatis.ProductInterfaceDaoImpl">
<!-- 字段和属性映射 -->
......@@ -16,14 +16,14 @@
<result property="limitStrategy" column="limitStrategy" />
<result property="network" column="network" />
<result property="description" column="description" />
<result property="flowControl" column="flowControl" />
<result property="authorizeInfo" column="authorizeInfo" />
<result property="contentType" column="contentType" />
<result property="interfaceTag" column="interfaceTag" />
<result property="interfaceSource" column="interfaceSource" />
<result property="inEncrypt" column="inEncrypt" />
<result property="requestParameters" column="requestParameters" />
<result property="outEncrypt" column="outEncrypt" />
<result property="responseParameters" column="responseParameters" />
<result property="errorCode" column="errorCode" />
<result property="changeHistory" column="changeHistory" />
<result property="remark" column="remark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
......@@ -68,11 +68,8 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('description') or colPickMode == 1 and data.containsKey('description')))">
a.description,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowControl') or colPickMode == 1 and data.containsKey('flowControl')))">
a.flowControl,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('authorizeInfo') or colPickMode == 1 and data.containsKey('authorizeInfo')))">
a.authorizeInfo,
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('contentType') or colPickMode == 1 and data.containsKey('contentType')))">
a.contentType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('interfaceTag') or colPickMode == 1 and data.containsKey('interfaceTag')))">
a.interfaceTag,
......@@ -80,17 +77,20 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('interfaceSource') or colPickMode == 1 and data.containsKey('interfaceSource')))">
a.interfaceSource,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('inEncrypt') or colPickMode == 1 and data.containsKey('inEncrypt')))">
a.inEncrypt,
</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('outEncrypt') or colPickMode == 1 and data.containsKey('outEncrypt')))">
a.outEncrypt,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('responseParameters') or colPickMode == 1 and data.containsKey('responseParameters')))">
a.responseParameters,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('errorCode') or colPickMode == 1 and data.containsKey('errorCode')))">
a.errorCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('changeHistory') or colPickMode == 1 and data.containsKey('changeHistory')))">
a.changeHistory,
<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,
......@@ -109,18 +109,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<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,flowControl,authorizeInfo,interfaceTag,interfaceSource,requestParameters,responseParameters,errorCode,changeHistory,createUserId,createTime,updateUserId,updateTime)
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{flowControl},#{authorizeInfo},#{interfaceTag},#{interfaceSource},#{requestParameters},#{responseParameters},#{errorCode},#{changeHistory},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{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,flowControl,authorizeInfo,interfaceTag,interfaceSource,requestParameters,responseParameters,errorCode,changeHistory,createUserId,createTime,updateUserId,updateTime)
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,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.flowControl},#{item.authorizeInfo},#{item.interfaceTag},#{item.interfaceSource},#{item.requestParameters},#{item.responseParameters},#{item.errorCode},#{item.changeHistory},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
(#{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})
</foreach>
</insert>
......@@ -175,11 +175,8 @@
<if test="(colPickMode==0 and data.containsKey('description')) or (colPickMode==1 and !data.containsKey('description'))">
a.description=#{data.description},
</if>
<if test="(colPickMode==0 and data.containsKey('flowControl')) or (colPickMode==1 and !data.containsKey('flowControl'))">
a.flowControl=#{data.flowControl},
</if>
<if test="(colPickMode==0 and data.containsKey('authorizeInfo')) or (colPickMode==1 and !data.containsKey('authorizeInfo'))">
a.authorizeInfo=#{data.authorizeInfo},
<if test="(colPickMode==0 and data.containsKey('contentType')) or (colPickMode==1 and !data.containsKey('contentType'))">
a.contentType=#{data.contentType},
</if>
<if test="(colPickMode==0 and data.containsKey('interfaceTag')) or (colPickMode==1 and !data.containsKey('interfaceTag'))">
a.interfaceTag=#{data.interfaceTag},
......@@ -193,17 +190,26 @@
<if test="(colPickMode==0 and data.containsKey('interfaceSourceIncrement')) or (colPickMode==1 and !data.containsKey('interfaceSourceIncrement'))">
a.interfaceSource=ifnull(a.interfaceSource,0) + #{data.interfaceSourceIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('inEncrypt')) or (colPickMode==1 and !data.containsKey('inEncrypt'))">
a.inEncrypt=#{data.inEncrypt},
</if>
<if test="(colPickMode==0 and data.containsKey('inEncryptIncrement')) or (colPickMode==1 and !data.containsKey('inEncryptIncrement'))">
a.inEncrypt=ifnull(a.inEncrypt,0) + #{data.inEncryptIncrement},
</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('outEncrypt')) or (colPickMode==1 and !data.containsKey('outEncrypt'))">
a.outEncrypt=#{data.outEncrypt},
</if>
<if test="(colPickMode==0 and data.containsKey('outEncryptIncrement')) or (colPickMode==1 and !data.containsKey('outEncryptIncrement'))">
a.outEncrypt=ifnull(a.outEncrypt,0) + #{data.outEncryptIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('responseParameters')) or (colPickMode==1 and !data.containsKey('responseParameters'))">
a.responseParameters=#{data.responseParameters},
</if>
<if test="(colPickMode==0 and data.containsKey('errorCode')) or (colPickMode==1 and !data.containsKey('errorCode'))">
a.errorCode=#{data.errorCode},
</if>
<if test="(colPickMode==0 and data.containsKey('changeHistory')) or (colPickMode==1 and !data.containsKey('changeHistory'))">
a.changeHistory=#{data.changeHistory},
<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},
......@@ -330,17 +336,10 @@
</if>
</foreach>
</trim>
<trim prefix="flowControl=(case" suffix="ELSE flowControl end),">
<trim prefix="contentType=(case" suffix="ELSE contentType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('flowControl')) or (colPickMode==1 and !item.containsKey('flowControl'))">
when a.id=#{item.id} then #{item.flowControl}
</if>
</foreach>
</trim>
<trim prefix="authorizeInfo=(case" suffix="ELSE authorizeInfo end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('authorizeInfo')) or (colPickMode==1 and !item.containsKey('authorizeInfo'))">
when a.id=#{item.id} then #{item.authorizeInfo}
<if test="(colPickMode==0 and item.containsKey('contentType')) or (colPickMode==1 and !item.containsKey('contentType'))">
when a.id=#{item.id} then #{item.contentType}
</if>
</foreach>
</trim>
......@@ -368,6 +367,18 @@
</choose>
</foreach>
</trim>
<trim prefix="inEncrypt=(case" suffix="ELSE inEncrypt end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('inEncrypt')) or (colPickMode==1 and !item.containsKey('inEncrypt'))">
when a.id=#{item.id} then #{item.inEncrypt}
</when>
<when test="(colPickMode==0 and item.containsKey('inEncryptIncrement')) or (colPickMode==1 and !item.containsKey('inEncryptIncrement'))">
when a.id=#{item.id} then ifnull(a.inEncrypt,0) + #{item.inEncryptIncrement}
</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'))">
......@@ -375,24 +386,29 @@
</if>
</foreach>
</trim>
<trim prefix="responseParameters=(case" suffix="ELSE responseParameters end),">
<trim prefix="outEncrypt=(case" suffix="ELSE outEncrypt end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('responseParameters')) or (colPickMode==1 and !item.containsKey('responseParameters'))">
when a.id=#{item.id} then #{item.responseParameters}
</if>
<choose>
<when test="(colPickMode==0 and item.containsKey('outEncrypt')) or (colPickMode==1 and !item.containsKey('outEncrypt'))">
when a.id=#{item.id} then #{item.outEncrypt}
</when>
<when test="(colPickMode==0 and item.containsKey('outEncryptIncrement')) or (colPickMode==1 and !item.containsKey('outEncryptIncrement'))">
when a.id=#{item.id} then ifnull(a.outEncrypt,0) + #{item.outEncryptIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="errorCode=(case" suffix="ELSE errorCode end),">
<trim prefix="responseParameters=(case" suffix="ELSE responseParameters end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('errorCode')) or (colPickMode==1 and !item.containsKey('errorCode'))">
when a.id=#{item.id} then #{item.errorCode}
<if test="(colPickMode==0 and item.containsKey('responseParameters')) or (colPickMode==1 and !item.containsKey('responseParameters'))">
when a.id=#{item.id} then #{item.responseParameters}
</if>
</foreach>
</trim>
<trim prefix="changeHistory=(case" suffix="ELSE changeHistory end),">
<trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('changeHistory')) or (colPickMode==1 and !item.containsKey('changeHistory'))">
when a.id=#{item.id} then #{item.changeHistory}
<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>
......@@ -558,13 +574,13 @@
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
<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')">
<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}
......@@ -585,13 +601,13 @@
${_conditionType_} a.productId is null
</if>
</if>
<if test="conditionParamRef.containsKey('productIdList')">
<if test="conditionParamRef.containsKey('productIdList') and conditionParamRef.productIdList.size() > 0">
${_conditionType_} a.productId in
<foreach collection="conditionParamRef.productIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('productIdNotList')">
<if test="conditionParamRef.containsKey('productIdNotList') and conditionParamRef.productIdNotList.size() > 0">
${_conditionType_} a.productId not in
<foreach collection="conditionParamRef.productIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -613,13 +629,13 @@
${_conditionType_} a.interfaceName is null
</if>
</if>
<if test="conditionParamRef.containsKey('interfaceNameList')">
<if test="conditionParamRef.containsKey('interfaceNameList') and conditionParamRef.interfaceNameList.size() > 0">
${_conditionType_} a.interfaceName in
<foreach collection="conditionParamRef.interfaceNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceNameNotList')">
<if test="conditionParamRef.containsKey('interfaceNameNotList') and conditionParamRef.interfaceNameNotList.size() > 0">
${_conditionType_} a.interfaceName not in
<foreach collection="conditionParamRef.interfaceNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -634,13 +650,13 @@
${_conditionType_} a.versionNumber is null
</if>
</if>
<if test="conditionParamRef.containsKey('versionNumberList')">
<if test="conditionParamRef.containsKey('versionNumberList') and conditionParamRef.versionNumberList.size() > 0">
${_conditionType_} a.versionNumber in
<foreach collection="conditionParamRef.versionNumberList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('versionNumberNotList')">
<if test="conditionParamRef.containsKey('versionNumberNotList') and conditionParamRef.versionNumberNotList.size() > 0">
${_conditionType_} a.versionNumber not in
<foreach collection="conditionParamRef.versionNumberNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -654,13 +670,13 @@
${_conditionType_} a.requestType is null
</if>
</if>
<if test="conditionParamRef.containsKey('requestTypeList')">
<if test="conditionParamRef.containsKey('requestTypeList') and conditionParamRef.requestTypeList.size() > 0">
${_conditionType_} a.requestType in
<foreach collection="conditionParamRef.requestTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('requestTypeNotList')">
<if test="conditionParamRef.containsKey('requestTypeNotList') and conditionParamRef.requestTypeNotList.size() > 0">
${_conditionType_} a.requestType not in
<foreach collection="conditionParamRef.requestTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -681,13 +697,13 @@
${_conditionType_} a.requestProtocol is null
</if>
</if>
<if test="conditionParamRef.containsKey('requestProtocolList')">
<if test="conditionParamRef.containsKey('requestProtocolList') and conditionParamRef.requestProtocolList.size() > 0">
${_conditionType_} a.requestProtocol in
<foreach collection="conditionParamRef.requestProtocolList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('requestProtocolNotList')">
<if test="conditionParamRef.containsKey('requestProtocolNotList') and conditionParamRef.requestProtocolNotList.size() > 0">
${_conditionType_} a.requestProtocol not in
<foreach collection="conditionParamRef.requestProtocolNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -709,13 +725,13 @@
${_conditionType_} a.requestUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('requestUrlList')">
<if test="conditionParamRef.containsKey('requestUrlList') and conditionParamRef.requestUrlList.size() > 0">
${_conditionType_} a.requestUrl in
<foreach collection="conditionParamRef.requestUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('requestUrlNotList')">
<if test="conditionParamRef.containsKey('requestUrlNotList') and conditionParamRef.requestUrlNotList.size() > 0">
${_conditionType_} a.requestUrl not in
<foreach collection="conditionParamRef.requestUrlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -729,13 +745,13 @@
${_conditionType_} a.timeoutValue is null
</if>
</if>
<if test="conditionParamRef.containsKey('timeoutValueList')">
<if test="conditionParamRef.containsKey('timeoutValueList') and conditionParamRef.timeoutValueList.size() > 0">
${_conditionType_} a.timeoutValue in
<foreach collection="conditionParamRef.timeoutValueList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('timeoutValueNotList')">
<if test="conditionParamRef.containsKey('timeoutValueNotList') and conditionParamRef.timeoutValueNotList.size() > 0">
${_conditionType_} a.timeoutValue not in
<foreach collection="conditionParamRef.timeoutValueNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -756,13 +772,13 @@
${_conditionType_} a.limitStrategy is null
</if>
</if>
<if test="conditionParamRef.containsKey('limitStrategyList')">
<if test="conditionParamRef.containsKey('limitStrategyList') and conditionParamRef.limitStrategyList.size() > 0">
${_conditionType_} a.limitStrategy in
<foreach collection="conditionParamRef.limitStrategyList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('limitStrategyNotList')">
<if test="conditionParamRef.containsKey('limitStrategyNotList') and conditionParamRef.limitStrategyNotList.size() > 0">
${_conditionType_} a.limitStrategy not in
<foreach collection="conditionParamRef.limitStrategyNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -784,13 +800,13 @@
${_conditionType_} a.network is null
</if>
</if>
<if test="conditionParamRef.containsKey('networkList')">
<if test="conditionParamRef.containsKey('networkList') and conditionParamRef.networkList.size() > 0">
${_conditionType_} a.network in
<foreach collection="conditionParamRef.networkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('networkNotList')">
<if test="conditionParamRef.containsKey('networkNotList') and conditionParamRef.networkNotList.size() > 0">
${_conditionType_} a.network not in
<foreach collection="conditionParamRef.networkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -805,57 +821,36 @@
${_conditionType_} a.description is null
</if>
</if>
<if test="conditionParamRef.containsKey('descriptionList')">
<if test="conditionParamRef.containsKey('descriptionList') and conditionParamRef.descriptionList.size() > 0">
${_conditionType_} a.description in
<foreach collection="conditionParamRef.descriptionList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('descriptionNotList')">
<if test="conditionParamRef.containsKey('descriptionNotList') and conditionParamRef.descriptionNotList.size() > 0">
${_conditionType_} a.description not in
<foreach collection="conditionParamRef.descriptionNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('flowControl')">
<if test="conditionParamRef.flowControl != null and conditionParamRef.flowControl != ''">
${_conditionType_} a.flowControl like #{${_conditionParam_}.flowControl}
</if>
<if test="conditionParamRef.flowControl == null">
${_conditionType_} a.flowControl is null
</if>
</if>
<if test="conditionParamRef.containsKey('flowControlList')">
${_conditionType_} a.flowControl in
<foreach collection="conditionParamRef.flowControlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('flowControlNotList')">
${_conditionType_} a.flowControl not in
<foreach collection="conditionParamRef.flowControlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('authorizeInfo')">
<if test="conditionParamRef.authorizeInfo != null and conditionParamRef.authorizeInfo != ''">
${_conditionType_} a.authorizeInfo like #{${_conditionParam_}.authorizeInfo}
<if test="conditionParamRef.containsKey('contentType')">
<if test="conditionParamRef.contentType != null and conditionParamRef.contentType != ''">
${_conditionType_} a.contentType like #{${_conditionParam_}.contentType}
</if>
<if test="conditionParamRef.authorizeInfo == null">
${_conditionType_} a.authorizeInfo is null
<if test="conditionParamRef.contentType == null">
${_conditionType_} a.contentType is null
</if>
</if>
<if test="conditionParamRef.containsKey('authorizeInfoList')">
${_conditionType_} a.authorizeInfo in
<foreach collection="conditionParamRef.authorizeInfoList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('contentTypeList') and conditionParamRef.contentTypeList.size() > 0">
${_conditionType_} a.contentType in
<foreach collection="conditionParamRef.contentTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('authorizeInfoNotList')">
${_conditionType_} a.authorizeInfo not in
<foreach collection="conditionParamRef.authorizeInfoNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('contentTypeNotList') and conditionParamRef.contentTypeNotList.size() > 0">
${_conditionType_} a.contentType not in
<foreach collection="conditionParamRef.contentTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
......@@ -867,13 +862,13 @@
${_conditionType_} a.interfaceTag is null
</if>
</if>
<if test="conditionParamRef.containsKey('interfaceTagList')">
<if test="conditionParamRef.containsKey('interfaceTagList') and conditionParamRef.interfaceTagList.size() > 0">
${_conditionType_} a.interfaceTag in
<foreach collection="conditionParamRef.interfaceTagList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceTagNotList')">
<if test="conditionParamRef.containsKey('interfaceTagNotList') and conditionParamRef.interfaceTagNotList.size() > 0">
${_conditionType_} a.interfaceTag not in
<foreach collection="conditionParamRef.interfaceTagNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -894,13 +889,13 @@
${_conditionType_} a.interfaceSource is null
</if>
</if>
<if test="conditionParamRef.containsKey('interfaceSourceList')">
<if test="conditionParamRef.containsKey('interfaceSourceList') and conditionParamRef.interfaceSourceList.size() > 0">
${_conditionType_} a.interfaceSource in
<foreach collection="conditionParamRef.interfaceSourceList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceSourceNotList')">
<if test="conditionParamRef.containsKey('interfaceSourceNotList') and conditionParamRef.interfaceSourceNotList.size() > 0">
${_conditionType_} a.interfaceSource not in
<foreach collection="conditionParamRef.interfaceSourceNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
......@@ -913,6 +908,33 @@
${_conditionType_} a.interfaceSource <![CDATA[ <= ]]> #{${_conditionParam_}.interfaceSourceEnd}
</if>
<if test="conditionParamRef.containsKey('inEncrypt')">
<if test="conditionParamRef.inEncrypt != null ">
${_conditionType_} a.inEncrypt = #{${_conditionParam_}.inEncrypt}
</if>
<if test="conditionParamRef.inEncrypt == null">
${_conditionType_} a.inEncrypt is null
</if>
</if>
<if test="conditionParamRef.containsKey('inEncryptList') and conditionParamRef.inEncryptList.size() > 0">
${_conditionType_} a.inEncrypt in
<foreach collection="conditionParamRef.inEncryptList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('inEncryptNotList') and conditionParamRef.inEncryptNotList.size() > 0">
${_conditionType_} a.inEncrypt not in
<foreach collection="conditionParamRef.inEncryptNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('inEncryptStart') and conditionParamRef.inEncryptStart != null">
${_conditionType_} a.inEncrypt <![CDATA[ >= ]]> #{${_conditionParam_}.inEncryptStart}
</if>
<if test="conditionParamRef.containsKey('inEncryptEnd') and conditionParamRef.inEncryptEnd != null">
${_conditionType_} a.inEncrypt <![CDATA[ <= ]]> #{${_conditionParam_}.inEncryptEnd}
</if>
<if test="conditionParamRef.containsKey('requestParameters')">
<if test="conditionParamRef.requestParameters != null and conditionParamRef.requestParameters != ''">
......@@ -922,78 +944,84 @@
${_conditionType_} a.requestParameters is null
</if>
</if>
<if test="conditionParamRef.containsKey('requestParametersList')">
<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')">
<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('responseParameters')">
<if test="conditionParamRef.responseParameters != null and conditionParamRef.responseParameters != ''">
${_conditionType_} a.responseParameters like #{${_conditionParam_}.responseParameters}
<if test="conditionParamRef.containsKey('outEncrypt')">
<if test="conditionParamRef.outEncrypt != null ">
${_conditionType_} a.outEncrypt = #{${_conditionParam_}.outEncrypt}
</if>
<if test="conditionParamRef.responseParameters == null">
${_conditionType_} a.responseParameters is null
<if test="conditionParamRef.outEncrypt == null">
${_conditionType_} a.outEncrypt is null
</if>
</if>
<if test="conditionParamRef.containsKey('responseParametersList')">
${_conditionType_} a.responseParameters in
<foreach collection="conditionParamRef.responseParametersList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('outEncryptList') and conditionParamRef.outEncryptList.size() > 0">
${_conditionType_} a.outEncrypt in
<foreach collection="conditionParamRef.outEncryptList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('responseParametersNotList')">
${_conditionType_} a.responseParameters not in
<foreach collection="conditionParamRef.responseParametersNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('outEncryptNotList') and conditionParamRef.outEncryptNotList.size() > 0">
${_conditionType_} a.outEncrypt not in
<foreach collection="conditionParamRef.outEncryptNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('outEncryptStart') and conditionParamRef.outEncryptStart != null">
${_conditionType_} a.outEncrypt <![CDATA[ >= ]]> #{${_conditionParam_}.outEncryptStart}
</if>
<if test="conditionParamRef.containsKey('outEncryptEnd') and conditionParamRef.outEncryptEnd != null">
${_conditionType_} a.outEncrypt <![CDATA[ <= ]]> #{${_conditionParam_}.outEncryptEnd}
</if>
<if test="conditionParamRef.containsKey('errorCode')">
<if test="conditionParamRef.errorCode != null and conditionParamRef.errorCode != ''">
${_conditionType_} a.errorCode like #{${_conditionParam_}.errorCode}
<if test="conditionParamRef.containsKey('responseParameters')">
<if test="conditionParamRef.responseParameters != null and conditionParamRef.responseParameters != ''">
${_conditionType_} a.responseParameters like #{${_conditionParam_}.responseParameters}
</if>
<if test="conditionParamRef.errorCode == null">
${_conditionType_} a.errorCode is null
<if test="conditionParamRef.responseParameters == null">
${_conditionType_} a.responseParameters is null
</if>
</if>
<if test="conditionParamRef.containsKey('errorCodeList')">
${_conditionType_} a.errorCode in
<foreach collection="conditionParamRef.errorCodeList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('responseParametersList') and conditionParamRef.responseParametersList.size() > 0">
${_conditionType_} a.responseParameters in
<foreach collection="conditionParamRef.responseParametersList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('errorCodeNotList')">
${_conditionType_} a.errorCode not in
<foreach collection="conditionParamRef.errorCodeNotList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('responseParametersNotList') and conditionParamRef.responseParametersNotList.size() > 0">
${_conditionType_} a.responseParameters not in
<foreach collection="conditionParamRef.responseParametersNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('changeHistory')">
<if test="conditionParamRef.changeHistory != null and conditionParamRef.changeHistory != ''">
${_conditionType_} a.changeHistory like #{${_conditionParam_}.changeHistory}
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark}
</if>
<if test="conditionParamRef.changeHistory == null">
${_conditionType_} a.changeHistory is null
<if test="conditionParamRef.remark == null">
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('changeHistoryList')">
${_conditionType_} a.changeHistory in
<foreach collection="conditionParamRef.changeHistoryList" open="(" close=")" index="index" item="item" separator=",">
<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('changeHistoryNotList')">
${_conditionType_} a.changeHistory not in
<foreach collection="conditionParamRef.changeHistoryNotList" open="(" close=")" index="index" item="item" separator=",">
<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>
......@@ -1005,13 +1033,13 @@
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
<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')">
<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}
......@@ -1047,13 +1075,13 @@
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList')">
<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')">
<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}
......@@ -1149,14 +1177,9 @@
<if test='orderCol.description != null and "DESC".equalsIgnoreCase(orderCol.description)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('flowControl')">
a.flowControl
<if test='orderCol.flowControl != null and "DESC".equalsIgnoreCase(orderCol.flowControl)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('authorizeInfo')">
a.authorizeInfo
<if test='orderCol.authorizeInfo != null and "DESC".equalsIgnoreCase(orderCol.authorizeInfo)'>DESC</if>
<if test="orderCol.containsKey('contentType')">
a.contentType
<if test='orderCol.contentType != null and "DESC".equalsIgnoreCase(orderCol.contentType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('interfaceTag')">
......@@ -1169,24 +1192,29 @@
<if test='orderCol.interfaceSource != null and "DESC".equalsIgnoreCase(orderCol.interfaceSource)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('inEncrypt')">
a.inEncrypt
<if test='orderCol.inEncrypt != null and "DESC".equalsIgnoreCase(orderCol.inEncrypt)'>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('outEncrypt')">
a.outEncrypt
<if test='orderCol.outEncrypt != null and "DESC".equalsIgnoreCase(orderCol.outEncrypt)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('responseParameters')">
a.responseParameters
<if test='orderCol.responseParameters != null and "DESC".equalsIgnoreCase(orderCol.responseParameters)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('errorCode')">
a.errorCode
<if test='orderCol.errorCode != null and "DESC".equalsIgnoreCase(orderCol.errorCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('changeHistory')">
a.changeHistory
<if test='orderCol.changeHistory != null and "DESC".equalsIgnoreCase(orderCol.changeHistory)'>DESC</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')">
......
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