- 修复DeleteConfig中删除银行的BUG
This commit is contained in:
@@ -241,9 +241,9 @@ func DeleteConfig(ctx *jxcontext.Context, key, configType string) (err error) {
|
|||||||
if err = checkConfig(configType, key, ""); err != nil {
|
if err = checkConfig(configType, key, ""); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
db := dao.GetDB()
|
||||||
switch configType {
|
switch configType {
|
||||||
case model.ConfigTypePricePack:
|
case model.ConfigTypePricePack:
|
||||||
db := dao.GetDB()
|
|
||||||
storeMapList, err := dao.GetStoresMapList(db, nil, nil, model.StoreStatusAll, model.StoreIsSyncYes, key)
|
storeMapList, err := dao.GetStoresMapList(db, nil, nil, model.StoreStatusAll, model.StoreIsSyncYes, key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -255,11 +255,11 @@ func DeleteConfig(ctx *jxcontext.Context, key, configType string) (err error) {
|
|||||||
}
|
}
|
||||||
return fmt.Errorf("还有门店在使用价格包:%s,门店信息:%s", key, strings.Join(storeInfo, ","))
|
return fmt.Errorf("还有门店在使用价格包:%s,门店信息:%s", key, strings.Join(storeInfo, ","))
|
||||||
}
|
}
|
||||||
_, err = dao.DeleteEntityLogically(db, &model.NewConfig{}, nil, ctx.GetUserName(), map[string]interface{}{
|
|
||||||
"Key": key,
|
|
||||||
"Type": configType,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
_, err = dao.DeleteEntityLogically(db, &model.NewConfig{}, nil, ctx.GetUserName(), map[string]interface{}{
|
||||||
|
"Key": key,
|
||||||
|
"Type": configType,
|
||||||
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user