Jianghan 1 year ago
parent
commit
5582df10c8
1 changed files with 8 additions and 1 deletions
  1. 8 1
      api/internal/handler/sendcommailhandler.go

+ 8 - 1
api/internal/handler/sendcommailhandler.go

@@ -5,13 +5,20 @@ import (
 
 	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/logic"
 	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
 	"github.com/zeromicro/go-zero/rest/httpx"
 )
 
 func sendComMailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.SendMailReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+			return
+		}
+
 		l := logic.NewSendComMailLogic(r.Context(), svcCtx)
-		resp, err := l.SendComMail()
+		resp, err := l.SendComMail(&req)
 		if err != nil {
 			httpx.ErrorCtx(r.Context(), w, err)
 		} else {