storedetail
This commit is contained in:
@@ -84,7 +84,7 @@ func (p *PurchaseHandler) IsErrCategoryNotExist(err error) (isNotExist bool) {
|
||||
}
|
||||
|
||||
func getCheckExdStoreNameAndSeq(storeID int, storeCat *dao.SkuStoreCatInfo) (name string, seq int, isCheck bool) {
|
||||
store, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDEBAI)
|
||||
store, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDEBAI, "")
|
||||
if err != nil || store == nil {
|
||||
return storeCat.Name, storeCat.Seq, false
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
errList.AddErr(a.UpdateStoreInfo4Open2(storeParams, modifyCloseStatus))
|
||||
}
|
||||
if store.FreightDeductionPack != "" {
|
||||
storeDetail, err2 := dao.GetStoreDetail(db, store.ID, model.VendorIDJD)
|
||||
storeDetail, err2 := dao.GetStoreDetail(db, store.ID, model.VendorIDJD, "")
|
||||
if err2 == nil {
|
||||
if storeDetail.FreightDeductionPackObj != nil {
|
||||
freightParams := &jdapi.UpdateStoreFreightParam{
|
||||
|
||||
@@ -205,7 +205,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
|
||||
func (p *PurchaseHandler) SyncStoreProducts(ctx *jxcontext.Context, vendorOrgCode string, parentTask tasksch.ITask, storeID int, skuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("jd SyncStoreProducts, storeID:%d", storeID)
|
||||
db := dao.GetDB()
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJD)
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJD, "")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
||||
order.StoreName = store.Name
|
||||
globals.SugarLogger.Debugf("jds GetStoreListByLocation, orderID: %v storeID :%v", order.VendorOrderID, order.StoreID)
|
||||
//结算类型
|
||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.StoreID, model.VendorIDJDShop)
|
||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.StoreID, model.VendorIDJDShop, "")
|
||||
if storeDetail != nil {
|
||||
if storeDetail.PayPercentage < 50 {
|
||||
order.EarningType = model.EarningTypePoints
|
||||
|
||||
@@ -38,7 +38,7 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
|
||||
|
||||
// stoerIDs为nil表示所有
|
||||
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
||||
store, err := dao.GetStoreDetail(db, storeID, model.VendorIDJDShop)
|
||||
store, err := dao.GetStoreDetail(db, storeID, model.VendorIDJDShop, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -77,7 +77,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName string) (vendorStoreID string, err error) {
|
||||
store, err := dao.GetStoreDetail(db, storeID, model.VendorIDJDShop)
|
||||
store, err := dao.GetStoreDetail(db, storeID, model.VendorIDJDShop, "")
|
||||
if err != nil {
|
||||
return vendorStoreID, err
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ func findDiscountCard(dicountCards []*model.DiscountCard, thingID int) (dicountC
|
||||
|
||||
func GetAvailableDeliverTime(ctx *jxcontext.Context, storeID int) (deliverTimerList []*DeliveryDayTimeInfo, err error) {
|
||||
db := dao.GetDB()
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX)
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -590,7 +590,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
||||
return nil, nil, fmt.Errorf("没有指定门店信息")
|
||||
}
|
||||
// 配送范围检查
|
||||
storeDetail, err := dao.GetStoreDetail(db, jxOrder.StoreID, model.VendorIDJX)
|
||||
storeDetail, err := dao.GetStoreDetail(db, jxOrder.StoreID, model.VendorIDJX, "")
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -874,7 +874,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
||||
//表示此订单为物料配送订单
|
||||
if jxOrder.OrderType != model.OrderTypeNormal {
|
||||
// if fromStoreID != 0 {
|
||||
storeDetail2, err2 := dao.GetStoreDetail(db, fromStoreID, model.VendorIDJX)
|
||||
storeDetail2, err2 := dao.GetStoreDetail(db, fromStoreID, model.VendorIDJX, "")
|
||||
if err = err2; err != nil {
|
||||
return nil, nil, fmt.Errorf("fromStoreID有误,[%v]", fromStoreID)
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
if db == nil {
|
||||
db = dao.GetDB()
|
||||
}
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDMTWM)
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDMTWM, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (skuNameList []*partner.SkuNameInfo, err error) {
|
||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDYB)
|
||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDYB, "")
|
||||
api.YinBaoAPI = yinbaoapi.New(storeDetail.YbAppKey, storeDetail.YbAppID)
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "yinbaoCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
yinbaoCookie := configs[0].Value
|
||||
|
||||
Reference in New Issue
Block a user