feats: add request type。

Signed-off-by: feihu.wang <wfh45678@163.com>
This commit is contained in:
feihu.wang
2019-11-14 10:53:59 +08:00
parent 2caa5116e7
commit 2c74ae3a8e
7 changed files with 44 additions and 4 deletions

View File

@@ -260,7 +260,6 @@ public class EventApiController {
os.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

View File

@@ -35,7 +35,8 @@ public class PreItemDalImpl implements PreItemDal {
PreItemPO preItem = preItemMapper.selectByPrimaryKey(id);
if (preItem != null) {
PreItemVO preItemVO = new PreItemVO();
BeanUtils.copyProperties(preItem, preItemVO);
//BeanUtils.copyProperties(preItem, preItemVO);
preItemVO = POVOUtils.copyFromPreItemPO(preItem);
return preItemVO;
}
return null;

View File

@@ -25,6 +25,7 @@ public class PreItemVO implements Serializable{
private String plugin;
private String reqType = "GET";
@JsonProperty
private JsonNode configJson;
@@ -156,4 +157,13 @@ public class PreItemVO implements Serializable{
public void setConfigJson(JsonNode configJson) {
this.configJson = configJson;
}
public String getReqType() {
return reqType;
}
public void setReqType(String reqType) {
this.reqType = reqType;
}
}

View File

@@ -52,6 +52,12 @@ public class PreItemPO {
@Column(name = "CONFIG_JSON")
private String configJson;
/**
* 请求方式
*/
@Column(name = "REQ_TYPE")
private String reqType;
@Column(name = "STATUS")
private Integer status;
@@ -211,6 +217,24 @@ public class PreItemPO {
this.configJson = configJson;
}
/**
* 获取请求方式
*
* @return REQ_TYPE - 请求方式
*/
public String getReqType() {
return reqType;
}
/**
* 设置请求方式
*
* @param reqType 请求方式
*/
public void setReqType(String reqType) {
this.reqType = reqType;
}
/**
* @return STATUS
*/

View File

@@ -14,6 +14,7 @@
<result column="ARGS" jdbcType="VARCHAR" property="args" />
<result column="PLUGIN" jdbcType="VARCHAR" property="plugin" />
<result column="CONFIG_JSON" jdbcType="VARCHAR" property="configJson" />
<result column="REQ_TYPE" jdbcType="VARCHAR" property="reqType" />
<result column="STATUS" jdbcType="INTEGER" property="status" />
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />

View File

@@ -1,2 +1,7 @@
ALTER TABLE `engine_pre_item`
ADD COLUMN `CONFIG_JSON` varchar(150) NULL AFTER `PLUGIN`;
MODIFY COLUMN `ARGS` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '参数' AFTER `LABEL`;
ALTER TABLE `engine_pre_item`
ADD COLUMN `CONFIG_JSON` varchar(150) NULL COMMENT '响应字段配置信息' AFTER `PLUGIN`;
ALTER TABLE `engine_pre_item`
ADD COLUMN `REQ_TYPE` varchar(16) NULL COMMENT '请求方式' AFTER `CONFIG_JSON`;

View File

@@ -1 +1 @@
//TODO: 项目前后端分离,此目录用于存放前端代码
//项目前后端分离,此目录用于存放前端代码