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"
}]

}

接口定义

相关推荐
小冯的编程学习之路21 小时前
【软件测试】:推荐一些接口与自动化测试学习练习网站(API测试与自动化学习全攻略)
c++·selenium·测试工具·jmeter·自动化·测试用例·postman
搞不懂语言的程序员1 天前
Redis的Pipeline和Lua脚本适用场景是什么?使用时需要注意什么?
数据库·redis·lua
Ten peaches1 天前
Selenium-Java版(操作元素)
java·selenium·测试工具·html
莱茵不哈哈1 天前
初探 Skynet:轻量级分布式游戏服务器框架实战
lua·c·skynet
傻小胖1 天前
三种常见接口测试工具(Apipost、Apifox、Postman)
测试工具·postman
辛普森Mmmm1 天前
Postman接口测试
测试工具·postman
程序员三藏1 天前
软件测试之功能测试详解
自动化测试·软件测试·python·功能测试·测试工具·职场和发展·测试用例
头疼的程序员2 天前
allure生成测试报告(搭配Pytest、allure-pytest)
测试工具·pytest
程序员杰哥2 天前
自动化测试基础知识详解
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
·云扬·2 天前
【PmHub后端篇】PmHub中基于Redis加Lua脚本的计数器算法限流实现
redis·算法·lua