by Robin at 20231229; media fill

This commit is contained in:
Leufolium 2023-12-29 22:22:25 +08:00
parent e6f02150d6
commit 2e638c4f04
3 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,8 @@ func (p *OpUpdateReq) ProvideNotNullValue() (params []*validator.JsonParam) {
params = make([]*validator.JsonParam, 0) params = make([]*validator.JsonParam, 0)
params = append(params, validator.NewInt64PtrParam("请提供Id", p.Feedback.Id)) params = append(params, validator.NewInt64PtrParam("请提供Id", p.Feedback.Id))
params = append(params, validator.NewInt64PtrParam("请更新反馈状态!", p.Feedback.Status))
params = append(params, validator.NewStringPtrParam("请提供更新备注!", p.Feedback.Remarks))
return return
} }

View File

@ -7,6 +7,7 @@ import (
"service/app/mix/service" "service/app/mix/service"
"service/bizcommon/util" "service/bizcommon/util"
"service/library/logger" "service/library/logger"
"service/library/mediafiller"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -62,6 +63,14 @@ func OpGetFeedbackList(ctx *gin.Context) {
return return
} }
//填充媒体切片
objectMediaNum := 1 // 单个反馈总共1个媒体类
mediaFillableList := make([]mediafiller.MediaFillable, len(list)*objectMediaNum)
for i, feedback := range list {
mediaFillableList[objectMediaNum*i+0] = feedback.Credentials
}
mediafiller.FillList(ctx, mediaFillableList)
data := &feedbackproto.OpListData{ data := &feedbackproto.OpListData{
List: list, List: list,
Offset: req.Offset + len(list), Offset: req.Offset + len(list),

View File

@ -6,6 +6,7 @@ type Feedback struct {
Discription *string `json:"discription" bson:"discription"` // 问题描述 Discription *string `json:"discription" bson:"discription"` // 问题描述
Credentials *MediaComponent `json:"credentials" bson:"credentials"` // 问题凭证 Credentials *MediaComponent `json:"credentials" bson:"credentials"` // 问题凭证
Status *int64 `json:"status" bson:"status"` // 问题状态 Status *int64 `json:"status" bson:"status"` // 问题状态
Remarks *string `json:"remarks" bson:"remarks"` // 备注
Ct *int64 `json:"ct" bson:"ct"` // 创建时间 Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间 Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记 DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记