正在显示
1 个修改的文件
包含
6 行增加
和
5 行删除
@@ -947,9 +947,9 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, | @@ -947,9 +947,9 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, | ||
947 | ) | 947 | ) |
948 | orm := orm.NewOrm() | 948 | orm := orm.NewOrm() |
949 | orm.Begin() | 949 | orm.Begin() |
950 | - var logId int64 | 950 | + var logId, id int64 |
951 | //发送日志 | 951 | //发送日志 |
952 | - if id, err := agg.SaveApproveLogResult(orm, 10, header.UserId, chance.Id); err != nil { | 952 | + if id, err = agg.SaveApproveLogResult(orm, 10, header.UserId, chance.Id); err != nil { |
953 | log.Error(err) | 953 | log.Error(err) |
954 | orm.Rollback() | 954 | orm.Rollback() |
955 | return | 955 | return |
@@ -970,15 +970,16 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, | @@ -970,15 +970,16 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, | ||
970 | orm.Rollback() | 970 | orm.Rollback() |
971 | return | 971 | return |
972 | } | 972 | } |
973 | - if chanceType, err := models.GetChanceTypeById(chance.ChanceTypeId); err != nil { | ||
974 | - log.Error(err) | 973 | + if chanceType, e := models.GetChanceTypeById(chance.ChanceTypeId); e != nil { |
974 | + log.Error(e) | ||
975 | + err = e | ||
975 | orm.Rollback() | 976 | orm.Rollback() |
976 | return | 977 | return |
977 | } else { | 978 | } else { |
978 | message = fmt.Sprintf(protocol.MessageChanceRevise, chanceType.Name) | 979 | message = fmt.Sprintf(protocol.MessageChanceRevise, chanceType.Name) |
979 | } | 980 | } |
980 | //发送修改机会消息 | 981 | //发送修改机会消息 |
981 | - if err := agg.SendMsgWithHeader(header, chance.UserId, "", chanceReviseLog.Id, protocol.SourceTypeChanceReviseLog, message, protocol.MsgTypeChanceRevise, chance.Id); err != nil { | 982 | + if err = agg.SendMsgWithHeader(header, chance.UserId, "", chanceReviseLog.Id, protocol.SourceTypeChanceReviseLog, message, protocol.MsgTypeChanceRevise, chance.Id); err != nil { |
982 | log.Error(err) | 983 | log.Error(err) |
983 | orm.Rollback() | 984 | orm.Rollback() |
984 | return | 985 | return |
-
请 注册 或 登录 后发表评论