This commit is contained in:
苏尹岚
2020-07-31 17:20:09 +08:00
parent 9ed5763c33
commit eca8124344

View File

@@ -3402,18 +3402,18 @@ func UpdateStorePricePack(ctx *jxcontext.Context, storeID, vendorID int, pricePa
if strings.Contains(pricePack, utils.Int2Str(storeID)) {
obj := dao.PricePercentagePack2Obj(value)
realValue, _ := json.Marshal(obj)
_, err = UpdateConfig(ctx, pricePack, model.ConfigTypePricePack, string(realValue))
// configList, err := dao.QueryConfigs(db, pricePack, model.ConfigTypePricePack, "")
// if err != nil {
// dao.Rollback(db)
// return err
// }
// if _, err = dao.UpdateEntityLogically(db, configList[0], map[string]interface{}{
// "Value": value,
// }, ctx.GetUserName(), nil); err != nil {
// dao.Rollback(db)
// return err
// }
// _, err = UpdateConfig(ctx, pricePack, model.ConfigTypePricePack, string(realValue))
configList, err := dao.QueryConfigs(db, pricePack, model.ConfigTypePricePack, "")
if err != nil {
dao.Rollback(db)
return err
}
if _, err = dao.UpdateEntityLogically(db, configList[0], map[string]interface{}{
"Value": string(realValue),
}, ctx.GetUserName(), nil); err != nil {
dao.Rollback(db)
return err
}
} else {
//表示门店要改他原有的调价包
//1、调价包名字要加上门店编号门店名等