错误提示,门店评分修改

This commit is contained in:
苏尹岚
2019-12-12 13:38:06 +08:00
parent 4a4342def0
commit 19704b74bc
12 changed files with 86 additions and 65 deletions

View File

@@ -64,10 +64,14 @@ func BeginSavePriceRefer(ctx *jxcontext.Context, cityCodes, skuIDs []int) (err e
}
}
}()
dao.DeleteEntity(db, priceReferSnapshot[0], "SnapshotAt")
priceReferSnapshotDeleteHis := &model.PriceReferSnapshot{SnapshotAt: snapshotAt.AddDate(0, -1, 0)}
priceReferSnapshotDelete := &model.PriceReferSnapshot{SnapshotAt: snapshotAt}
dao.DeleteEntity(db, priceReferSnapshotDeleteHis, "SnapshotAt")
dao.DeleteEntity(db, priceReferSnapshotDelete, "SnapshotAt")
for _, v := range priceReferSnapshot {
dao.WrapAddIDCULDEntity(v, ctx.GetUserName())
v.SnapshotAt = snapshotAt
fmt.Println(v)
if err = dao.CreateEntity(db, v); err != nil {
return err
}