- OrderUseNewTable

This commit is contained in:
gazebo
2018-10-17 14:33:47 +08:00
parent 9f3624c777
commit 9c125a61a0
9 changed files with 39 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego/orm"
)
@@ -137,3 +138,19 @@ func AddStoreCategoryMap(db *DaoDB, storeID, categoryID int, vendorID int, vendo
}
return err
}
func GetStoreMapByStoreID(db *DaoDB, storeID, vendorID int) (storeMap *model.StoreMap) {
if db == nil {
db = GetDB()
}
storeMap = &model.StoreMap{
StoreID: storeID,
VendorID: vendorID,
}
storeMap.DeletedAt = utils.DefaultTimeValue
if err := GetEntity(db, storeMap, model.FieldStoreID, model.FieldVendorID, model.FieldDeletedAt); err != nil {
globals.SugarLogger.Warnf("getStoreDeliveryType read storefeature failed with error:%v", err)
return nil
}
return storeMap
}