a
This commit is contained in:
@@ -781,6 +781,16 @@ func CancelAct(ctx *jxcontext.Context, actID int) (err error) {
|
||||
return err
|
||||
}
|
||||
_, err = SyncAct(ctx, nil, actID, nil, false)
|
||||
act := &model.Act{}
|
||||
act.ID = actID
|
||||
if err == nil {
|
||||
if _, err = dao.UpdateEntityLogically(db, act,
|
||||
map[string]interface{}{
|
||||
model.FieldStatus: model.ActStatusCanceled,
|
||||
}, ctx.GetUserName(), nil); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -883,16 +893,16 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
|
||||
}
|
||||
|
||||
if isNeedCancelAct {
|
||||
act := &model.Act{}
|
||||
act.ID = actID
|
||||
if err == nil {
|
||||
if _, err = dao.UpdateEntityLogically(db, act,
|
||||
map[string]interface{}{
|
||||
model.FieldStatus: model.ActStatusCanceled,
|
||||
}, ctx.GetUserName(), nil); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
// act := &model.Act{}
|
||||
// act.ID = actID
|
||||
// if err == nil {
|
||||
// if _, err = dao.UpdateEntityLogically(db, act,
|
||||
// map[string]interface{}{
|
||||
// model.FieldStatus: model.ActStatusCanceled,
|
||||
// }, ctx.GetUserName(), nil); err != nil {
|
||||
// return 0, err
|
||||
// }
|
||||
// }
|
||||
}
|
||||
dao.Commit(db)
|
||||
return originSyncStatus, err
|
||||
|
||||
Reference in New Issue
Block a user