...
|
...
|
@@ -947,9 +947,9 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, |
|
|
)
|
|
|
orm := orm.NewOrm()
|
|
|
orm.Begin()
|
|
|
var logId int64
|
|
|
var logId, id int64
|
|
|
//发送日志
|
|
|
if id, err := agg.SaveApproveLogResult(orm, 10, header.UserId, chance.Id); err != nil {
|
|
|
if id, err = agg.SaveApproveLogResult(orm, 10, header.UserId, chance.Id); err != nil {
|
|
|
log.Error(err)
|
|
|
orm.Rollback()
|
|
|
return
|
...
|
...
|
@@ -970,15 +970,16 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, |
|
|
orm.Rollback()
|
|
|
return
|
|
|
}
|
|
|
if chanceType, err := models.GetChanceTypeById(chance.ChanceTypeId); err != nil {
|
|
|
log.Error(err)
|
|
|
if chanceType, e := models.GetChanceTypeById(chance.ChanceTypeId); e != nil {
|
|
|
log.Error(e)
|
|
|
err = e
|
|
|
orm.Rollback()
|
|
|
return
|
|
|
} else {
|
|
|
message = fmt.Sprintf(protocol.MessageChanceRevise, chanceType.Name)
|
|
|
}
|
|
|
//发送修改机会消息
|
|
|
if err := agg.SendMsgWithHeader(header, chance.UserId, "", chanceReviseLog.Id, protocol.SourceTypeChanceReviseLog, message, protocol.MsgTypeChanceRevise, chance.Id); err != nil {
|
|
|
if err = agg.SendMsgWithHeader(header, chance.UserId, "", chanceReviseLog.Id, protocol.SourceTypeChanceReviseLog, message, protocol.MsgTypeChanceRevise, chance.Id); err != nil {
|
|
|
log.Error(err)
|
|
|
orm.Rollback()
|
|
|
return
|
...
|
...
|
|