Postman接口调用传参说明

1.中间类:多个字段 + 实体类集合

复制代码
/**
* 中间类
**/
@Data
public class UserInfoDto implements Serializable {

    private List<UserInfo> userInfo;

    /**
     * 目的
     */
    String purpose;

    /**
     * 人群
     */
    String crowd;

    /**
     * 场景
     */
    String scene;

}

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_info")
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    /**
     * 用户手机号
     */
    private String userPhone;

    /**
     * 菜单id
     */
    private Integer menuId;

    /**
     * 上级菜单id
     */
    private Integer secondMenuId;

    /**
     * 菜单名称
     */
    private String menuName;

    /**
     * 内容
     */
    private String content;

}

Postman传参格式

复制代码
{
"purpose": "自我介绍",
"crowd": "终端客户",
"scene": "行业峰会主题演讲",

"userInfo":[{
"userId": "11",
"userPhone": "13392177159",
"menuId": "7",
"secondMenuId": "3",
"content": "fahifiuaf"
}]

}

接口定义

相关推荐
天才测试猿3 小时前
接口测试之postman使用指南
自动化测试·软件测试·python·测试工具·职场和发展·接口测试·postman
巨龙之路12 小时前
Lua中的元表
java·开发语言·lua
码媛1 天前
A006-基于Selenium和JMeter的吉屋web端的自动化测试设计与实现
selenium·测试工具·jmeter
weixin_428498491 天前
在Fortran程序中嵌入Lua解释器
lua·hpc
小鑫仔_x2 天前
selenium之Token
python·selenium·测试工具
hi星尘2 天前
Redis与Lua原子操作深度解析及案例分析
redis·lua
小鑫仔_x2 天前
Selenium之Actions事件
selenium·测试工具
weixin_428498492 天前
Embedding Lua as Dynamic Configuration in C/C++
c语言·lua
小马哥编程2 天前
【软件测试】自动化测试框架Pytest + Selenium的使用
selenium·测试工具·pytest
第三方软件测评2 天前
软件功能性测试有多重要?功能性测试工具有哪些?
软件测试·功能测试·测试工具