storedetail
This commit is contained in:
@@ -33,7 +33,7 @@ func (c *OrderManager) OnNewFakeJdOrder(vendorOrderID string) (err error) {
|
|||||||
|
|
||||||
func (c *OrderManager) notifyNewFakeJdOrder(order *model.GoodsOrder) (err error) {
|
func (c *OrderManager) notifyNewFakeJdOrder(order *model.GoodsOrder) (err error) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, order.VendorStoreID, model.VendorIDJD)
|
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, order.VendorStoreID, model.VendorIDJD, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ func (c *OrderManager) updateOrderOtherInfo(order *model.GoodsOrder, db *dao.Dao
|
|||||||
|
|
||||||
payPercentage := 0
|
payPercentage := 0
|
||||||
changePriceType := model.StoreChangePriceTypeDirect
|
changePriceType := model.StoreChangePriceTypeDirect
|
||||||
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, order.VendorStoreID, order.VendorID)
|
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, order.VendorStoreID, order.VendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !dao.IsNoRowsError(err) {
|
if !dao.IsNoRowsError(err) {
|
||||||
globals.SugarLogger.Warnf("updateOrderOtherInfo GetStoreDetailByVendorStoreID orderID:%s, VendorStoreID:%s, error:%v", order.VendorOrderID, order.VendorStoreID, err)
|
globals.SugarLogger.Warnf("updateOrderOtherInfo GetStoreDetailByVendorStoreID orderID:%s, VendorStoreID:%s, error:%v", order.VendorOrderID, order.VendorStoreID, err)
|
||||||
@@ -748,7 +748,7 @@ func (c *OrderManager) LoadStoreDetail(storeID, vendorID int) (storeDetail *dao.
|
|||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
storeDetail, err = dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err = dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
return storeDetail, err
|
return storeDetail, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,7 +983,7 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context,
|
|||||||
} else {
|
} else {
|
||||||
storeID = order.StoreID
|
storeID = order.StoreID
|
||||||
}
|
}
|
||||||
store, _ := dao.GetStoreDetail(db, storeID, order.VendorID)
|
store, _ := dao.GetStoreDetail(db, storeID, order.VendorID, "")
|
||||||
payPercentage := store.PayPercentage
|
payPercentage := store.PayPercentage
|
||||||
if payPercentage <= 50 {
|
if payPercentage <= 50 {
|
||||||
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100
|
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100
|
||||||
@@ -1296,7 +1296,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
|||||||
}
|
}
|
||||||
|
|
||||||
//结算类型
|
//结算类型
|
||||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.StoreID, model.VendorIDJDShop)
|
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.StoreID, model.VendorIDJDShop, "")
|
||||||
if storeDetail != nil {
|
if storeDetail != nil {
|
||||||
if storeDetail.PayPercentage < 50 {
|
if storeDetail.PayPercentage < 50 {
|
||||||
order.EarningType = model.EarningTypePoints
|
order.EarningType = model.EarningTypePoints
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ func (c *OrderManager) updateAfsOrderSkuOtherInfo(db *dao.DaoDB, order *model.Af
|
|||||||
func (c *OrderManager) updateAfsOrderOtherInfo(db *dao.DaoDB, afsOrder *model.AfsOrder) (err error) {
|
func (c *OrderManager) updateAfsOrderOtherInfo(db *dao.DaoDB, afsOrder *model.AfsOrder) (err error) {
|
||||||
globals.SugarLogger.Debugf("updateAfsOrderOtherInfo orderID:%s, VendorStoreID:%s", afsOrder.VendorOrderID, afsOrder.VendorStoreID)
|
globals.SugarLogger.Debugf("updateAfsOrderOtherInfo orderID:%s, VendorStoreID:%s", afsOrder.VendorOrderID, afsOrder.VendorStoreID)
|
||||||
if afsOrder.VendorStoreID != "" {
|
if afsOrder.VendorStoreID != "" {
|
||||||
if storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, afsOrder.VendorStoreID, 0); err == nil {
|
if storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, afsOrder.VendorStoreID, 0, ""); err == nil {
|
||||||
afsOrder.JxStoreID = storeDetail.Store.ID
|
afsOrder.JxStoreID = storeDetail.Store.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
err = nil
|
err = nil
|
||||||
isNewComment = true
|
isNewComment = true
|
||||||
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour {
|
if orderComment.IsReplied == 0 && time.Now().Sub(orderComment.CommentCreatedAt) < time.Duration(orderComment.ModifyDuration)*time.Hour {
|
||||||
if storeDetail, err2 := dao.GetStoreDetail(db, orderComment.StoreID, orderComment.VendorID); err2 == nil {
|
if storeDetail, err2 := dao.GetStoreDetail(db, orderComment.StoreID, orderComment.VendorID, ""); err2 == nil {
|
||||||
if storeDetail.AutoReplyType == model.AutoReplyAll ||
|
if storeDetail.AutoReplyType == model.AutoReplyAll ||
|
||||||
orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment {
|
orderComment.Score > JX_BAD_COMMENTS_MAX_LEVEL && storeDetail.AutoReplyType == model.AutoReplyGoodComment {
|
||||||
c.replyOrderComment(storeDetail.VendorOrgCode, orderComment)
|
c.replyOrderComment(storeDetail.VendorOrgCode, orderComment)
|
||||||
@@ -120,7 +120,7 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
orderComment.ConsigneeMobile = order.ConsigneeMobile
|
orderComment.ConsigneeMobile = order.ConsigneeMobile
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, orderComment.VendorStoreID, orderComment.VendorID); err == nil {
|
if storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, orderComment.VendorStoreID, orderComment.VendorID, ""); err == nil {
|
||||||
orderComment.StoreID = storeDetail.ID
|
orderComment.StoreID = storeDetail.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1079,7 +1079,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in
|
|||||||
vendorStoreIDMap := make(map[int]string)
|
vendorStoreIDMap := make(map[int]string)
|
||||||
if storeID > 0 {
|
if storeID > 0 {
|
||||||
for _, vendorID := range vendorIDs {
|
for _, vendorID := range vendorIDs {
|
||||||
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err = err2; err != nil {
|
if err = err2; err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ func (c *BaseScheduler) AgreeOrRefuseRefund(ctx *jxcontext.Context, afsOrderID s
|
|||||||
for _, sku := range order.Skus {
|
for _, sku := range order.Skus {
|
||||||
skuMap[sku.SkuID] = sku
|
skuMap[sku.SkuID] = sku
|
||||||
}
|
}
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
waybills, _ := dao.GetWaybills(db, order.VendorOrderID)
|
waybills, _ := dao.GetWaybills(db, order.VendorOrderID)
|
||||||
//京东商城和京西要重新算totalshopmoney等
|
//京东商城和京西要重新算totalshopmoney等
|
||||||
if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
||||||
@@ -311,7 +311,7 @@ func (c *BaseScheduler) SetOrderWaybillTipByOrder(ctx *jxcontext.Context, order
|
|||||||
}
|
}
|
||||||
|
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err2 := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err2 := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err = err2; err != nil {
|
if err = err2; err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ func (s *WatchOrderInfo) updateOrderStoreFeature(order *model.GoodsOrder) (err e
|
|||||||
jxStoreID := jxutils.GetSaleStoreIDFromOrder(order)
|
jxStoreID := jxutils.GetSaleStoreIDFromOrder(order)
|
||||||
if jxStoreID > 0 {
|
if jxStoreID > 0 {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err2 := dao.GetStoreDetail(db, jxStoreID, order.VendorID)
|
storeDetail, err2 := dao.GetStoreDetail(db, jxStoreID, order.VendorID, "")
|
||||||
if err = err2; err != nil {
|
if err = err2; err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ func init() {
|
|||||||
},
|
},
|
||||||
TimeoutAction: func(savedOrderInfo *WatchOrderInfo, bill *model.Waybill) (err error) {
|
TimeoutAction: func(savedOrderInfo *WatchOrderInfo, bill *model.Waybill) (err error) {
|
||||||
order := savedOrderInfo.order
|
order := savedOrderInfo.order
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
savedOrderInfo.storeDetail = storeDetail
|
savedOrderInfo.storeDetail = storeDetail
|
||||||
}
|
}
|
||||||
@@ -538,7 +538,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
|||||||
}
|
}
|
||||||
if needAddTip {
|
if needAddTip {
|
||||||
if handler := partner.GetWaybillTipUpdater(bill.WaybillVendorID); handler != nil {
|
if handler := partner.GetWaybillTipUpdater(bill.WaybillVendorID); handler != nil {
|
||||||
if storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID); err2 == nil {
|
if storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, ""); err2 == nil {
|
||||||
handler.UpdateWaybillTip(jxcontext.AdminCtx, order.VendorOrgCode, order.VendorStoreID, order.VendorOrderID, bill.VendorWaybillID, bill.VendorWaybillID2, utils.Int2Str(storeDetail.CityCode), order.WaybillTipMoney)
|
handler.UpdateWaybillTip(jxcontext.AdminCtx, order.VendorOrgCode, order.VendorStoreID, order.VendorOrderID, bill.VendorWaybillID, bill.VendorWaybillID2, utils.Int2Str(storeDetail.CityCode), order.WaybillTipMoney)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1483,7 +1483,7 @@ func OnDefSchConfChanged(key, value string) {
|
|||||||
|
|
||||||
func setFakeActualPayPrice(order *model.GoodsOrder) (newOrder *model.GoodsOrder) {
|
func setFakeActualPayPrice(order *model.GoodsOrder) (newOrder *model.GoodsOrder) {
|
||||||
orderCopy := *order
|
orderCopy := *order
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if storeDetail.PayPercentage < 50 {
|
if storeDetail.PayPercentage < 50 {
|
||||||
orderCopy.ActualPayPrice = order.TotalShopMoney * (100 - int64(storeDetail.PayPercentage/2)) / 100
|
orderCopy.ActualPayPrice = order.TotalShopMoney * (100 - int64(storeDetail.PayPercentage/2)) / 100
|
||||||
@@ -1563,7 +1563,7 @@ func OrderProfitWarning(order *model.GoodsOrder) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
storeID := jxutils.GetShowStoreIDFromOrder(order)
|
storeID := jxutils.GetShowStoreIDFromOrder(order)
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, order.VendorID, "")
|
||||||
if storeDetail != nil && err == nil {
|
if storeDetail != nil && err == nil {
|
||||||
payPercentage := storeDetail.PayPercentage
|
payPercentage := storeDetail.PayPercentage
|
||||||
if beego.BConfig.RunMode == "jxgy" {
|
if beego.BConfig.RunMode == "jxgy" {
|
||||||
@@ -1624,7 +1624,7 @@ func (s *DefScheduler) notifyOrderStakeHolder(order *model.GoodsOrder, msgTitle,
|
|||||||
// "18180948107",
|
// "18180948107",
|
||||||
}
|
}
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
operatorPhone, _ := getOrderOperatorInfo(order, storeDetail)
|
operatorPhone, _ := getOrderOperatorInfo(order, storeDetail)
|
||||||
if operatorPhone != "" {
|
if operatorPhone != "" {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
if model.IsOrderDeliveryByStore(order) {
|
if model.IsOrderDeliveryByStore(order) {
|
||||||
if order.Status < model.OrderStatusDelivering {
|
if order.Status < model.OrderStatusDelivering {
|
||||||
storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), order.StoreID, order.VendorID)
|
storeDetail, err2 := dao.GetStoreDetail(dao.GetDB(), order.StoreID, order.VendorID, "")
|
||||||
phone := userName
|
phone := userName
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
phone = storeDetail.Tel1
|
phone = storeDetail.Tel1
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
|||||||
validVendorMap := make(map[int]int)
|
validVendorMap := make(map[int]int)
|
||||||
validSkuMap := make(map[int]int)
|
validSkuMap := make(map[int]int)
|
||||||
for _, vendorID := range vendorIDs {
|
for _, vendorID := range vendorIDs {
|
||||||
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
if storeDetail.IsSync != 0 {
|
if storeDetail.IsSync != 0 {
|
||||||
if act.Type == model.ActSkuFake ||
|
if act.Type == model.ActSkuFake ||
|
||||||
@@ -1231,7 +1231,7 @@ func ForceUpdateVendorPrice(ctx *jxcontext.Context, vendorID int, actType int, s
|
|||||||
for _, storeSkuBind := range storeSkuBindList {
|
for _, storeSkuBind := range storeSkuBindList {
|
||||||
if _, err2 := dao.UpdateEntity(db, storeSkuBind); err2 == nil {
|
if _, err2 := dao.UpdateEntity(db, storeSkuBind); err2 == nil {
|
||||||
if storeVendorIDMap[storeSkuBind.StoreID] == "" {
|
if storeVendorIDMap[storeSkuBind.StoreID] == "" {
|
||||||
if storeDetail, err2 := dao.GetStoreDetail(db, storeSkuBind.StoreID, vendorID); err2 == nil {
|
if storeDetail, err2 := dao.GetStoreDetail(db, storeSkuBind.StoreID, vendorID, ""); err2 == nil {
|
||||||
storeVendorIDMap[storeSkuBind.StoreID] = storeDetail.VendorStoreID
|
storeVendorIDMap[storeSkuBind.StoreID] = storeDetail.VendorStoreID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1682,5 +1682,3 @@ func checkPriceDefendOrderByPrice(db *dao.DaoDB, storeID, skuID, stock, jxPrice
|
|||||||
}
|
}
|
||||||
return stock
|
return stock
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1373,7 +1373,7 @@ func refreshStoreSkuPrice(ctx *jxcontext.Context, db *dao.DaoDB, skuID int) (err
|
|||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
v := batchItemList[0].(*dao.StoreSkuAndName)
|
v := batchItemList[0].(*dao.StoreSkuAndName)
|
||||||
storeID := v.StoreID
|
storeID := v.StoreID
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJX)
|
storeDetail, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJX, "")
|
||||||
if storeDetail == nil {
|
if storeDetail == nil {
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1168,7 +1168,7 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
|||||||
} else {
|
} else {
|
||||||
err = ErrCanNotFindVendor
|
err = ErrCanNotFindVendor
|
||||||
}
|
}
|
||||||
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID)
|
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(db, storeMap.VendorStoreID, storeMap.VendorID, "")
|
||||||
if storeDetail != nil {
|
if storeDetail != nil {
|
||||||
return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID)
|
return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID)
|
||||||
}
|
}
|
||||||
@@ -2214,7 +2214,7 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p
|
|||||||
userMap := make(map[string]map[int]int)
|
userMap := make(map[string]map[int]int)
|
||||||
userMapTxt := make(map[string][]*model.VendorStoreSnapshot)
|
userMapTxt := make(map[string][]*model.VendorStoreSnapshot)
|
||||||
for storeID, list := range alarmSnapshotMap {
|
for storeID, list := range alarmSnapshotMap {
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, storeID, list[0].VendorID)
|
storeDetail, _ := dao.GetStoreDetail(db, storeID, list[0].VendorID, "")
|
||||||
if storeDetail != nil {
|
if storeDetail != nil {
|
||||||
storeDetailMap[storeID] = storeDetail
|
storeDetailMap[storeID] = storeDetail
|
||||||
userList := getAllUsers4Store(ctx, db, &storeDetail.Store)
|
userList := getAllUsers4Store(ctx, db, &storeDetail.Store)
|
||||||
@@ -2496,7 +2496,7 @@ func SyncStoresQualify(ctx *jxcontext.Context, storeIDs []int, isAsync, isContin
|
|||||||
vendorID := model.VendorIDJD
|
vendorID := model.VendorIDJD
|
||||||
if handler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IStoreSyncQualifyHandler); handler != nil {
|
if handler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IStoreSyncQualifyHandler); handler != nil {
|
||||||
storeID := batchItemList[0].(int)
|
storeID := batchItemList[0].(int)
|
||||||
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err2 := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
if err = handler.SyncQualify(ctx, storeDetail); err == nil {
|
if err = handler.SyncQualify(ctx, storeDetail); err == nil {
|
||||||
retVal = []int{1}
|
retVal = []int{1}
|
||||||
@@ -2536,7 +2536,7 @@ func JdStoreInfoCoordinateRecover(ctx *jxcontext.Context, vendorOrgCode string,
|
|||||||
if v.Status != model.StoreStatusDisabled && v.CreatedAt.Sub(utils.Str2Time("2019-10-01")) > 0 {
|
if v.Status != model.StoreStatusDisabled && v.CreatedAt.Sub(utils.Str2Time("2019-10-01")) > 0 {
|
||||||
storeInfo, err := jd.GetAPI(vendorOrgCode).GetStoreInfoByStationNo2(v.VendorStoreID)
|
storeInfo, err := jd.GetAPI(vendorOrgCode).GetStoreInfoByStationNo2(v.VendorStoreID)
|
||||||
if err == nil && storeInfo.CreateTime.GoTime().Sub(utils.Str2Time("2019-10-25")) > 0 {
|
if err == nil && storeInfo.CreateTime.GoTime().Sub(utils.Str2Time("2019-10-25")) > 0 {
|
||||||
if storeDetail, err := dao.GetStoreDetail(db, v.StoreID, v.VendorID); err == nil {
|
if storeDetail, err := dao.GetStoreDetail(db, v.StoreID, v.VendorID, ""); err == nil {
|
||||||
validStoreList = append(validStoreList, storeDetail)
|
validStoreList = append(validStoreList, storeDetail)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2638,7 +2638,7 @@ func GetVendorStoreInfo(ctx *jxcontext.Context, vendorIDList []int, isAsync, isC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail2, err := dao.GetStoreDetailByVendorStoreID(db, storeDetail.VendorStoreID, vendorID)
|
storeDetail2, err := dao.GetStoreDetailByVendorStoreID(db, storeDetail.VendorStoreID, vendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -3406,7 +3406,7 @@ func UpdateStorePricePack(ctx *jxcontext.Context, storeID, vendorID int, pricePa
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, _ := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if storeDetail.PayPercentage > 50 {
|
if storeDetail.PayPercentage > 50 {
|
||||||
return fmt.Errorf("目前只允许扣点的门店修改调价包!")
|
return fmt.Errorf("目前只允许扣点的门店修改调价包!")
|
||||||
}
|
}
|
||||||
@@ -3519,7 +3519,7 @@ func GetJdDeliveryArea(ctx *jxcontext.Context, storeIDs []int) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, v := range ss {
|
for _, v := range ss {
|
||||||
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), v.JdID, model.VendorIDJD)
|
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), v.JdID, model.VendorIDJD, "")
|
||||||
place, _ := dao.GetPlaceByCode(dao.GetDB(), storeDetail.CityCode)
|
place, _ := dao.GetPlaceByCode(dao.GetDB(), storeDetail.CityCode)
|
||||||
specialtyStoreSku := &SpecialtyStoreSkus{
|
specialtyStoreSku := &SpecialtyStoreSkus{
|
||||||
StoreID: storeDetail.ID,
|
StoreID: storeDetail.ID,
|
||||||
|
|||||||
@@ -1077,7 +1077,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
|||||||
}()
|
}()
|
||||||
for _, storeID := range storeIDs {
|
for _, storeID := range storeIDs {
|
||||||
// todo 可以考虑在需要更新价格再获取
|
// todo 可以考虑在需要更新价格再获取
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDJX)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDJX, "")
|
||||||
if err != nil || storeDetail == nil {
|
if err != nil || storeDetail == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -2290,7 +2290,7 @@ func RefreshStoresSkuByVendor(ctx *jxcontext.Context, storeIDs []int, vendorID i
|
|||||||
if v.VendorID != vendorID {
|
if v.VendorID != vendorID {
|
||||||
return "", fmt.Errorf("门店%d绑定的不(只)是京东", v.StoreID)
|
return "", fmt.Errorf("门店%d绑定的不(只)是京东", v.StoreID)
|
||||||
}
|
}
|
||||||
storeMap[v.StoreID], err = dao.GetStoreDetail(db, v.StoreID, v.VendorID)
|
storeMap[v.StoreID], err = dao.GetStoreDetail(db, v.StoreID, v.VendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -2522,7 +2522,7 @@ func ReCalculateJxPrice(db *dao.DaoDB, ctx *jxcontext.Context, storeIDs []int) (
|
|||||||
task := tasksch.NewParallelTask("刷新京西平台价格", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
task := tasksch.NewParallelTask("刷新京西平台价格", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
storeID := batchItemList[0].(int)
|
storeID := batchItemList[0].(int)
|
||||||
if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX); err == nil {
|
if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX, ""); err == nil {
|
||||||
if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil {
|
if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil {
|
||||||
for _, skuBind := range storeSkuList {
|
for _, skuBind := range storeSkuList {
|
||||||
skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price)
|
skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price)
|
||||||
@@ -2543,7 +2543,7 @@ func ReCalculateJxPrice(db *dao.DaoDB, ctx *jxcontext.Context, storeIDs []int) (
|
|||||||
|
|
||||||
func ReCalculateJxPriceLight(db *dao.DaoDB, ctx *jxcontext.Context, storeID int) (err error) {
|
func ReCalculateJxPriceLight(db *dao.DaoDB, ctx *jxcontext.Context, storeID int) (err error) {
|
||||||
if storeID != 0 {
|
if storeID != 0 {
|
||||||
if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX); err == nil {
|
if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX, ""); err == nil {
|
||||||
if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil {
|
if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil {
|
||||||
for _, skuBind := range storeSkuList {
|
for _, skuBind := range storeSkuList {
|
||||||
skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price)
|
skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price)
|
||||||
@@ -2635,7 +2635,7 @@ func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNam
|
|||||||
for _, v := range skuNameList {
|
for _, v := range skuNameList {
|
||||||
skuNameMap[v.ID] = v
|
skuNameMap[v.ID] = v
|
||||||
}
|
}
|
||||||
store, err := dao.GetStoreDetail(db, storeID, -1)
|
store, err := dao.GetStoreDetail(db, storeID, -1, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -2752,7 +2752,7 @@ func RefershStoreSkusMidPrice(ctx *jxcontext.Context, storeIDs []int, isCountry
|
|||||||
}
|
}
|
||||||
for _, v := range storeIDs {
|
for _, v := range storeIDs {
|
||||||
var skuBindInfos []*StoreSkuBindInfo
|
var skuBindInfos []*StoreSkuBindInfo
|
||||||
store, err := dao.GetStoreDetail(db, v, -1)
|
store, err := dao.GetStoreDetail(db, v, -1, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -3124,7 +3124,7 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int,
|
|||||||
inStoreSku.SkuID = skuID
|
inStoreSku.SkuID = skuID
|
||||||
}
|
}
|
||||||
inStoreSkuList = append(inStoreSkuList, inStoreSku)
|
inStoreSkuList = append(inStoreSkuList, inStoreSku)
|
||||||
storeDetail2, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID)
|
storeDetail2, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID, "")
|
||||||
if storeDetail2 != nil {
|
if storeDetail2 != nil {
|
||||||
outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, storeDetail2.ID, vendorStoreID, inStoreSkuList)
|
outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, storeDetail2.ID, vendorStoreID, inStoreSkuList)
|
||||||
} else {
|
} else {
|
||||||
@@ -3375,7 +3375,7 @@ func FocusStoreSkusBySku(ctx *jxcontext.Context, skuBindInfos []*StoreSkuBindInf
|
|||||||
skuBindInfo := batchItemList[0].(*StoreSkuBindInfo)
|
skuBindInfo := batchItemList[0].(*StoreSkuBindInfo)
|
||||||
storeID := skuBindInfo.StoreID
|
storeID := skuBindInfo.StoreID
|
||||||
skuID := skuBindInfo.Skus[0].SkuID
|
skuID := skuBindInfo.Skus[0].SkuID
|
||||||
store, err := dao.GetStoreDetail(db, storeID, -1)
|
store, err := dao.GetStoreDetail(db, storeID, -1, "")
|
||||||
if len(skuBindInfos) > 1 {
|
if len(skuBindInfos) > 1 {
|
||||||
if store.StoreLevel == "D" || store.StoreLevel == "E" {
|
if store.StoreLevel == "D" || store.StoreLevel == "E" {
|
||||||
return retVal, err
|
return retVal, err
|
||||||
@@ -3665,7 +3665,7 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
|
|||||||
results[len(results)-i-1] = tmp
|
results[len(results)-i-1] = tmp
|
||||||
}
|
}
|
||||||
for _, v := range results {
|
for _, v := range results {
|
||||||
store, err := dao.GetStoreDetail(db, v.StoreID, model.VendorIDMTWM)
|
store, err := dao.GetStoreDetail(db, v.StoreID, model.VendorIDMTWM, "")
|
||||||
if err != nil || store == nil {
|
if err != nil || store == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -3775,7 +3775,7 @@ func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if type1 < type1Count || type2 < type2Count {
|
if type1 < type1Count || type2 < type2Count {
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, store.StoreID, store.VendorID)
|
storeDetail, _ := dao.GetStoreDetail(db, store.StoreID, store.VendorID, "")
|
||||||
var (
|
var (
|
||||||
type1Str = "爆品数量低于8个!"
|
type1Str = "爆品数量低于8个!"
|
||||||
type2Str = "爆品价格小于1元的爆品数量低于5个!"
|
type2Str = "爆品价格小于1元的爆品数量低于5个!"
|
||||||
@@ -3895,7 +3895,7 @@ func RefreshJxPriceByVendor(ctx *jxcontext.Context, jdStoreSkus []*JdStoreSkus,
|
|||||||
} else {
|
} else {
|
||||||
return result, fmt.Errorf("没有找到该京东skuID对应的京西skuID!,京东skuID :[%v]", v.JdSkuID)
|
return result, fmt.Errorf("没有找到该京东skuID对应的京西skuID!,京东skuID :[%v]", v.JdSkuID)
|
||||||
}
|
}
|
||||||
store, err := dao.GetStoreDetailByVendorStoreID(db, utils.Int2Str(v.JdStoreID), vendorID)
|
store, err := dao.GetStoreDetailByVendorStoreID(db, utils.Int2Str(v.JdStoreID), vendorID, "")
|
||||||
if err != nil || store == nil {
|
if err != nil || store == nil {
|
||||||
return result, fmt.Errorf("没有找到该京东门店对应的京西门店!,京东门店ID :[%v]", v.JdStoreID)
|
return result, fmt.Errorf("没有找到该京东门店对应的京西门店!,京东门店ID :[%v]", v.JdStoreID)
|
||||||
}
|
}
|
||||||
@@ -3967,7 +3967,7 @@ func RefreshJxPriceByVendor(ctx *jxcontext.Context, jdStoreSkus []*JdStoreSkus,
|
|||||||
if len(skus) == 0 {
|
if len(skus) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
store, _ := dao.GetStoreDetail(db, v.JdStoreID, vendorID)
|
store, _ := dao.GetStoreDetail(db, v.JdStoreID, vendorID, "")
|
||||||
err = jxutils.Strings2Objs(store.PricePercentagePackStr, &pricePercentagePack)
|
err = jxutils.Strings2Objs(store.PricePercentagePackStr, &pricePercentagePack)
|
||||||
if skus[0].Unit == model.SpecialUnit {
|
if skus[0].Unit == model.SpecialUnit {
|
||||||
if skus[0].SpecUnit == model.SpecUnitNames[1] || skus[0].SpecUnit == model.SpecUnitNames[2] {
|
if skus[0].SpecUnit == model.SpecUnitNames[1] || skus[0].SpecUnit == model.SpecUnitNames[2] {
|
||||||
@@ -4055,7 +4055,7 @@ func RefreshJxPriceByVendor2(ctx *jxcontext.Context, storeIDs []int, vendorID in
|
|||||||
pricePercentagePack []*model.PricePercentageItem
|
pricePercentagePack []*model.PricePercentageItem
|
||||||
skuNameMap = make(map[int]int64)
|
skuNameMap = make(map[int]int64)
|
||||||
)
|
)
|
||||||
storeDetail, _ := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, _ := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
err = jxutils.Strings2Objs(storeDetail.PricePercentagePackStr, &pricePercentagePack)
|
err = jxutils.Strings2Objs(storeDetail.PricePercentagePackStr, &pricePercentagePack)
|
||||||
if partner.IsMultiStore(vendorID) {
|
if partner.IsMultiStore(vendorID) {
|
||||||
mulitStoreSkuHandler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IPurchasePlatformStoreSkuHandler)
|
mulitStoreSkuHandler := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IPurchasePlatformStoreSkuHandler)
|
||||||
@@ -4312,7 +4312,7 @@ func buildStoreSkuBindInfosAndFocus(ctx *jxcontext.Context, db *dao.DaoDB, store
|
|||||||
skus, _ := dao.GetSkus(db, nil, []int{nameID}, nil, nil, nil)
|
skus, _ := dao.GetSkus(db, nil, []int{nameID}, nil, nil, nil)
|
||||||
err = jxutils.Strings2Objs(store.PricePercentagePackStr, &pricePercentagePack)
|
err = jxutils.Strings2Objs(store.PricePercentagePackStr, &pricePercentagePack)
|
||||||
price := jxutils.CaculateJxPriceByPricePack(pricePercentagePack, 0, int(v.SkuList[0].VendorPrice))
|
price := jxutils.CaculateJxPriceByPricePack(pricePercentagePack, 0, int(v.SkuList[0].VendorPrice))
|
||||||
store2, _ := dao.GetStoreDetail(db, store.ID, model.VendorIDJX)
|
store2, _ := dao.GetStoreDetail(db, store.ID, model.VendorIDJX, "")
|
||||||
if store2 != nil {
|
if store2 != nil {
|
||||||
err = jxutils.Strings2Objs(store2.PricePercentagePackStr, &pricePercentagePack2)
|
err = jxutils.Strings2Objs(store2.PricePercentagePackStr, &pricePercentagePack2)
|
||||||
jxPrice = jxutils.CaculatePriceByPricePack(pricePercentagePack2, 0, price)
|
jxPrice = jxutils.CaculatePriceByPricePack(pricePercentagePack2, 0, price)
|
||||||
@@ -4950,7 +4950,7 @@ func GetSpecialtyStoreSkus(ctx *jxcontext.Context, storeIDs, vendorIDs []int) (e
|
|||||||
)
|
)
|
||||||
for _, v := range vendorIDs {
|
for _, v := range vendorIDs {
|
||||||
for _, vv := range storeIDs {
|
for _, vv := range storeIDs {
|
||||||
storeDetail, err := dao.GetStoreDetail(db, vv, v)
|
storeDetail, err := dao.GetStoreDetail(db, vv, v, "")
|
||||||
if err != nil || storeDetail == nil {
|
if err != nil || storeDetail == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1337,7 +1337,7 @@ func WriteToExcel(task *tasksch.SeqTask, data map[int][]DiffData, depotData map[
|
|||||||
|
|
||||||
func SetJxPrice(jxSkuInfoDataMulti *dao.StoreSkuNamesInfo, storeId int, vendorid int) (err error) {
|
func SetJxPrice(jxSkuInfoDataMulti *dao.StoreSkuNamesInfo, storeId int, vendorid int) (err error) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, vendorid)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeId, vendorid, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
|
|||||||
return err
|
return err
|
||||||
globals.SugarLogger.Debugf("OnStoreStatusChanged venvendorStoreID:%s, storeStatus:%d", vendorStoreID, storeStatus)
|
globals.SugarLogger.Debugf("OnStoreStatusChanged venvendorStoreID:%s, storeStatus:%d", vendorStoreID, storeStatus)
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID)
|
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
var storeKV, storeMapKV map[string]interface{}
|
var storeKV, storeMapKV map[string]interface{}
|
||||||
if storeStatus == model.StoreStatusOpened {
|
if storeStatus == model.StoreStatusOpened {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ func OpenRemoteStoreByJxStatus(ctx *jxcontext.Context, vendorIDs, storeIDs []int
|
|||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
storeMap := batchItemList[0].(*model.StoreMap)
|
storeMap := batchItemList[0].(*model.StoreMap)
|
||||||
if handler, _ := partner.GetPurchasePlatformFromVendorID(storeMap.VendorID).(partner.IStoreHandler); handler != nil {
|
if handler, _ := partner.GetPurchasePlatformFromVendorID(storeMap.VendorID).(partner.IStoreHandler); handler != nil {
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeMap.StoreID, storeMap.VendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeMap.StoreID, storeMap.VendorID, "")
|
||||||
if err == nil && storeDetail.Status == model.StoreStatusOpened {
|
if err == nil && storeDetail.Status == model.StoreStatusOpened {
|
||||||
if err = handler.UpdateStoreStatus(ctx, storeMap.VendorOrgCode, storeMap.StoreID, storeMap.VendorStoreID, model.StoreStatusOpened); err == nil {
|
if err = handler.UpdateStoreStatus(ctx, storeMap.VendorOrgCode, storeMap.StoreID, storeMap.VendorStoreID, model.StoreStatusOpened); err == nil {
|
||||||
storeMap.Status = model.StoreStatusOpened
|
storeMap.Status = model.StoreStatusOpened
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ func isSkuLockTimeValid(sku *dao.StoreSkuSyncInfo) bool {
|
|||||||
func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, isFull bool, vendorID, storeID int, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isContinueWhenError bool) (err error) {
|
func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, isFull bool, vendorID, storeID int, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isContinueWhenError bool) (err error) {
|
||||||
globals.SugarLogger.Debugf("syncStoreSkuNew causeFlag:%d", causeFlag)
|
globals.SugarLogger.Debugf("syncStoreSkuNew causeFlag:%d", causeFlag)
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -901,7 +901,7 @@ func amendAndPruneStoreStuff(ctx *jxcontext.Context, parentTask tasksch.ITask, v
|
|||||||
return "", fmt.Errorf("平台:%s不支持此操作", model.VendorChineseNames[vendorID])
|
return "", fmt.Errorf("平台:%s不支持此操作", model.VendorChineseNames[vendorID])
|
||||||
}
|
}
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -1357,7 +1357,7 @@ func SyncStoreSkuBindAct(ctx *jxcontext.Context, parentTask tasksch.ITask, isCre
|
|||||||
subTask := tasksch.NewParallelTask(fmt.Sprintf("%s门店:%d", taskName, storeID), nil, ctx,
|
subTask := tasksch.NewParallelTask(fmt.Sprintf("%s门店:%d", taskName, storeID), nil, ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
vendorID := batchItemList[0].(int)
|
vendorID := batchItemList[0].(int)
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if isCreate {
|
if isCreate {
|
||||||
err = createStoreSkuActs2(ctx, task, vendorID, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, storeSkuMap[storeID][vendorID], storeSkuActMap[storeID][vendorID])
|
err = createStoreSkuActs2(ctx, task, vendorID, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, storeSkuMap[storeID][vendorID], storeSkuActMap[storeID][vendorID])
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ func getStoreSkus(db *dao.DaoDB, storeID int, skuIDs []int) (skus []*dao.StoreSk
|
|||||||
func SyncStoreSku4FakeJD(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inSkuMap map[int]string, isContinueWhenError bool) (err error) {
|
func SyncStoreSku4FakeJD(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inSkuMap map[int]string, isContinueWhenError bool) (err error) {
|
||||||
vendorID := model.VendorIDJD
|
vendorID := model.VendorIDJD
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ func GetNearSupplyGoodsStoreByStoreID(ctx *jxcontext.Context, storeID int) (stor
|
|||||||
stores []*model.Store
|
stores []*model.Store
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
store2, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJX)
|
store2, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJX, "")
|
||||||
if store2 == nil {
|
if store2 == nil {
|
||||||
return nil, fmt.Errorf("该门店未绑定京西平台!storeID: %v", storeID)
|
return nil, fmt.Errorf("该门店未绑定京西平台!storeID: %v", storeID)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1243,7 +1243,7 @@ func JdStoreInfo1125() (hint string, err error) {
|
|||||||
if v.Status != model.StoreStatusDisabled && v.CreatedAt.Sub(utils.Str2Time("2019-10-01")) > 0 {
|
if v.Status != model.StoreStatusDisabled && v.CreatedAt.Sub(utils.Str2Time("2019-10-01")) > 0 {
|
||||||
storeInfo, err := api.JdAPI.GetStoreInfoByStationNo2(v.VendorStoreID)
|
storeInfo, err := api.JdAPI.GetStoreInfoByStationNo2(v.VendorStoreID)
|
||||||
if err == nil && storeInfo.CreateTime.GoTime().Sub(utils.Str2Time("2019-10-25")) > 0 {
|
if err == nil && storeInfo.CreateTime.GoTime().Sub(utils.Str2Time("2019-10-25")) > 0 {
|
||||||
if storeDetail, err := dao.GetStoreDetail(db, v.StoreID, v.VendorID); err == nil {
|
if storeDetail, err := dao.GetStoreDetail(db, v.StoreID, v.VendorID, ""); err == nil {
|
||||||
validStoreList = append(validStoreList, storeDetail)
|
validStoreList = append(validStoreList, storeDetail)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ func getOrderDetailBrief(order *model.GoodsOrder) (brief string) {
|
|||||||
if order.EarningType == model.EarningTypePoints {
|
if order.EarningType == model.EarningTypePoints {
|
||||||
price = order.ActualPayPrice
|
price = order.ActualPayPrice
|
||||||
} else {
|
} else {
|
||||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if storeDetail.CityCode == 510100 {
|
if storeDetail.CityCode == 510100 {
|
||||||
price = order.ActualPayPrice
|
price = order.ActualPayPrice
|
||||||
} else {
|
} else {
|
||||||
@@ -208,7 +208,7 @@ func NotifyNewOrder(order *model.GoodsOrder) (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
suffix := ""
|
suffix := ""
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err == nil && storeDetail != nil {
|
if err == nil && storeDetail != nil {
|
||||||
suffix = storeDetail.CityName + "," + storeDetail.Name
|
suffix = storeDetail.CityName + "," + storeDetail.Name
|
||||||
}
|
}
|
||||||
@@ -325,7 +325,7 @@ func NotifyUserApplyCancel(order *model.GoodsOrder, cancelReason string) (err er
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
suffix := ""
|
suffix := ""
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err == nil && storeDetail != nil {
|
if err == nil && storeDetail != nil {
|
||||||
suffix = storeDetail.CityName + "," + storeDetail.Name
|
suffix = storeDetail.CityName + "," + storeDetail.Name
|
||||||
}
|
}
|
||||||
@@ -407,7 +407,7 @@ func NotifyOrderCanceled(order *model.GoodsOrder) (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
suffix := ""
|
suffix := ""
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err == nil && storeDetail != nil {
|
if err == nil && storeDetail != nil {
|
||||||
suffix = storeDetail.CityName + "," + storeDetail.Name
|
suffix = storeDetail.CityName + "," + storeDetail.Name
|
||||||
}
|
}
|
||||||
@@ -447,7 +447,7 @@ func NotifyOrderCanceled(order *model.GoodsOrder) (err error) {
|
|||||||
func PushJDBadCommentToWeiXin(comment *legacymodel.JxBadComments, isBadComment bool, order *model.GoodsOrder) (err error) {
|
func PushJDBadCommentToWeiXin(comment *legacymodel.JxBadComments, isBadComment bool, order *model.GoodsOrder) (err error) {
|
||||||
globals.SugarLogger.Debugf("PushJDBadCommentToWeiXin orderID:%s", comment.OrderId)
|
globals.SugarLogger.Debugf("PushJDBadCommentToWeiXin orderID:%s", comment.OrderId)
|
||||||
suffix := ""
|
suffix := ""
|
||||||
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, "")
|
||||||
if err == nil && storeDetail != nil {
|
if err == nil && storeDetail != nil {
|
||||||
suffix = storeDetail.CityName + "," + storeDetail.Name
|
suffix = storeDetail.CityName + "," + storeDetail.Name
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ func (s *StoreDetail) GetPricePerentage(price int) (pricePercentage int) {
|
|||||||
return pricePercentage
|
return pricePercentage
|
||||||
}
|
}
|
||||||
|
|
||||||
func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (storeDetail *StoreDetail, err error) {
|
func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID, vendorOrgCode string) (storeDetail *StoreDetail, err error) {
|
||||||
sql := `
|
sql := `
|
||||||
SELECT t1.*,
|
SELECT t1.*,
|
||||||
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee_deduction_sill, t2.delivery_fee_deduction_fee, t2.sync_status, t2.vendor_org_code,
|
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee_deduction_sill, t2.delivery_fee_deduction_fee, t2.sync_status, t2.vendor_org_code,
|
||||||
@@ -145,6 +145,13 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
|
|||||||
sql += " AND t2.vendor_store_id = ?"
|
sql += " AND t2.vendor_store_id = ?"
|
||||||
sqlParams = append(sqlParams, vendorStoreID)
|
sqlParams = append(sqlParams, vendorStoreID)
|
||||||
}
|
}
|
||||||
|
if vendorOrgCode != "" {
|
||||||
|
sql += " AND t2.vendor_org_code = ?"
|
||||||
|
sqlParams = append(sqlParams, vendorOrgCode)
|
||||||
|
}
|
||||||
|
if vendorID == model.VendorIDJDShop && vendorOrgCode == "" {
|
||||||
|
sql += " AND t2.vendor_org_code = 1"
|
||||||
|
}
|
||||||
if err = GetRow(db, &storeDetail, sql, sqlParams...); err == nil {
|
if err = GetRow(db, &storeDetail, sql, sqlParams...); err == nil {
|
||||||
storeDetail.PricePercentagePackObj = PricePercentagePack2Obj(storeDetail.PricePercentagePackStr)
|
storeDetail.PricePercentagePackObj = PricePercentagePack2Obj(storeDetail.PricePercentagePackStr)
|
||||||
storeDetail.FreightDeductionPackObj = FreightDeductionPack2Obj(storeDetail.FreightDeductionPackStr)
|
storeDetail.FreightDeductionPackObj = FreightDeductionPack2Obj(storeDetail.FreightDeductionPackStr)
|
||||||
@@ -163,15 +170,15 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreDetail(db *DaoDB, storeID, vendorID int) (storeDetail *StoreDetail, err error) {
|
func GetStoreDetail(db *DaoDB, storeID, vendorID int, vendorOrgCode string) (storeDetail *StoreDetail, err error) {
|
||||||
return getStoreDetail(db, storeID, vendorID, "")
|
return getStoreDetail(db, storeID, vendorID, "", vendorOrgCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStoreDetailByVendorStoreID(db *DaoDB, vendorStoreID string, vendorID int) (storeDetail *StoreDetail, err error) {
|
func GetStoreDetailByVendorStoreID(db *DaoDB, vendorStoreID string, vendorID int, vendorOrgCode string) (storeDetail *StoreDetail, err error) {
|
||||||
if vendorID != model.VendorIDJX {
|
if vendorID != model.VendorIDJX {
|
||||||
return getStoreDetail(db, 0, vendorID, vendorStoreID)
|
return getStoreDetail(db, 0, vendorID, vendorStoreID, vendorOrgCode)
|
||||||
}
|
}
|
||||||
if storeDetail, err = getStoreDetail(db, int(utils.Str2Int64WithDefault(vendorStoreID, 0)), vendorID, ""); err == nil {
|
if storeDetail, err = getStoreDetail(db, int(utils.Str2Int64WithDefault(vendorStoreID, 0)), vendorID, "", vendorOrgCode); err == nil {
|
||||||
storeDetail.VendorStoreID = vendorStoreID
|
storeDetail.VendorStoreID = vendorStoreID
|
||||||
}
|
}
|
||||||
return storeDetail, err
|
return storeDetail, err
|
||||||
|
|||||||
@@ -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) {
|
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 {
|
if err != nil || store == nil {
|
||||||
return storeCat.Name, storeCat.Seq, false
|
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))
|
errList.AddErr(a.UpdateStoreInfo4Open2(storeParams, modifyCloseStatus))
|
||||||
}
|
}
|
||||||
if store.FreightDeductionPack != "" {
|
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 err2 == nil {
|
||||||
if storeDetail.FreightDeductionPackObj != nil {
|
if storeDetail.FreightDeductionPackObj != nil {
|
||||||
freightParams := &jdapi.UpdateStoreFreightParam{
|
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) {
|
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)
|
globals.SugarLogger.Debugf("jd SyncStoreProducts, storeID:%d", storeID)
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJD)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJD, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
|||||||
order.StoreName = store.Name
|
order.StoreName = store.Name
|
||||||
globals.SugarLogger.Debugf("jds GetStoreListByLocation, orderID: %v storeID :%v", order.VendorOrderID, order.StoreID)
|
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 != nil {
|
||||||
if storeDetail.PayPercentage < 50 {
|
if storeDetail.PayPercentage < 50 {
|
||||||
order.EarningType = model.EarningTypePoints
|
order.EarningType = model.EarningTypePoints
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
|
|||||||
|
|
||||||
// stoerIDs为nil表示所有
|
// stoerIDs为nil表示所有
|
||||||
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
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 {
|
if err != nil {
|
||||||
return err
|
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) {
|
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 {
|
if err != nil {
|
||||||
return vendorStoreID, err
|
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) {
|
func GetAvailableDeliverTime(ctx *jxcontext.Context, storeID int) (deliverTimerList []*DeliveryDayTimeInfo, err error) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -590,7 +590,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
|||||||
return nil, nil, fmt.Errorf("没有指定门店信息")
|
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 {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
@@ -874,7 +874,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
|||||||
//表示此订单为物料配送订单
|
//表示此订单为物料配送订单
|
||||||
if jxOrder.OrderType != model.OrderTypeNormal {
|
if jxOrder.OrderType != model.OrderTypeNormal {
|
||||||
// if fromStoreID != 0 {
|
// if fromStoreID != 0 {
|
||||||
storeDetail2, err2 := dao.GetStoreDetail(db, fromStoreID, model.VendorIDJX)
|
storeDetail2, err2 := dao.GetStoreDetail(db, fromStoreID, model.VendorIDJX, "")
|
||||||
if err = err2; err != nil {
|
if err = err2; err != nil {
|
||||||
return nil, nil, fmt.Errorf("fromStoreID有误,[%v]", fromStoreID)
|
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 {
|
if db == nil {
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
}
|
}
|
||||||
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDMTWM)
|
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDMTWM, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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) {
|
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)
|
api.YinBaoAPI = yinbaoapi.New(storeDetail.YbAppKey, storeDetail.YbAppID)
|
||||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "yinbaoCookie", model.ConfigTypeCookie, ""); err == nil {
|
if configs, err := dao.QueryConfigs(dao.GetDB(), "yinbaoCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||||
yinbaoCookie := configs[0].Value
|
yinbaoCookie := configs[0].Value
|
||||||
|
|||||||
Reference in New Issue
Block a user