From 5f89795bd624c65af07822d3fc1430122fc9bf1a Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 26 Nov 2024 21:56:27 +0800 Subject: [PATCH] update --- app/hdl/advertising/hdl_function.go | 7 ++++++- app/hdl/im/hdl_group.go | 25 +++++++++++++++++++++++++ app/router/router.go | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/app/hdl/advertising/hdl_function.go b/app/hdl/advertising/hdl_function.go index e50b944..ffb59e5 100644 --- a/app/hdl/advertising/hdl_function.go +++ b/app/hdl/advertising/hdl_function.go @@ -1,7 +1,10 @@ package advertising import ( + "applet/app/md" "applet/app/svc/advertising" + "applet/app/utils" + "fmt" "github.com/gin-gonic/gin" ) @@ -13,10 +16,12 @@ import ( // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Param req body md.AdvertisingFunctionListReq true "(分页信息必填)" -// @Success 200 {object} md.AdvertisingFunctionResp "具体数据" +// @Success 200 {object} md.AdvertisingFunctionListResp "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/advertising/function/list [post] func FunctionList(c *gin.Context) { + var resp = md.AdvertisingFunctionListResp{} + fmt.Println(utils.SerializeStr(resp)) advertising.FunctionList(c) } diff --git a/app/hdl/im/hdl_group.go b/app/hdl/im/hdl_group.go index 1240c87..8a48a9a 100644 --- a/app/hdl/im/hdl_group.go +++ b/app/hdl/im/hdl_group.go @@ -31,3 +31,28 @@ func GroupList(c *gin.Context) { } e.OutSuc(c, resp, nil) } + +// GroupUserList +// @Summary Im-群组用户(列表) +// @Tags 群组用户 +// @Description 群组用户(列表) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @param req body md.GroupListReq true "相关参数" +// @Success 200 {object} md.GroupListResp "" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/im/groupList [POST] +func GroupUserList(c *gin.Context) { + var req *md.GroupUserListReq + if err1 := c.ShouldBindJSON(&req); err1 != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) + return + } + err, resp := svc.GroupUserList(*req) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + e.OutSuc(c, resp, nil) +} diff --git a/app/router/router.go b/app/router/router.go index 98272b1..41bbcaf 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -285,6 +285,7 @@ func rIm(r *gin.RouterGroup) { r.GET("/redPackageRecordsDetail", im.RedPackageRecordsDetail) r.POST("/pageSendRedPackageOrd", im.PageSendRedPackageOrd) r.POST("/groupList", im.GroupList) + r.POST("/groupUserList", im.GroupUserList) r.POST("/batchSendGroupMessage", im.BatchSendGroupMessage) r.POST("/batchSendUserMessage", im.BatchSendUserMessage) }