Commit c73565e3 authored by haoyanbin's avatar haoyanbin

fileId

parent dc1b9ed8
......@@ -234,8 +234,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulUpdate.Id = upId
reqWonderfulUpdate.WonderfulUrl = v.WonderfulUrl
reqWonderfulUpdate.WonderfulTitle = v.WonderfulTitle
reqWonderfulUpdate.FileId = v.FileId
reqWonderfulUpdate.UpdateBy = user.GetUserId(c)
reqWonderfulUpdate.SetUpdateBy(user.GetUserId(c))
sWonderful.Update(&reqWonderfulUpdate)
delIds = append(delIds, upId)
} else {
......@@ -243,8 +244,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulInsert.MatchEvaluateId = strconv.Itoa(eId)
reqWonderfulInsert.WonderfulUrl = v.WonderfulUrl
reqWonderfulInsert.WonderfulTitle = v.WonderfulTitle
reqWonderfulUpdate.FileId = v.FileId
reqWonderfulInsert.CreateBy = user.GetUserId(c)
reqWonderfulInsert.SetCreateBy(user.GetUserId(c))
sWonderful.Insert(&reqWonderfulInsert)
delIds = append(delIds, reqWonderfulInsert.Id)
}
......@@ -255,8 +257,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulUpdate.Id = upId
reqWonderfulUpdate.WonderfulUrl = vMv.WonderfulUrl
reqWonderfulUpdate.WonderfulTitle = vMv.WonderfulTitle
reqWonderfulUpdate.FileId = vMv.FileId
reqWonderfulUpdate.UpdateBy = user.GetUserId(c)
reqWonderfulUpdate.SetUpdateBy(user.GetUserId(c))
sWonderful.Update(&reqWonderfulUpdate)
delIds = append(delIds, upId)
......@@ -265,8 +268,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulInsert.MatchEvaluateId = strconv.Itoa(eId)
reqWonderfulInsert.WonderfulUrl = vMv.WonderfulUrl
reqWonderfulInsert.WonderfulTitle = vMv.WonderfulTitle
reqWonderfulUpdate.FileId = vMv.FileId
reqWonderfulInsert.CreateBy = user.GetUserId(c)
reqWonderfulInsert.SetCreateBy(user.GetUserId(c))
sWonderful.Insert(&reqWonderfulInsert)
delIds = append(delIds, reqWonderfulInsert.Id)
}
......
package models
import (
// "gorm.io/gorm"
// "gorm.io/gorm"
"go-admin/common/models"
)
type OrgMatchEvaluateWonderful struct {
models.Model
MatchEvaluateId string `json:"matchEvaluateId" gorm:"type:bigint(20);comment:MatchEvaluateId"`
WonderfulUrl string `json:"wonderfulUrl" gorm:"type:varchar(255);comment:精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" gorm:"type:varchar(255);comment:精彩时刻标题"`
Type string `json:"type" gorm:"type:bigint(20);comment:1 图片 2 视频"`
models.ModelTime
models.ControlBy
models.Model
MatchEvaluateId string `json:"matchEvaluateId" gorm:"type:bigint(20);comment:MatchEvaluateId"`
WonderfulUrl string `json:"wonderfulUrl" gorm:"type:varchar(255);comment:精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" gorm:"type:varchar(255);comment:精彩时刻标题"`
FileId string `json:"fileId" gorm:"type:varchar(30);comment:文件id"`
Type string `json:"type" gorm:"type:bigint(20);comment:1 图片 2 视频"`
models.ModelTime
models.ControlBy
}
func (OrgMatchEvaluateWonderful) TableName() string {
return "org_match_evaluate_wonderful"
return "org_match_evaluate_wonderful"
}
func (e *OrgMatchEvaluateWonderful) Generate() models.ActiveRecord {
......@@ -28,4 +29,4 @@ func (e *OrgMatchEvaluateWonderful) Generate() models.ActiveRecord {
func (e *OrgMatchEvaluateWonderful) GetId() interface{} {
return e.Id
}
\ No newline at end of file
}
......@@ -34,6 +34,7 @@ type OrgMatchEvaluateWonderfulInsertReq struct {
MatchEvaluateId string `json:"matchEvaluateId" comment:""`
WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"`
FileId string `json:"fileId" comment:"文件id"`
Type string `json:"type" comment:"1 图片 2 视频"`
common.ControlBy
}
......@@ -45,6 +46,7 @@ func (s *OrgMatchEvaluateWonderfulInsertReq) Generate(model *models.OrgMatchEval
model.MatchEvaluateId = s.MatchEvaluateId
model.WonderfulUrl = s.WonderfulUrl
model.WonderfulTitle = s.WonderfulTitle
model.FileId = s.FileId
model.Type = s.Type
}
......@@ -57,6 +59,7 @@ type OrgMatchEvaluateWonderfulUpdateReq struct {
MatchEvaluateId string `json:"matchEvaluateId" comment:""`
WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"`
FileId string `json:"fileId" comment:"文件id"`
Type string `json:"type" comment:"1 图片 2 视频"`
common.ControlBy
}
......@@ -68,6 +71,7 @@ func (s *OrgMatchEvaluateWonderfulUpdateReq) Generate(model *models.OrgMatchEval
model.MatchEvaluateId = s.MatchEvaluateId
model.WonderfulUrl = s.WonderfulUrl
model.WonderfulTitle = s.WonderfulTitle
model.FileId = s.FileId
model.Type = s.Type
}
......
......@@ -82,7 +82,7 @@ func (e *OrgMatchEvaluate) GetPageWonderful(evaluateId string, list *[]cDto.Wond
var err error
err = e.Orm.Table("org_match_evaluate_wonderful as omew").
Select("omew.id as wonderful_id, omew.wonderful_url, omew.wonderful_title").
Select("omew.id as wonderful_id, omew.wonderful_url, omew.wonderful_title, omew.file_id").
Scopes(
cDto.PassDel("omew"),
).
......
......@@ -27,6 +27,7 @@ type Wonderful struct {
WonderfulId string `json:"wonderfulId" comment:"精彩时刻id"`
WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"`
FileId string `json:"fileId" comment:"文件id"`
}
type TotalScoring struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment