diff --git a/.history/api/version1/honoraryArchives/operate_photo_20220730095005.go b/.history/api/version1/honoraryArchives/operate_photo_20220730095005.go new file mode 100644 index 0000000..9244e28 --- /dev/null +++ b/.history/api/version1/honoraryArchives/operate_photo_20220730095005.go @@ -0,0 +1,30 @@ +package honoraryArchives + +import ( + "key_performance_indicators/models" + "key_performance_indicators/overall/publicmethod" + + "github.com/gin-gonic/gin" +) + +// 查询图片 +func (a *ApiMethod) ReviewImage(c *gin.Context) { + var requestData photoKey //声明荣誉图片字段 + c.ShouldBindJSON(&requestData) //进行Json绑定 + if requestData.Id == "" { + publicmethod.Result(101, requestData, c) + return + } + var photoGalleryByAscriptionId []models.PhotosGallery + where := publicmethod.MapOut[string]() + where["ascriptionid"] = requestData.Id + err := nil + if err != nil { + publicmethod.Result(107, err, c) + return + } + + publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回 + // photoUrl := photoGalleryByAscriptionId.Url + // publicmethod.Result(0, photoUrl, c) // 将查询结果返回 +} diff --git a/api/version1/honoraryArchives/operate_photo.go b/api/version1/honoraryArchives/operate_photo.go index b6ca6d5..9244e28 100644 --- a/api/version1/honoraryArchives/operate_photo.go +++ b/api/version1/honoraryArchives/operate_photo.go @@ -18,7 +18,7 @@ func (a *ApiMethod) ReviewImage(c *gin.Context) { var photoGalleryByAscriptionId []models.PhotosGallery where := publicmethod.MapOut[string]() where["ascriptionid"] = requestData.Id - + err := nil if err != nil { publicmethod.Result(107, err, c) return