作者 yangfu

点赞修改

... ... @@ -68,7 +68,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc
message string = protocol.MessageZanComment
)
rsp = &protocol.SympathyActionResponse{}
if chanceFavoirte, err = models.GetChanceFavorite(header.Uid, header.CompanyId, request.Id, request.SourceType); err != nil && err != orm.ErrNoRows {
if chanceFavoirte, err = models.GetChanceFavorite(header.UserId, header.CompanyId, request.Id, request.SourceType); err != nil && err != orm.ErrNoRows {
log.Error(err)
return
}
... ... @@ -104,7 +104,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc
}
}
if exists {
if err = models.UpdateChanceFavorite(header.Uid, header.CompanyId, request.Id, 1<<(uint(request.MarkType-1))); err != nil {
if err = models.UpdateChanceFavorite(header.UserId, header.CompanyId, request.Id, 1<<(uint(request.MarkType-1))); err != nil {
log.Error(request.MarkType, err)
return
}
... ... @@ -113,7 +113,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc
//add
chanceFavoirte = &models.ChanceFavorite{
Id: idgen.Next(),
UserId: header.Uid,
UserId: header.UserId,
CompanyId: header.CompanyId,
MarkFlag: request.SympathyType,
SourceType: request.SourceType,
... ... @@ -126,7 +126,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc
log.Error(err)
return
} else {
log.Debug(fmt.Sprintf("SympathyAction user:%d id:%d sympathy:%v", header.Uid, request.Id, request.SympathyType))
log.Debug(fmt.Sprintf("SympathyAction user:%d id:%d sympathy:%v", header.UserId, request.Id, request.SympathyType))
goto END
}
END:
... ...