Merge branch 'jng-QuestionnairePDF-0311' into dev

This commit is contained in:
JNG 2026-03-12 09:31:03 +08:00
commit 3ff9e312c2

View File

@ -12,6 +12,7 @@ import (
"time" "time"
m "fonchain-fiee/pkg/model" m "fonchain-fiee/pkg/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid" "github.com/google/uuid"
) )
@ -64,6 +65,10 @@ func QuestionnaireSurveyCreate(c *gin.Context) {
service.Error(c, err) service.Error(c, err)
return return
} }
if req.Longitude == "" || req.Latitude == "" {
service.Error(c, errors.New("获取定位失败"))
return
}
address, err := utils.ReverseGeo(req.Longitude, req.Latitude, "ZhCN") address, err := utils.ReverseGeo(req.Longitude, req.Latitude, "ZhCN")
if err != nil { if err != nil {
service.Error(c, errors.New("获取地址失败")) service.Error(c, errors.New("获取地址失败"))