【发布列表增加厂家信息】

This commit is contained in:
weizhihong 2023-09-05 09:38:12 +08:00
parent 8f6fffc248
commit bdec888de8
2 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,7 @@ type PublishedGiDto struct {
Proto []byte `json:"proto"`
UserID int32 `json:"userID"`
Note string `json:"note"`
Category string `json:"category" form:"category"`
PublishAt dto.JsonTime `json:"publishAt" time_format:"2006-01-02 15:04:05"`
}
@ -45,6 +46,7 @@ func ConvertFrom(gi *model.PublishedGi) *PublishedGiDto {
Proto: gi.Proto,
Note: gi.Note,
UserID: gi.UserID,
Category: gi.Category,
PublishAt: dto.JsonTime(gi.PublishAt),
}
}

View File

@ -19,7 +19,7 @@ func PageQueryPublishedGi(req *publishedGi.PublishedGiReqDto) *dto.PageDto {
if req.Name != "" {
where = where.Where(dp.Name.Like(fmt.Sprintf("%%%s%%", req.Name)))
}
result, count, err := where.Select(dp.ID, dp.Name, dp.Note, dp.PublishAt).Debug().FindByPage(req.Offset(), req.Size)
result, count, err := where.Omit(dbquery.PublishedGi.Proto).Debug().FindByPage(req.Offset(), req.Size)
if err != nil {
panic(dto.ErrorDto{Code: dto.DataOperationError, Message: err.Error()})
}