- add remark on table promotion
This commit is contained in:
@@ -397,16 +397,20 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueW
|
||||
} else if step == 3 {
|
||||
err = promotionHandler.ConfirmPromotion(infoId, "")
|
||||
if err == nil {
|
||||
promotion.Status = model.PromotionStatusRemoteCreated
|
||||
} else {
|
||||
promotion.Status = model.PromotionStatusRemoteFailed
|
||||
db := dao.GetDB()
|
||||
if _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
||||
model.FieldStatus: model.PromotionStatusRemoteCreated,
|
||||
}, ctx.GetUserName(), nil); err == nil {
|
||||
RefreshJdPromotionLockStatus(promotion.ID)
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
db := dao.GetDB()
|
||||
if _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
||||
"Status": promotion.Status,
|
||||
}, ctx.GetUserName(), nil); err == nil {
|
||||
RefreshJdPromotionLockStatus(promotion.ID)
|
||||
}
|
||||
dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
||||
model.FieldStatus: model.PromotionStatusRemoteFailed,
|
||||
model.FieldRemark: err.Error(),
|
||||
}, ctx.GetUserName(), nil)
|
||||
}
|
||||
return nil, err
|
||||
}, 4)
|
||||
|
||||
Reference in New Issue
Block a user