NutzCN Logo
问答 postman 传参怎么接受不到
发布于 2109天前 作者 qq_bd0f335e 2026 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

http://localhost:8080/api/user/getNoticeList?userId=1 为什么接收不到参数

 /**
     * 获取通知列表
     *
     * @param map userId      用户id
     * @return
     */
    @At
    @Ok("json")
    @AdaptBy(type = WhaleAdaptor.class)
    @POST
    public Object getNoticeList(@Param("..") NutMap map, HttpServletRequest req) {
        Cnd paramCnd = Cnd.NEW();
        String userId = map.getString("userId");
        if (Strings.isNotBlank(userId)) {
            paramCnd.and("userId","=",userId);
        }
        // 数据库查询
        List<Iff_user_notice> iffUserNoticeList = iffUserNoticeService.query(paramCnd);
        return new Result(0, "获取成功", new NutMap().addv("Iff_user_noticeList",iffUserNoticeList));
    }

1 回复

postmap默认是文件上传,非普通表单吧,设置一下咯

添加回复
请先登陆
回到顶部