作者 yangfu

机会编码

@@ -12,6 +12,7 @@ type AuditTemplate struct { @@ -12,6 +12,7 @@ type AuditTemplate struct {
12 CompanyId int `orm:"column(company_id)" description:"公司id"` 12 CompanyId int `orm:"column(company_id)" description:"公司id"`
13 ChanceTypeId int `orm:"column(chance_type_id)" description:"机会类型编号"` 13 ChanceTypeId int `orm:"column(chance_type_id)" description:"机会类型编号"`
14 Name string `orm:"column(name);size(20)" description:"子分类名称"` 14 Name string `orm:"column(name);size(20)" description:"子分类名称"`
  15 + Code string `orm:"column(code);size(50);null" description:"编码"`
15 Doc string `orm:"column(doc);size(255)" description:"说明"` 16 Doc string `orm:"column(doc);size(255)" description:"说明"`
16 Icon string `orm:"column(icon);size(255)" description:"图标"` 17 Icon string `orm:"column(icon);size(255)" description:"图标"`
17 NoticeType int8 `orm:"column(notice_type)" description:"通知方式"` 18 NoticeType int8 `orm:"column(notice_type)" description:"通知方式"`
@@ -33,6 +33,7 @@ type Chance struct { @@ -33,6 +33,7 @@ type Chance struct {
33 ApproveData string `orm:"column(approve_data)" description:"审核数据 冗余"` 33 ApproveData string `orm:"column(approve_data)" description:"审核数据 冗余"`
34 AuditLevel int `orm:"column(audit_level)" description:"当前审批步骤"` 34 AuditLevel int `orm:"column(audit_level)" description:"当前审批步骤"`
35 ApproveTime time.Time `orm:"column(approve_time);type(timestamp)" description:"审批时间"` 35 ApproveTime time.Time `orm:"column(approve_time);type(timestamp)" description:"审批时间"`
  36 + Code string `orm:"column(code)" description:"机会编码 一级编码+二级编码"`
36 } 37 }
37 38
38 func (t *Chance) TableName() string { 39 func (t *Chance) TableName() string {
@@ -177,7 +178,7 @@ order by create_at desc @@ -177,7 +178,7 @@ order by create_at desc
177 func GetChanceCollect(uid int64, lastId int64, pageSize int, v interface{}) (total int, err error) { 178 func GetChanceCollect(uid int64, lastId int64, pageSize int, v interface{}) (total int, err error) {
178 sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from ( 179 sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from (
179 select a.*,b.user_id,b.id,b.create_at,b.source_content,b.enable_status,b.review_status,b.audit_template_id,b.chance_type_id,comment_total,zan_total,view_total from ( 180 select a.*,b.user_id,b.id,b.create_at,b.source_content,b.enable_status,b.review_status,b.audit_template_id,b.chance_type_id,comment_total,zan_total,view_total from (
180 -select id collect_id,source_id,create_at collect_time from chance_favorite where (0=? or id<?) and user_id =? and enable_status=1 181 +select id collect_id,source_id,create_at collect_time,chance_id from chance_favorite where (0=? or id<?) and user_id =? and enable_status=1
181 and source_type=1 182 and source_type=1
182 and (mark_flag&2)>0 183 and (mark_flag&2)>0
183 )a left outer join chance b on a.source_id = b.id 184 )a left outer join chance b on a.source_id = b.id
@@ -208,7 +209,7 @@ and (mark_flag&1)>0 @@ -208,7 +209,7 @@ and (mark_flag&1)>0
208 order by collect_time desc 209 order by collect_time desc
209 limit ?`) 210 limit ?`)
210 211
211 - sqlCount := `select count(0) from chance_favorite where user_id =? and enable_status=1 and (mark_flag&1)>0` 212 + sqlCount := `select count(0) from chance_favorite where user_id =? and enable_status=1 and (mark_flag&1)>0 and source_type=1`
212 if err = utils.ExecuteQueryOne(&total, sqlCount, uid); err != nil { 213 if err = utils.ExecuteQueryOne(&total, sqlCount, uid); err != nil {
213 return 214 return
214 } 215 }
@@ -20,6 +20,7 @@ type ChanceFavorite struct { @@ -20,6 +20,7 @@ type ChanceFavorite struct {
20 EnableStatus int `orm:"column(enable_status)" description:"1:有效 0:无效"` 20 EnableStatus int `orm:"column(enable_status)" description:"1:有效 0:无效"`
21 CreateAt time.Time `orm:"column(create_at);type(timestamp);null" description:"创建时间"` 21 CreateAt time.Time `orm:"column(create_at);type(timestamp);null" description:"创建时间"`
22 UpdateAt time.Time `orm:"column(update_at);type(timestamp);null" description:"删除时间"` 22 UpdateAt time.Time `orm:"column(update_at);type(timestamp);null" description:"删除时间"`
  23 + ChanceId int64 `orm:"column(chance_id)" description:"机会编号"`
23 } 24 }
24 25
25 func (t *ChanceFavorite) TableName() string { 26 func (t *ChanceFavorite) TableName() string {
@@ -9,6 +9,7 @@ import ( @@ -9,6 +9,7 @@ import (
9 type ChanceType struct { 9 type ChanceType struct {
10 Id int `orm:"column(id);auto" json:"id"` 10 Id int `orm:"column(id);auto" json:"id"`
11 Name string `orm:"column(name);size(50)" description:"机会类型名称" json:"name"` 11 Name string `orm:"column(name);size(50)" description:"机会类型名称" json:"name"`
  12 + Code string `orm:"column(code);size(50);null" description:"编码"`
12 Icon string `orm:"column(icon);size(500);null" description:"图标地址" json:"icon"` 13 Icon string `orm:"column(icon);size(500);null" description:"图标地址" json:"icon"`
13 CompanyId int `orm:"column(company_id)" description:"表company.id 公司编号" json:"-"` 14 CompanyId int `orm:"column(company_id)" description:"表company.id 公司编号" json:"-"`
14 SortNum int `orm:"column(sort_num);null" description:"序号 公司下的序号" json:"-"` 15 SortNum int `orm:"column(sort_num);null" description:"序号 公司下的序号" json:"-"`
@@ -20,6 +20,7 @@ type UserMsg struct { @@ -20,6 +20,7 @@ type UserMsg struct {
20 IsPublic int8 `orm:"column(is_public)" description:"1:公开 0:不公开"` 20 IsPublic int8 `orm:"column(is_public)" description:"1:公开 0:不公开"`
21 IsRead int8 `orm:"column(is_read)" description:"1:已读 0:未读"` 21 IsRead int8 `orm:"column(is_read)" description:"1:已读 0:未读"`
22 CreateAt time.Time `orm:"column(create_at);type(timestamp);auto_now" description:"创建时间"` 22 CreateAt time.Time `orm:"column(create_at);type(timestamp);auto_now" description:"创建时间"`
  23 + ChanceId int64 `orm:"column(chance_id)" description:"机会编号"`
23 } 24 }
24 25
25 const ( 26 const (
@@ -180,11 +181,11 @@ func GetUserMsgsBulletin(userId, companyId int64, msgType int, lastId int64, pag @@ -180,11 +181,11 @@ func GetUserMsgsBulletin(userId, companyId int64, msgType int, lastId int64, pag
180 func GetChanceMsg(uid, lastId int64, pageSize int, msgType int, v interface{}) (total int, err error) { 181 func GetChanceMsg(uid, lastId int64, pageSize int, msgType int, v interface{}) (total int, err error) {
181 sql := `select a.*,b.images,b.speechs,b.videos from ( 182 sql := `select a.*,b.images,b.speechs,b.videos from (
182 select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status,b.approve_data from ( 183 select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status,b.approve_data from (
183 -select id,company_id,receive_user_id,message,source_id,is_read 184 +select id,company_id,receive_user_id,message,source_id,is_read,chance_id,create_at msg_time
184 from user_msg where receive_user_id=? and source_type=1 and (?=0 or id<?) and msg_type=? 185 from user_msg where receive_user_id=? and source_type=1 and (?=0 or id<?) and msg_type=?
185 )a left outer join chance b on a.source_id = b.id 186 )a left outer join chance b on a.source_id = b.id
186 )a left outer join chance_data b on a.source_id =b.chance_id 187 )a left outer join chance_data b on a.source_id =b.chance_id
187 -order by a.create_at desc 188 +order by a.msg_time desc
188 LIMIT ?` 189 LIMIT ?`
189 190
190 sqlCount := `select count(0) 191 sqlCount := `select count(0)
@@ -205,12 +206,12 @@ func GetChanceCommentMsg(uid, lastId int64, pageSize int, msgType int, v interfa @@ -205,12 +206,12 @@ func GetChanceCommentMsg(uid, lastId int64, pageSize int, msgType int, v interfa
205 sql := `select a.*,b.content commented_content,b.create_at commented_time,b.user_id commented_user_id from ( 206 sql := `select a.*,b.content commented_content,b.create_at commented_time,b.user_id commented_user_id from (
206 select a.*,b.images,b.speechs,b.videos from ( 207 select a.*,b.images,b.speechs,b.videos from (
207 select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status from ( 208 select a.*,b.source_content,b.enable_status,b.user_id chance_user_id,b.create_at,b.review_status from (
208 -select id,message content,source_type,source_id,is_read,create_at comment_time from user_msg 209 +select id,message content,source_type,source_id,is_read,create_at comment_time,chance_id from user_msg
209 where receive_user_id =? and (?=0 or id<?) and msg_type=? 210 where receive_user_id =? and (?=0 or id<?) and msg_type=?
210 )a left outer join chance b on a.source_id = b.id and source_type=1 211 )a left outer join chance b on a.source_id = b.id and source_type=1
211 )a left outer join chance_data b on a.source_id = b.chance_id and source_type = 1 212 )a left outer join chance_data b on a.source_id = b.chance_id and source_type = 1
212 )a left outer join comment b on a.source_id = b.id and a.source_type=2 213 )a left outer join comment b on a.source_id = b.id and a.source_type=2
213 -order by a.create_at desc 214 +order by a.comment_time desc
214 LIMIT ?` 215 LIMIT ?`
215 216
216 sqlCount := `select count(0) 217 sqlCount := `select count(0)
@@ -73,6 +73,7 @@ type SympathyActionRequest struct { @@ -73,6 +73,7 @@ type SympathyActionRequest struct {
73 SourceType int `json:"sourceType" valid:"Required"` //protocol.SourceType //1.机会 2.评论 73 SourceType int `json:"sourceType" valid:"Required"` //protocol.SourceType //1.机会 2.评论
74 Id int64 `json:"id" valid:"Required"` //机会编号 / 评论编号 74 Id int64 `json:"id" valid:"Required"` //机会编号 / 评论编号
75 SympathyType int `json:"sympathyType"` //1:标记 0:取消标记 75 SympathyType int `json:"sympathyType"` //1:标记 0:取消标记
  76 + ChanceId int64 `json:"chanceId"` //机会编号
76 } 77 }
77 type SympathyActionResponse struct { 78 type SympathyActionResponse struct {
78 } 79 }
@@ -300,6 +301,9 @@ type ChanceCollectItemOrm struct { @@ -300,6 +301,9 @@ type ChanceCollectItemOrm struct {
300 301
301 CollectId int64 `orm:"column(collect_id)"` //收藏id 302 CollectId int64 `orm:"column(collect_id)"` //收藏id
302 CollectTime time.Time `orm:"column(collect_time)"` //收藏时间 303 CollectTime time.Time `orm:"column(collect_time)"` //收藏时间
  304 +
  305 + //chance_id
  306 + //ChanceId int64 `orm:"column(id)"`
303 } 307 }
304 308
305 //机会池收藏列表项 309 //机会池收藏列表项
@@ -328,7 +332,7 @@ type ChanceThumbUpItemOrm struct { @@ -328,7 +332,7 @@ type ChanceThumbUpItemOrm struct {
328 332
329 //我的评论 333 //我的评论
330 type ChanceCommentItemOrm struct { 334 type ChanceCommentItemOrm struct {
331 - //ChanceId int64 `orm:"column(id)"` 335 + ChanceId int64 `orm:"column(chance_id)"`
332 Uid int64 `orm:"column(chance_user_id)"` 336 Uid int64 `orm:"column(chance_user_id)"`
333 CreateTime time.Time `orm:"column(create_at)"` 337 CreateTime time.Time `orm:"column(create_at)"`
334 SourceContent string `orm:"column(source_content)"` 338 SourceContent string `orm:"column(source_content)"`
@@ -524,6 +528,8 @@ type CommonListItem struct { @@ -524,6 +528,8 @@ type CommonListItem struct {
524 528
525 ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭 529 ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭
526 ReviewStatus int `json:"reviewStatus"` //审核状态 530 ReviewStatus int `json:"reviewStatus"` //审核状态
  531 +
  532 + ChanceId int64 `json:"chanceId"` //机会编号
527 } 533 }
528 534
529 type MsgCommonListItem struct { 535 type MsgCommonListItem struct {
@@ -550,7 +556,8 @@ type MsgCommonListItem struct { @@ -550,7 +556,8 @@ type MsgCommonListItem struct {
550 ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭 556 ChanceStatus int `json:"chanceStatus"` //0:正常 1.删除 2.关闭
551 ReviewStatus int `json:"reviewStatus"` //审核状态 557 ReviewStatus int `json:"reviewStatus"` //审核状态
552 558
553 - IsRead bool `json:"isRead"` 559 + IsRead bool `json:"isRead"`
  560 + ChanceId int64 `json:"chanceId"` //机会编号
554 } 561 }
555 type ChanceItem struct { 562 type ChanceItem struct {
556 Id int64 `json:"id"` 563 Id int64 `json:"id"`
@@ -273,7 +273,7 @@ type MsgChanceApproveItemOrm struct { @@ -273,7 +273,7 @@ type MsgChanceApproveItemOrm struct {
273 CreateTime time.Time `orm:"column(create_at)"` 273 CreateTime time.Time `orm:"column(create_at)"`
274 Message string `orm:"column(message)"` 274 Message string `orm:"column(message)"`
275 IsRead int64 `orm:"column(isRead)"` 275 IsRead int64 `orm:"column(isRead)"`
276 - ChanceId int64 `orm:"column(source_id)"` // 机会id 276 + ChanceId int64 `orm:"column(chance_id)"` // 机会id
277 //EnableStatus int `orm:"column(enable_status)"` 277 //EnableStatus int `orm:"column(enable_status)"`
278 } 278 }
279 279
@@ -51,6 +51,7 @@ func SendApproveMsg(receiverId int64, name string, companyId int64, chanceId int @@ -51,6 +51,7 @@ func SendApproveMsg(receiverId int64, name string, companyId int64, chanceId int
51 SourceType: protocol.SourceTypeChance, 51 SourceType: protocol.SourceTypeChance,
52 IsPublic: 0, 52 IsPublic: 0,
53 CreateAt: time.Now(), 53 CreateAt: time.Now(),
  54 + ChanceId: chanceId,
54 } 55 }
55 if _, err = models.AddUserMsg(userMsg); err != nil { 56 if _, err = models.AddUserMsg(userMsg); err != nil {
56 return 57 return
@@ -110,11 +111,11 @@ func SendApprovedMsg(receiverId int64, name string, companyId int64, chanceId in @@ -110,11 +111,11 @@ func SendApprovedMsg(receiverId int64, name string, companyId int64, chanceId in
110 return 111 return
111 } 112 }
112 format = fmt.Sprintf(format, chanceType.Name) 113 format = fmt.Sprintf(format, chanceType.Name)
113 - return SendMsg(receiverId, name, companyId, chanceId, protocol.SourceTypeChance, format, msgType) 114 + return SendMsg(receiverId, name, companyId, chanceId, protocol.SourceTypeChance, format, msgType, chanceId)
114 } 115 }
115 116
116 //发送消息 117 //发送消息
117 -func SendMsg(receiverId int64, name string, companyId int64, sourceId int64, sourceType int, message string, msgType int) (err error) { 118 +func SendMsg(receiverId int64, name string, companyId int64, sourceId int64, sourceType int, message string, msgType int, chanceId int64) (err error) {
118 var ( 119 var (
119 userMsg *models.UserMsg 120 userMsg *models.UserMsg
120 ) 121 )
@@ -128,6 +129,7 @@ func SendMsg(receiverId int64, name string, companyId int64, sourceId int64, sou @@ -128,6 +129,7 @@ func SendMsg(receiverId int64, name string, companyId int64, sourceId int64, sou
128 SourceType: sourceType, 129 SourceType: sourceType,
129 IsPublic: 0, 130 IsPublic: 0,
130 CreateAt: time.Now(), 131 CreateAt: time.Now(),
  132 + ChanceId: chanceId,
131 } 133 }
132 if _, err = models.AddUserMsg(userMsg); err != nil { 134 if _, err = models.AddUserMsg(userMsg); err != nil {
133 return 135 return
@@ -77,13 +77,18 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc @@ -77,13 +77,18 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc
77 log.Error(err) 77 log.Error(err)
78 return 78 return
79 } 79 }
  80 + if chance, err = models.GetChanceById(request.ChanceId); err != nil {
  81 + log.Error(request.Id, "机会不存在", err)
  82 + err = protocol.NewErrWithMessage(5101)
  83 + return
  84 + }
80 if request.SourceType == protocol.SourceTypeChance { 85 if request.SourceType == protocol.SourceTypeChance {
81 message = protocol.MessageZanChance 86 message = protocol.MessageZanChance
82 - if chance, err = models.GetChanceById(request.Id); err != nil {  
83 - log.Error(request.Id, "机会不存在", err)  
84 - err = protocol.NewErrWithMessage(5101)  
85 - return  
86 - } 87 + //if chance, err = models.GetChanceById(request.Id); err != nil {
  88 + // log.Error(request.Id, "机会不存在", err)
  89 + // err = protocol.NewErrWithMessage(5101)
  90 + // return
  91 + //}
87 sourceId = chance.Id 92 sourceId = chance.Id
88 userId = chance.UserId 93 userId = chance.UserId
89 chanceType = chance.ChanceTypeId 94 chanceType = chance.ChanceTypeId
@@ -141,6 +146,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc @@ -141,6 +146,7 @@ func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyAc
141 ChanceType: chanceType, 146 ChanceType: chanceType,
142 CreateAt: time.Now(), 147 CreateAt: time.Now(),
143 EnableStatus: 1, 148 EnableStatus: 1,
  149 + ChanceId: request.ChanceId,
144 } 150 }
145 if _, err = models.AddChanceFavorite(chanceFavoirte); err != nil { 151 if _, err = models.AddChanceFavorite(chanceFavoirte); err != nil {
146 log.Error(err) 152 log.Error(err)
@@ -160,7 +166,9 @@ END: @@ -160,7 +166,9 @@ END:
160 agg.DeleteSendedMsg(sourceId, request.SourceType, userId, protocol.MsgTypeThumbUp) 166 agg.DeleteSendedMsg(sourceId, request.SourceType, userId, protocol.MsgTypeThumbUp)
161 } else { 167 } else {
162 //发送点赞消息 168 //发送点赞消息
163 - agg.SendMsg(userId, fmt.Sprintf("%v", userId), header.CompanyId, request.Id, request.SourceType, message, protocol.MsgTypeThumbUp) 169 + if header.UserId != userId {
  170 + agg.SendMsg(userId, fmt.Sprintf("%v", userId), header.CompanyId, request.Id, request.SourceType, message, protocol.MsgTypeThumbUp, request.ChanceId)
  171 + }
164 } 172 }
165 if !utils.ExecuteSqlByRoll(true, agg.GetIncrementSql(table, "zan_total", incre, request.Id)) { 173 if !utils.ExecuteSqlByRoll(true, agg.GetIncrementSql(table, "zan_total", incre, request.Id)) {
166 // 174 //
@@ -337,6 +345,7 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit @@ -337,6 +345,7 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit
337 AuditLevel: 1, 345 AuditLevel: 1,
338 ReviewStatus: protocol.ReviewStatusAuditging, 346 ReviewStatus: protocol.ReviewStatusAuditging,
339 DepartmentId: request.RelatedDepartment, 347 DepartmentId: request.RelatedDepartment,
  348 + Code: fmt.Sprintf("%v%v", chanceType.Code, template.Code),
340 } 349 }
341 if _, err = orm.Insert(chance); err != nil { 350 if _, err = orm.Insert(chance); err != nil {
342 log.Error(err) 351 log.Error(err)
@@ -1386,6 +1395,7 @@ func MyCollectChance(header *protocol.RequestHeader, request *protocol.MyCollect @@ -1386,6 +1395,7 @@ func MyCollectChance(header *protocol.RequestHeader, request *protocol.MyCollect
1386 Id: chance.CollectId, 1395 Id: chance.CollectId,
1387 CollectTime: chance.CollectTime.Unix() * 1000, 1396 CollectTime: chance.CollectTime.Unix() * 1000,
1388 } 1397 }
  1398 + //commItem.ChanceId = chance.ChanceId
1389 } 1399 }
1390 rsp.List = append(rsp.List, commItem) 1400 rsp.List = append(rsp.List, commItem)
1391 } 1401 }
@@ -74,7 +74,7 @@ func IComment(header *protocol.RequestHeader, request *protocol.ICommentRequest) @@ -74,7 +74,7 @@ func IComment(header *protocol.RequestHeader, request *protocol.ICommentRequest)
74 return 74 return
75 } 75 }
76 } 76 }
77 - if err = agg.SendMsg(recevierId, "", header.CompanyId, sourceId, request.SourceType, request.Content, protocol.MsgTypeComment); err != nil { 77 + if err = agg.SendMsg(recevierId, "", header.CompanyId, sourceId, request.SourceType, request.Content, protocol.MsgTypeComment, request.Id); err != nil {
78 log.Error(err) 78 log.Error(err)
79 orm.Rollback() 79 orm.Rollback()
80 return 80 return
@@ -286,6 +286,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc @@ -286,6 +286,7 @@ func MsgChanceApprove(header *protocol.RequestHeader, request *protocol.MsgChanc
286 //审核完有审核数据 286 //审核完有审核数据
287 commItem.Message = chance.Message 287 commItem.Message = chance.Message
288 commItem.IsRead = chance.IsRead == 1 288 commItem.IsRead = chance.IsRead == 1
  289 + commItem.ChanceId = chance.ChanceId
289 rsp.List = append(rsp.List, commItem) 290 rsp.List = append(rsp.List, commItem)
290 } 291 }
291 return 292 return
@@ -346,6 +347,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance @@ -346,6 +347,7 @@ func MsgChanceSubmit(header *protocol.RequestHeader, request *protocol.MsgChance
346 //审核完有审核数据 347 //审核完有审核数据
347 commItem.Message = chance.Message 348 commItem.Message = chance.Message
348 commItem.MsgId = chance.Id 349 commItem.MsgId = chance.Id
  350 + commItem.ChanceId = chance.ChanceId
349 rsp.List = append(rsp.List, commItem) 351 rsp.List = append(rsp.List, commItem)
350 } 352 }
351 return 353 return
@@ -418,6 +420,7 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc @@ -418,6 +420,7 @@ func MsgChanceComment(header *protocol.RequestHeader, request *protocol.MsgChanc
418 commItem.IsRead = chance.IsRead == 1 420 commItem.IsRead = chance.IsRead == 1
419 commItem.SourceType = chance.SourceType 421 commItem.SourceType = chance.SourceType
420 commItem.MsgId = chance.CommentId 422 commItem.MsgId = chance.CommentId
  423 + commItem.ChanceId = chance.ChanceId
421 rsp.List = append(rsp.List, commItem) 424 rsp.List = append(rsp.List, commItem)
422 } 425 }
423 return 426 return
@@ -490,6 +493,7 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc @@ -490,6 +493,7 @@ func MsgChanceThumbUp(header *protocol.RequestHeader, request *protocol.MsgChanc
490 commItem.IsRead = chance.IsRead == 1 493 commItem.IsRead = chance.IsRead == 1
491 commItem.SourceType = chance.SourceType 494 commItem.SourceType = chance.SourceType
492 commItem.MsgId = chance.CommentId 495 commItem.MsgId = chance.CommentId
  496 + commItem.ChanceId = chance.ChanceId
493 rsp.List = append(rsp.List, commItem) 497 rsp.List = append(rsp.List, commItem)
494 } 498 }
495 return 499 return
@@ -379,7 +379,7 @@ func UserStatistics(header *protocol.RequestHeader, request *protocol.UserStatis @@ -379,7 +379,7 @@ func UserStatistics(header *protocol.RequestHeader, request *protocol.UserStatis
379 } 379 }
380 break 380 break
381 case protocol.ZanStatic: //点赞 381 case protocol.ZanStatic: //点赞
382 - if total, err = models.GetChanceThumbup(header.UserId, 0, 0, nil); err != nil { 382 + if total, err = models.GetChanceThumbUp(header.UserId, 0, 0, nil); err != nil {
383 log.Error(err) 383 log.Error(err)
384 } 384 }
385 break 385 break