Commit c73565e3 authored by haoyanbin's avatar haoyanbin

fileId

parent dc1b9ed8
...@@ -234,8 +234,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) { ...@@ -234,8 +234,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulUpdate.Id = upId reqWonderfulUpdate.Id = upId
reqWonderfulUpdate.WonderfulUrl = v.WonderfulUrl reqWonderfulUpdate.WonderfulUrl = v.WonderfulUrl
reqWonderfulUpdate.WonderfulTitle = v.WonderfulTitle reqWonderfulUpdate.WonderfulTitle = v.WonderfulTitle
reqWonderfulUpdate.FileId = v.FileId
reqWonderfulUpdate.UpdateBy = user.GetUserId(c)
reqWonderfulUpdate.SetUpdateBy(user.GetUserId(c))
sWonderful.Update(&reqWonderfulUpdate) sWonderful.Update(&reqWonderfulUpdate)
delIds = append(delIds, upId) delIds = append(delIds, upId)
} else { } else {
...@@ -243,8 +244,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) { ...@@ -243,8 +244,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulInsert.MatchEvaluateId = strconv.Itoa(eId) reqWonderfulInsert.MatchEvaluateId = strconv.Itoa(eId)
reqWonderfulInsert.WonderfulUrl = v.WonderfulUrl reqWonderfulInsert.WonderfulUrl = v.WonderfulUrl
reqWonderfulInsert.WonderfulTitle = v.WonderfulTitle reqWonderfulInsert.WonderfulTitle = v.WonderfulTitle
reqWonderfulUpdate.FileId = v.FileId
reqWonderfulInsert.CreateBy = user.GetUserId(c)
reqWonderfulInsert.SetCreateBy(user.GetUserId(c))
sWonderful.Insert(&reqWonderfulInsert) sWonderful.Insert(&reqWonderfulInsert)
delIds = append(delIds, reqWonderfulInsert.Id) delIds = append(delIds, reqWonderfulInsert.Id)
} }
...@@ -255,8 +257,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) { ...@@ -255,8 +257,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulUpdate.Id = upId reqWonderfulUpdate.Id = upId
reqWonderfulUpdate.WonderfulUrl = vMv.WonderfulUrl reqWonderfulUpdate.WonderfulUrl = vMv.WonderfulUrl
reqWonderfulUpdate.WonderfulTitle = vMv.WonderfulTitle reqWonderfulUpdate.WonderfulTitle = vMv.WonderfulTitle
reqWonderfulUpdate.FileId = vMv.FileId
reqWonderfulUpdate.UpdateBy = user.GetUserId(c)
reqWonderfulUpdate.SetUpdateBy(user.GetUserId(c))
sWonderful.Update(&reqWonderfulUpdate) sWonderful.Update(&reqWonderfulUpdate)
delIds = append(delIds, upId) delIds = append(delIds, upId)
...@@ -265,8 +268,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) { ...@@ -265,8 +268,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulInsert.MatchEvaluateId = strconv.Itoa(eId) reqWonderfulInsert.MatchEvaluateId = strconv.Itoa(eId)
reqWonderfulInsert.WonderfulUrl = vMv.WonderfulUrl reqWonderfulInsert.WonderfulUrl = vMv.WonderfulUrl
reqWonderfulInsert.WonderfulTitle = vMv.WonderfulTitle reqWonderfulInsert.WonderfulTitle = vMv.WonderfulTitle
reqWonderfulUpdate.FileId = vMv.FileId
reqWonderfulInsert.CreateBy = user.GetUserId(c)
reqWonderfulInsert.SetCreateBy(user.GetUserId(c))
sWonderful.Insert(&reqWonderfulInsert) sWonderful.Insert(&reqWonderfulInsert)
delIds = append(delIds, reqWonderfulInsert.Id) delIds = append(delIds, reqWonderfulInsert.Id)
} }
......
...@@ -12,6 +12,7 @@ type OrgMatchEvaluateWonderful struct { ...@@ -12,6 +12,7 @@ type OrgMatchEvaluateWonderful struct {
MatchEvaluateId string `json:"matchEvaluateId" gorm:"type:bigint(20);comment:MatchEvaluateId"` MatchEvaluateId string `json:"matchEvaluateId" gorm:"type:bigint(20);comment:MatchEvaluateId"`
WonderfulUrl string `json:"wonderfulUrl" gorm:"type:varchar(255);comment:精彩时刻url"` WonderfulUrl string `json:"wonderfulUrl" gorm:"type:varchar(255);comment:精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" gorm:"type:varchar(255);comment:精彩时刻标题"` 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 视频"` Type string `json:"type" gorm:"type:bigint(20);comment:1 图片 2 视频"`
models.ModelTime models.ModelTime
models.ControlBy models.ControlBy
......
...@@ -34,6 +34,7 @@ type OrgMatchEvaluateWonderfulInsertReq struct { ...@@ -34,6 +34,7 @@ type OrgMatchEvaluateWonderfulInsertReq struct {
MatchEvaluateId string `json:"matchEvaluateId" comment:""` MatchEvaluateId string `json:"matchEvaluateId" comment:""`
WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"` WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"` WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"`
FileId string `json:"fileId" comment:"文件id"`
Type string `json:"type" comment:"1 图片 2 视频"` Type string `json:"type" comment:"1 图片 2 视频"`
common.ControlBy common.ControlBy
} }
...@@ -45,6 +46,7 @@ func (s *OrgMatchEvaluateWonderfulInsertReq) Generate(model *models.OrgMatchEval ...@@ -45,6 +46,7 @@ func (s *OrgMatchEvaluateWonderfulInsertReq) Generate(model *models.OrgMatchEval
model.MatchEvaluateId = s.MatchEvaluateId model.MatchEvaluateId = s.MatchEvaluateId
model.WonderfulUrl = s.WonderfulUrl model.WonderfulUrl = s.WonderfulUrl
model.WonderfulTitle = s.WonderfulTitle model.WonderfulTitle = s.WonderfulTitle
model.FileId = s.FileId
model.Type = s.Type model.Type = s.Type
} }
...@@ -57,6 +59,7 @@ type OrgMatchEvaluateWonderfulUpdateReq struct { ...@@ -57,6 +59,7 @@ type OrgMatchEvaluateWonderfulUpdateReq struct {
MatchEvaluateId string `json:"matchEvaluateId" comment:""` MatchEvaluateId string `json:"matchEvaluateId" comment:""`
WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"` WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"` WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"`
FileId string `json:"fileId" comment:"文件id"`
Type string `json:"type" comment:"1 图片 2 视频"` Type string `json:"type" comment:"1 图片 2 视频"`
common.ControlBy common.ControlBy
} }
...@@ -68,6 +71,7 @@ func (s *OrgMatchEvaluateWonderfulUpdateReq) Generate(model *models.OrgMatchEval ...@@ -68,6 +71,7 @@ func (s *OrgMatchEvaluateWonderfulUpdateReq) Generate(model *models.OrgMatchEval
model.MatchEvaluateId = s.MatchEvaluateId model.MatchEvaluateId = s.MatchEvaluateId
model.WonderfulUrl = s.WonderfulUrl model.WonderfulUrl = s.WonderfulUrl
model.WonderfulTitle = s.WonderfulTitle model.WonderfulTitle = s.WonderfulTitle
model.FileId = s.FileId
model.Type = s.Type model.Type = s.Type
} }
......
...@@ -82,7 +82,7 @@ func (e *OrgMatchEvaluate) GetPageWonderful(evaluateId string, list *[]cDto.Wond ...@@ -82,7 +82,7 @@ func (e *OrgMatchEvaluate) GetPageWonderful(evaluateId string, list *[]cDto.Wond
var err error var err error
err = e.Orm.Table("org_match_evaluate_wonderful as omew"). 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( Scopes(
cDto.PassDel("omew"), cDto.PassDel("omew"),
). ).
......
...@@ -27,6 +27,7 @@ type Wonderful struct { ...@@ -27,6 +27,7 @@ type Wonderful struct {
WonderfulId string `json:"wonderfulId" comment:"精彩时刻id"` WonderfulId string `json:"wonderfulId" comment:"精彩时刻id"`
WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"` WonderfulUrl string `json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"` WonderfulTitle string `json:"wonderfulTitle" comment:"精彩时刻标题"`
FileId string `json:"fileId" comment:"文件id"`
} }
type TotalScoring struct { 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