|
@@ -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 {
|