Commit e2468355 authored by 廖旭伟's avatar 廖旭伟

产品模块表结构修改

parent 54d53542
......@@ -84,3 +84,6 @@ CREATE TABLE `mortals_xhx_product_document` (
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品资料表';
ALTER TABLE `mortals_xhx_product_interface` ADD COLUMN `normalResponse` text DEFAULT NULL COMMENT '正常返回示例' AFTER `remark`,
ADD COLUMN `abnormalResponse` text DEFAULT NULL COMMENT '异常返回示例' AFTER `normalResponse`;
package com.mortals.xhx.module.product.model;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
import lombok.Data;
/**
* 产品接口实体对象
*
* @author zxfei
* @date 2023-05-16
* @date 2023-05-29
*/
@Data
public class ProductInterfaceEntity extends ProductInterfaceVo {
private static final long serialVersionUID = 1L;
......@@ -83,266 +83,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 接口描述
*/
private String remark;
public ProductInterfaceEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 接口名称
* @return String
*/
public String getInterfaceName(){
return interfaceName;
}
/**
* 设置 接口名称
* @param interfaceName
*/
public void setInterfaceName(String interfaceName){
this.interfaceName = interfaceName;
}
/**
* 获取 版本号
* @return String
*/
public String getVersionNumber(){
return versionNumber;
}
/**
* 设置 版本号
* @param versionNumber
*/
public void setVersionNumber(String versionNumber){
this.versionNumber = versionNumber;
}
/**
* 获取 请求类型1:POST,2:GET
* @return Integer
* 正常返回示例
*/
public Integer getRequestType(){
return requestType;
}
/**
* 设置 请求类型1:POST,2:GET
* @param requestType
*/
public void setRequestType(Integer requestType){
this.requestType = requestType;
}
/**
* 获取 请求协议1:HTTP,2:HTTPS
* @return Integer
*/
public Integer getRequestProtocol(){
return requestProtocol;
}
private String normalResponse;
/**
* 设置 请求协议1:HTTP,2:HTTPS
* @param requestProtocol
* 异常返回示例
*/
public void setRequestProtocol(Integer requestProtocol){
this.requestProtocol = requestProtocol;
}
/**
* 获取 请求路径
* @return String
*/
public String getRequestUrl(){
return requestUrl;
}
/**
* 设置 请求路径
* @param requestUrl
*/
public void setRequestUrl(String requestUrl){
this.requestUrl = requestUrl;
}
/**
* 获取 超时时间(秒)
* @return Long
*/
public Long getTimeoutValue(){
return timeoutValue;
}
/**
* 设置 超时时间(秒)
* @param timeoutValue
*/
public void setTimeoutValue(Long timeoutValue){
this.timeoutValue = timeoutValue;
}
/**
* 获取 限流策略1:分钟,2:小时
* @return Integer
*/
public Integer getLimitStrategy(){
return limitStrategy;
}
/**
* 设置 限流策略1:分钟,2:小时
* @param limitStrategy
*/
public void setLimitStrategy(Integer limitStrategy){
this.limitStrategy = limitStrategy;
}
/**
* 获取 访问网络1互联网2政务网
* @return String
*/
public String getNetwork(){
return network;
}
/**
* 设置 访问网络1互联网2政务网
* @param network
*/
public void setNetwork(String network){
this.network = network;
}
/**
* 获取 接口描述
* @return String
*/
public String getDescription(){
return description;
}
/**
* 设置 接口描述
* @param description
*/
public void setDescription(String description){
this.description = description;
}
/**
* 获取 内容类型
* @return String
*/
public String getContentType(){
return contentType;
}
/**
* 设置 内容类型
* @param contentType
*/
public void setContentType(String contentType){
this.contentType = contentType;
}
/**
* 获取 标签
* @return Integer
*/
public Integer getInterfaceTag(){
return interfaceTag;
}
/**
* 设置 标签
* @param interfaceTag
*/
public void setInterfaceTag(Integer interfaceTag){
this.interfaceTag = interfaceTag;
}
/**
* 获取 来源1自有2非自有
* @return Integer
*/
public Integer getInterfaceSource(){
return interfaceSource;
}
/**
* 设置 来源1自有2非自有
* @param interfaceSource
*/
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
*/
public String getRequestParameters(){
return requestParameters;
}
/**
* 设置 请求参数
* @param requestParameters
*/
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
*/
public String getResponseParameters(){
return responseParameters;
}
/**
* 设置 响应数据
* @param responseParameters
*/
public void setResponseParameters(String responseParameters){
this.responseParameters = responseParameters;
}
/**
* 获取 接口描述
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 接口描述
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
private String abnormalResponse;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -359,32 +107,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",interfaceName:").append(getInterfaceName());
sb.append(",versionNumber:").append(getVersionNumber());
sb.append(",requestType:").append(getRequestType());
sb.append(",requestProtocol:").append(getRequestProtocol());
sb.append(",requestUrl:").append(getRequestUrl());
sb.append(",timeoutValue:").append(getTimeoutValue());
sb.append(",limitStrategy:").append(getLimitStrategy());
sb.append(",network:").append(getNetwork());
sb.append(",description:").append(getDescription());
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(",remark:").append(getRemark());
return sb.toString();
}
public void initAttrValue(){
this.productId = null;
this.productId = -1L;
this.interfaceName = "";
......@@ -396,9 +121,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.requestUrl = "";
this.timeoutValue = null;
this.timeoutValue = -1L;
this.limitStrategy = null;
this.limitStrategy = -1;
this.network = "";
......@@ -406,18 +131,22 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.contentType = "";
this.interfaceTag = null;
this.interfaceTag = -1;
this.interfaceSource = 1;
this.inEncrypt = null;
this.inEncrypt = -1;
this.requestParameters = "";
this.outEncrypt = null;
this.outEncrypt = -1;
this.responseParameters = "";
this.remark = "";
this.normalResponse = "";
this.abnormalResponse = "";
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ import java.util.List;
* 产品接口查询对象
*
* @author zxfei
* @date 2023-05-16
* @date 2023-05-29
*/
public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */
......@@ -245,6 +245,16 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceQuery> orConditionList;
......@@ -1577,6 +1587,70 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -2398,6 +2472,44 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
}
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
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