This commit is contained in:
weizhihong 2023-08-28 15:24:27 +08:00
commit 27b75bd908
2 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit e8d0e1e67593db6463c0b36870a6865e380e7a9e
Subproject commit cb2eeca59b71f1ae511773a57768ad4ddb594b4c

View File

@ -16,7 +16,7 @@ func PageDraftingQuery(query *dto.PageDraftingReqDto) (*dto.PageDto, error) {
if query.Name != "" {
dq = dq.Where(d.Name.Like(fmt.Sprintf("%%%s%%", query.Name)))
}
records, total, err := dq.Debug().Select(d.ID, d.Name, d.Category, d.UpdateAt, d.CreatedAt, d.CreatorID).FindByPage(query.Offset(), query.Size)
records, total, err := dq.Debug().Omit(d.Proto).FindByPage(query.Offset(), query.Size)
if err != nil {
panic(err)
}
@ -95,9 +95,9 @@ func UpdateDrafting(id int32, dto *dto.DraftingDto) bool {
oldD.Name = dto.Name
}
oldD.UpdateAt = time.Now()
_, error := dbquery.Drafting.Updates(oldD)
if error != nil {
panic(error)
_, err2 := dbquery.Drafting.Updates(oldD)
if err2 != nil {
panic(err2)
}
return true
}