作者 tangxvhui

修复bug

... ... @@ -71,9 +71,9 @@ type (
Id int64 `json:"id"`
CompanyId int64 `json:"companyId,omitempty"` // 公司ID
CompanyName string `json:"companyName,omitempty"` // 公司名称
Name string `json:"name,omitempty"` // 名称
Avatar string `json:"avatar,omitempty"` // 头像
Position string `json:"position,omitempty"` // 职位
Name string `json:"name"` // 名称
Avatar string `json:"avatar"` // 头像
Position string `json:"position"` // 职位
}
... ...
... ... @@ -51,6 +51,8 @@ func (l *MiniArticleMarkUserReadLogic) MiniArticleMarkUserRead(req *types.MiniAr
return nil, xerr.NewErrMsgErr("标记浏览记录失败", err)
}
if len(markRecord) > 0 {
markRecord[0].Author = articleData.Author
markRecord[0].Title = articleData.Title
_, err = l.svcCtx.UserReadArticleRepository.Update(l.ctx, conn, markRecord[0])
if err != nil {
return nil, xerr.NewErrMsgErr("标记浏览记录失败", err)
... ...
... ... @@ -296,7 +296,7 @@ type SimpleUser struct {
Id int64 `json:"id"`
CompanyId int64 `json:"companyId,omitempty"` // 公司ID
CompanyName string `json:"companyName,omitempty"` // 公司名称
Name string `json:"name,omitempty"` // 名称
Name string `json:"name"` // 名称
Avatar string `json:"avatar,omitempty"` // 头像
Position string `json:"position,omitempty"` // 职位
}
... ...
... ... @@ -136,7 +136,9 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction.
if v, ok := queryOptions["endCreatedAt"]; ok {
tx = tx.Where("created_at < ?", v)
}
if v, ok := queryOptions["authorId"]; ok {
tx = tx.Where("author_id=?", v)
}
if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil {
return dms, tx.Error
}
... ...