fix(接口测试): 修复导出mock数据没有tag的问题

--bug=1046300 --user=宋天阳 【接口测试】接口导出-MeterSphere格式-导出Mock-未导出Mock的标签 https://www.tapd.cn/55049933/s/1578165
This commit is contained in:
Jianguo-Genius 2024-09-13 11:30:36 +08:00 committed by Craftsman
parent 8c1136eb86
commit 9eaa143d54
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package io.metersphere.api.dto.definition;
import io.metersphere.api.dto.request.http.body.Body;
import io.metersphere.api.dto.request.http.body.JsonBody;
import io.metersphere.api.dto.request.http.body.RawBody;
import io.metersphere.api.dto.request.http.body.XmlBody;
@ -20,7 +21,7 @@ public class ResponseBody implements Serializable {
@NotBlank
@Size(max = 20)
private String bodyType;
private String bodyType = Body.BodyType.NONE.name();
@Valid
private JsonBody jsonBody = new JsonBody();

View File

@ -20,7 +20,7 @@ public class Body {
* 同时持久化多个类型的请求体
*/
@NotBlank
private String bodyType;
private String bodyType = BodyType.NONE.name();
/**
* None 请求体
* bodyType NONE 使用该字段

View File

@ -62,6 +62,7 @@
</select>
<resultMap id="ApiMockDetailMap" type="io.metersphere.api.dto.definition.ApiMockWithBlob">
<result column="tags" jdbcType="VARCHAR" property="tags" typeHandler="io.metersphere.handler.ListTypeHandler"/>
<result column="matching" jdbcType="LONGVARBINARY" property="matching"/>
<result column="response" jdbcType="LONGVARBINARY" property="response"/>
</resultMap>