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

}

接口定义

相关推荐
软件测试-阿涛9 小时前
【性能测试】Jmeter+Grafana+InfluxDB+Prometheus Windows安装部署教程
测试工具·jmeter·性能优化·压力测试·grafana·prometheus
慢慢沉18 小时前
Lua(数据库访问)
开发语言·数据库·lua
慢慢沉19 小时前
Lua协同程序(coroutine)
lua
惜.己1 天前
pytest中使用skip跳过某个函数
开发语言·python·测试工具·pytest
绿色果酱1 天前
Apipost:离线可用+AI全栈覆盖,国产API开发协作工具新标杆
postman·ai功能·apipost·apipost离线·apipost ai·ai能力·apipost操作
慧都小项1 天前
自动化UI测试工具TestComplete的AI双引擎:即时数据集 + 自愈测试
自动化测试·测试工具·llm·数据驱动测试·hipaa标准
alien爱吃蛋挞1 天前
Postman
测试工具·postman
慢慢沉1 天前
Lua元表(Metatable)
lua
程序员小远2 天前
Pytest+Selenium UI自动化测试实战实例
自动化测试·软件测试·python·selenium·测试工具·ui·pytest