- refactor mysql transaction

This commit is contained in:
gazebo
2018-11-05 15:22:30 +08:00
parent cf4bfb3dd8
commit 7c07d65c48
4 changed files with 9 additions and 5 deletions

View File

@@ -214,11 +214,13 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
for _, v := range retVal.Stores {
if v.StoreMapStr != "" {
if err = utils.UnmarshalUseNumber([]byte(v.StoreMapStr), &v.StoreMaps); err != nil {
dao.Rollback(db)
return nil, err
}
}
if v.CourierMapStr != "" {
if err = utils.UnmarshalUseNumber([]byte(v.CourierMapStr), &v.CourierMaps); err != nil {
dao.Rollback(db)
return nil, err
}
}