Commit f1259dc1 authored by zhangc's avatar zhangc

commit

parent 04088cd5
package com.jz.dm.models.enity;
import com.alibaba.fastjson.JSON;
import com.jz.dm.common.enums.RouteType;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* open api接口
*
*/
public class OpenApi {
/**
* id
*/
private Long id;
/**
* 接口名称
*/
private String method;
/**
* 描述
*/
private String description;
/**
* 数据格式
*/
private String format;
/**
* 请求使用的编码格式,如utf-8,gbk,gb2312等
*/
private String charset;
/**
* 生成签名字符串所使用的签名算法类型
*/
private String signType;
/**
* 调用的接口版本
*/
private String version;
/**
* 负责人
*/
private String owner;
/**
* 应用
*/
private String application;
/**
* 是否删除
*/
private Boolean isDelete;
/**
* 路由类型
*/
private RouteType routeType;
/**
* 路由Url
*/
private String routeUrl;
/**
* 路由请求编码
*/
private String routeCharset;
/**
* 扩展属性
*/
private Map<String, Object> extProperties = new HashMap<String, Object>();
/**
* 创建时间
*/
private Date gmtCreate;
/**
* 创建者
*/
private String createOperator;
/**
* 修改时间
*/
private Date gmtModified;
/**
* 最后修改者
*/
private String lastModifyOperator;
/**
* Getter method for property <tt>id</tt>.
*
* @return property value of id
*/
public Long getId() {
return id;
}
/**
* Setter method for property <tt>id</tt>.
*
* @param id value to be assigned to property id
*/
public void setId(Long id) {
this.id = id;
}
/**
* Getter method for property <tt>method</tt>.
*
* @return property value of method
*/
public String getMethod() {
return method;
}
/**
* Setter method for property <tt>method</tt>.
*
* @param method value to be assigned to property method
*/
public void setMethod(String method) {
this.method = method;
}
/**
* Getter method for property <tt>description</tt>.
*
* @return property value of description
*/
public String getDescription() {
return description;
}
/**
* Setter method for property <tt>description</tt>.
*
* @param description value to be assigned to property description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Getter method for property <tt>format</tt>.
*
* @return property value of format
*/
public String getFormat() {
return format;
}
/**
* Setter method for property <tt>format</tt>.
*
* @param format value to be assigned to property format
*/
public void setFormat(String format) {
this.format = format;
}
/**
* Getter method for property <tt>charset</tt>.
*
* @return property value of charset
*/
public String getCharset() {
return charset;
}
/**
* Setter method for property <tt>charset</tt>.
*
* @param charset value to be assigned to property charset
*/
public void setCharset(String charset) {
this.charset = charset;
}
/**
* Getter method for property <tt>signType</tt>.
*
* @return property value of signType
*/
public String getSignType() {
return signType;
}
/**
* Setter method for property <tt>signType</tt>.
*
* @param signType value to be assigned to property signType
*/
public void setSignType(String signType) {
this.signType = signType;
}
/**
* Getter method for property <tt>version</tt>.
*
* @return property value of version
*/
public String getVersion() {
return version;
}
/**
* Setter method for property <tt>version</tt>.
*
* @param version value to be assigned to property version
*/
public void setVersion(String version) {
this.version = version;
}
/**
* Getter method for property <tt>owner</tt>.
*
* @return property value of owner
*/
public String getOwner() {
return owner;
}
/**
* Setter method for property <tt>owner</tt>.
*
* @param owner value to be assigned to property owner
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
* Getter method for property <tt>application</tt>.
*
* @return property value of application
*/
public String getApplication() {
return application;
}
/**
* Getter method for property <tt>isDelete</tt>.
*
* @return property value of isDelete
*/
public Boolean getIsDelete() {
return isDelete;
}
/**
* Setter method for property <tt>isDelete</tt>.
*
* @param isDelete value to be assigned to property isDelete
*/
public void setIsDelete(Boolean isDelete) {
this.isDelete = isDelete;
}
/**
* Getter method for property <tt>routeType</tt>.
*
* @return property value of routeType
*/
public RouteType getRouteType() {
return routeType;
}
/**
* Setter method for property <tt>routeType</tt>.
*
* @param routeType value to be assigned to property routeType
*/
public void setRouteType(RouteType routeType) {
this.routeType = routeType;
}
/**
* Getter method for property <tt>routeUrl</tt>.
*
* @return property value of routeUrl
*/
public String getRouteUrl() {
return routeUrl;
}
/**
* Setter method for property <tt>routeUrl</tt>.
*
* @param routeUrl value to be assigned to property routeUrl
*/
public void setRouteUrl(String routeUrl) {
this.routeUrl = routeUrl;
}
/**
* Getter method for property <tt>routeCharset</tt>.
*
* @return property value of routeCharset
*/
public String getRouteCharset() {
return routeCharset;
}
/**
* Setter method for property <tt>routeCharset</tt>.
*
* @param routeCharset value to be assigned to property routeCharset
*/
public void setRouteCharset(String routeCharset) {
this.routeCharset = routeCharset;
}
/**
* Setter method for property <tt>application</tt>.
*
* @param application value to be assigned to property application
*/
public void setApplication(String application) {
this.application = application;
}
@SuppressWarnings("unchecked")
public <T> T getExtProperty(String key) {
if (this.extProperties == null) {
return null;
}
return (T) this.extProperties.get(key);
}
public void setExtProperty(String key, Object value) {
if (this.extProperties == null) {
return;
}
this.extProperties.put(key, value);
}
public String getExtProperty() {
if (this.extProperties == null) {
return null;
}
return JSON.toJSONString(this.extProperties);
}
public void setExtProperty(String extProperty) {
if (extProperty == null) {
return;
}
this.extProperties = new HashMap<String, Object>(JSON.parseObject(extProperty));
}
/**
* Getter method for property <tt>extProperties</tt>.
*
* @return property value of extProperties
*/
public Map<String, Object> getExtProperties() {
return extProperties;
}
/**
* Setter method for property <tt>extProperties</tt>.
*
* @param extProperties value to be assigned to property extProperties
*/
public void setExtProperties(Map<String, Object> extProperties) {
this.extProperties = extProperties;
}
/**
* Getter method for property <tt>gmtCreate</tt>.
*
* @return property value of gmtCreate
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
* Setter method for property <tt>gmtCreate</tt>.
*
* @param gmtCreate value to be assigned to property gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
* Getter method for property <tt>createOperator</tt>.
*
* @return property value of createOperator
*/
public String getCreateOperator() {
return createOperator;
}
/**
* Setter method for property <tt>createOperator</tt>.
*
* @param createOperator value to be assigned to property createOperator
*/
public void setCreateOperator(String createOperator) {
this.createOperator = createOperator;
}
/**
* Getter method for property <tt>gmtModified</tt>.
*
* @return property value of gmtModified
*/
public Date getGmtModified() {
return gmtModified;
}
/**
* Setter method for property <tt>gmtModified</tt>.
*
* @param gmtModified value to be assigned to property gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* Getter method for property <tt>lastModifyOperator</tt>.
*
* @return property value of lastModifyOperator
*/
public String getLastModifyOperator() {
return lastModifyOperator;
}
/**
* Setter method for property <tt>lastModifyOperator</tt>.
*
* @param lastModifyOperator value to be assigned to property lastModifyOperator
*/
public void setLastModifyOperator(String lastModifyOperator) {
this.lastModifyOperator = lastModifyOperator;
}
}
......@@ -20,7 +20,10 @@ import java.io.Serializable;
@ApiModel("API详情信息")
public class ApiInterfaceDetailReq implements Serializable {
@ApiModelProperty(value = "id",required = true)
@NotNull(message = "id不能为空")
@ApiModelProperty(value = "id",required = false)
private Long id;
@ApiModelProperty(value = "apiKey",required = true)
@NotNull(message = "apiKey不能为空")
private String apiKey;
}
......@@ -33,7 +33,13 @@
aic.resp_code AS respCode
FROM t_api_interface AS ai
LEFT JOIN t_api_interface_custom AS aic ON ai.id = aic.api_interface_id AND aic.is_deleted =0
WHERE ai.id =#{id}
WHERE
<if test="apiKey != null and apiKey !=''">
ai.api_key =#{apiKey}
</if>
<if test="id != null and id !=''">
AND ai.id =#{id}
</if>
</select>
<select id="getTestData" resultType="com.jz.dm.models.domian.ApiInterfaceCustom">
SELECT aic.*
......
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