🐛 fix session bug

This commit is contained in:
landaiqing
2024-11-17 20:02:59 +08:00
parent 34c4690f80
commit 78a162a19a
72 changed files with 1304 additions and 453 deletions

View File

@@ -3,7 +3,9 @@ package sms
import (
"net/http"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
"schisandra-album-cloud-microservices/app/core/api/internal/logic/sms"
"schisandra-album-cloud-microservices/app/core/api/internal/svc"
"schisandra-album-cloud-microservices/app/core/api/internal/types"
@@ -20,7 +22,8 @@ func SendSmsByAliyunHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
l := sms.NewSendSmsByAliyunLogic(r.Context(), svcCtx)
resp, err := l.SendSmsByAliyun(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
httpx.WriteJsonCtx(r.Context(), w, http.StatusInternalServerError, resp)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}

View File

@@ -3,7 +3,9 @@ package sms
import (
"net/http"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
"schisandra-album-cloud-microservices/app/core/api/internal/logic/sms"
"schisandra-album-cloud-microservices/app/core/api/internal/svc"
"schisandra-album-cloud-microservices/app/core/api/internal/types"
@@ -20,7 +22,8 @@ func SendSmsBySmsbaoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
l := sms.NewSendSmsBySmsbaoLogic(r.Context(), svcCtx)
resp, err := l.SendSmsBySmsbao(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
httpx.WriteJsonCtx(r.Context(), w, http.StatusInternalServerError, resp)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}

View File

@@ -3,7 +3,9 @@ package sms
import (
"net/http"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
"schisandra-album-cloud-microservices/app/core/api/internal/logic/sms"
"schisandra-album-cloud-microservices/app/core/api/internal/svc"
"schisandra-album-cloud-microservices/app/core/api/internal/types"
@@ -20,7 +22,8 @@ func SendSmsByTestHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
l := sms.NewSendSmsByTestLogic(r.Context(), svcCtx)
resp, err := l.SendSmsByTest(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
httpx.WriteJsonCtx(r.Context(), w, http.StatusInternalServerError, resp)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}