|
|
@@ -0,0 +1,57 @@ |
|
|
|
package im |
|
|
|
|
|
|
|
import ( |
|
|
|
"applet/app/e" |
|
|
|
md "applet/app/md/im" |
|
|
|
svc "applet/app/svc/im" |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
) |
|
|
|
|
|
|
|
// PageSendRedPackageOrd |
|
|
|
// @Summary Im-红包记录(列表) |
|
|
|
// @Tags 红包记录 |
|
|
|
// @Description 红包记录(列表) |
|
|
|
// @Accept json |
|
|
|
// @Produce json |
|
|
|
// @param Authorization header string true "验证参数Bearer和token空格拼接" |
|
|
|
// @param req body md.PageSendRedPackageOrdReq true "相关参数" |
|
|
|
// @Success 200 {string} "success" |
|
|
|
// @Failure 400 {object} md.Response "具体错误" |
|
|
|
// @Router /api/im/pageSendRedPackageOrd [POST] |
|
|
|
func PageSendRedPackageOrd(c *gin.Context) { |
|
|
|
var req *md.PageSendRedPackageOrdReq |
|
|
|
if err1 := c.ShouldBindJSON(&req); err1 != nil { |
|
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
err, resp := svc.PageSendRedPackageOrd(*req) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
e.OutSuc(c, resp, nil) |
|
|
|
} |
|
|
|
|
|
|
|
// RedPackageRecordsDetail |
|
|
|
// @Summary Im-红包记录(详情) |
|
|
|
// @Tags 红包记录 |
|
|
|
// @Description 红包记录(详情) |
|
|
|
// @Accept json |
|
|
|
// @Produce json |
|
|
|
// @param Authorization header string true "验证参数Bearer和token空格拼接" |
|
|
|
// @Param red_package_id query string true "红包id" |
|
|
|
// @Success 200 {string} "success" |
|
|
|
// @Failure 400 {object} md.Response "具体错误" |
|
|
|
// @Router /api/im/redPackageRecordsDetail [GET] |
|
|
|
func RedPackageRecordsDetail(c *gin.Context) { |
|
|
|
redPackageId := c.DefaultQuery("red_package_id", "") |
|
|
|
err, resp := svc.RedPackageRecordsDetail(redPackageId) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
e.OutSuc(c, resp, nil) |
|
|
|
} |