Browse Source

修改荣誉提交

v1_dev
超级管理员 3 years ago
parent
commit
fb44ced378
  1. 25
      api/version1/honoraryArchives/operate_photo.go
  2. 7
      api/version1/honoraryArchives/type.go

25
api/version1/honoraryArchives/operate_photo.go

@ -0,0 +1,25 @@
package honoraryArchives
import (
"key_performance_indicators/models/modelshonory"
"key_performance_indicators/overall"
"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 []modelshonory.PhotosGallery
where := publicmethod.MapOut[string]()
where["ascriptionid"] = requestData.Id
gormDb := overall.CONSTANT_DB_MANAGE_ARCHIVES.Model(&modelshonory.PhotosGallery{}).Where("state = ?", 1)
gormDb.Where(where).Find(&photoGalleryByAscriptionId)
publicmethod.Result(0, photoGalleryByAscriptionId, c) // 将查询结果返回
}

7
api/version1/honoraryArchives/type.go

@ -62,3 +62,10 @@ type eidyCarrierCont struct {
publicmethod.PublicId
addCarrierCont
}
// 荣誉图片字段
type photoKey struct {
publicmethod.PublicId
addHonorCont
publicmethod.PagesTurn
}

Loading…
Cancel
Save