@@ -1,7 +1,10 @@ | |||||
package advertising | package advertising | ||||
import ( | import ( | ||||
"applet/app/md" | |||||
"applet/app/svc/advertising" | "applet/app/svc/advertising" | ||||
"applet/app/utils" | |||||
"fmt" | |||||
"github.com/gin-gonic/gin" | "github.com/gin-gonic/gin" | ||||
) | ) | ||||
@@ -13,10 +16,12 @@ import ( | |||||
// @Produce json | // @Produce json | ||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | // @param Authorization header string true "验证参数Bearer和token空格拼接" | ||||
// @Param req body md.AdvertisingFunctionListReq true "(分页信息必填)" | // @Param req body md.AdvertisingFunctionListReq true "(分页信息必填)" | ||||
// @Success 200 {object} md.AdvertisingFunctionResp "具体数据" | |||||
// @Success 200 {object} md.AdvertisingFunctionListResp "具体数据" | |||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/advertising/function/list [post] | // @Router /api/advertising/function/list [post] | ||||
func FunctionList(c *gin.Context) { | func FunctionList(c *gin.Context) { | ||||
var resp = md.AdvertisingFunctionListResp{} | |||||
fmt.Println(utils.SerializeStr(resp)) | |||||
advertising.FunctionList(c) | advertising.FunctionList(c) | ||||
} | } | ||||
@@ -31,3 +31,28 @@ func GroupList(c *gin.Context) { | |||||
} | } | ||||
e.OutSuc(c, resp, nil) | 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) | |||||
} |
@@ -285,6 +285,7 @@ func rIm(r *gin.RouterGroup) { | |||||
r.GET("/redPackageRecordsDetail", im.RedPackageRecordsDetail) | r.GET("/redPackageRecordsDetail", im.RedPackageRecordsDetail) | ||||
r.POST("/pageSendRedPackageOrd", im.PageSendRedPackageOrd) | r.POST("/pageSendRedPackageOrd", im.PageSendRedPackageOrd) | ||||
r.POST("/groupList", im.GroupList) | r.POST("/groupList", im.GroupList) | ||||
r.POST("/groupUserList", im.GroupUserList) | |||||
r.POST("/batchSendGroupMessage", im.BatchSendGroupMessage) | r.POST("/batchSendGroupMessage", im.BatchSendGroupMessage) | ||||
r.POST("/batchSendUserMessage", im.BatchSendUserMessage) | r.POST("/batchSendUserMessage", im.BatchSendUserMessage) | ||||
} | } | ||||