正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
@@ -68,7 +68,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | @@ -68,7 +68,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | ||
68 | message string = protocol.MessageZanComment | 68 | message string = protocol.MessageZanComment |
69 | ) | 69 | ) |
70 | rsp = &protocol.SympathyActionResponse{} | 70 | rsp = &protocol.SympathyActionResponse{} |
71 | - if chanceFavoirte, err = models.GetChanceFavorite(header.Uid, header.CompanyId, request.Id, request.SourceType); err != nil && err != orm.ErrNoRows { | 71 | + if chanceFavoirte, err = models.GetChanceFavorite(header.UserId, header.CompanyId, request.Id, request.SourceType); err != nil && err != orm.ErrNoRows { |
72 | log.Error(err) | 72 | log.Error(err) |
73 | return | 73 | return |
74 | } | 74 | } |
@@ -104,7 +104,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | @@ -104,7 +104,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | ||
104 | } | 104 | } |
105 | } | 105 | } |
106 | if exists { | 106 | if exists { |
107 | - if err = models.UpdateChanceFavorite(header.Uid, header.CompanyId, request.Id, 1<<(uint(request.MarkType-1))); err != nil { | 107 | + if err = models.UpdateChanceFavorite(header.UserId, header.CompanyId, request.Id, 1<<(uint(request.MarkType-1))); err != nil { |
108 | log.Error(request.MarkType, err) | 108 | log.Error(request.MarkType, err) |
109 | return | 109 | return |
110 | } | 110 | } |
@@ -113,7 +113,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | @@ -113,7 +113,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | ||
113 | //add | 113 | //add |
114 | chanceFavoirte = &models.ChanceFavorite{ | 114 | chanceFavoirte = &models.ChanceFavorite{ |
115 | Id: idgen.Next(), | 115 | Id: idgen.Next(), |
116 | - UserId: header.Uid, | 116 | + UserId: header.UserId, |
117 | CompanyId: header.CompanyId, | 117 | CompanyId: header.CompanyId, |
118 | MarkFlag: request.SympathyType, | 118 | MarkFlag: request.SympathyType, |
119 | SourceType: request.SourceType, | 119 | SourceType: request.SourceType, |
@@ -126,7 +126,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | @@ -126,7 +126,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc | ||
126 | log.Error(err) | 126 | log.Error(err) |
127 | return | 127 | return |
128 | } else { | 128 | } else { |
129 | - log.Debug(fmt.Sprintf("SympathyAction user:%d id:%d sympathy:%v", header.Uid, request.Id, request.SympathyType)) | 129 | + log.Debug(fmt.Sprintf("SympathyAction user:%d id:%d sympathy:%v", header.UserId, request.Id, request.SympathyType)) |
130 | goto END | 130 | goto END |
131 | } | 131 | } |
132 | END: | 132 | END: |
-
请 注册 或 登录 后发表评论