This commit is contained in:
邹宗楠
2023-04-03 09:22:09 +08:00
parent b18fca48fa
commit afcee6fe38
18 changed files with 2 additions and 32 deletions

View File

@@ -270,7 +270,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
if err == nil {
if shopID > 0 {
err = p.UpdateStoreCustomID(jxcontext.AdminCtx, "", store.VendorStoreID, int64(shopID))
globals.SugarLogger.Debugf("UpdateStore store.VendorStoreID====%s,shopID====%s", store.VendorStoreID, shopID)
} else if shopID == 0 {
// todo remove out shop id
}
@@ -346,7 +345,6 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask
fBaiduIDs, fShopIDs, err1 := FilterStoreRel(baiduShopIDs)
globals.SugarLogger.Debugf("RefreshAllStoresID FilterStoreRel fBaiduIDs====%d fShopIDs====%d err====%v", fBaiduIDs, fShopIDs, err1)
err = api.EbaiAPI.ShopIDBatchUpdate(fBaiduIDs, fShopIDs)
globals.SugarLogger.Debugf("RefreshAllStoresID baiduShopIDs====%s,shopIDs====%s", baiduShopIDs, shopIDs)
}
return nil, err
}, stores)
@@ -373,7 +371,6 @@ func FilterStoreRel(baiduShopIDs []string) (fBaiduShopIDs []string, fShopIDs []s
return nil, nil, err
}
localRel, err := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), k, model.VendorIDEBAI, "")
globals.SugarLogger.Debugf("get localRel err===%v", err)
if remoteRel.ShopID != utils.Int2Str(localRel.ID) {
fBaiduShopIDs = append(fBaiduShopIDs, k)
fShopIDs = append(fShopIDs, utils.Int2Str(localRel.ID))
@@ -673,7 +670,6 @@ func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgC
if err1 != nil {
globals.SugarLogger.Debugf("UpdateStoreCustomID err1====%v", err1)
}
globals.SugarLogger.Debugf("UpdateStoreCustomID fBaiduIDs====%s fShopIDs====%d err1", fBaiduIDs, fShopIDs)
err = api.EbaiAPI.ShopIDBatchUpdate(fBaiduIDs, fShopIDs)
//err = api.EbaiAPI.ShopIDBatchUpdate([]string{vendorStoreID}, []string{utils.Int64ToStr(storeID)})
}

View File

@@ -108,10 +108,6 @@ func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, vendorOrgCode,
func (p *PurchaseHandler) ReorderCategories2(ctx *jxcontext.Context, vendorOrgCode, vendorParentCatID string, vendorCatIDList []string) (err error) {
if globals.EnableJdStoreWrite {
err = getAPI(vendorOrgCode).ChangeShopCategoryOrder(utils.Str2Int64WithDefault(vendorParentCatID, 0), utils.StringSlice2Int64(vendorCatIDList))
globals.SugarLogger.Debugf("vendorInfo.vendorOrgCode=== %s", vendorOrgCode)
globals.SugarLogger.Debugf("vendorInfo.vendorParentCatID=== %s", vendorParentCatID)
globals.SugarLogger.Debugf("vendorInfo.vendorCatIDList=== %s", vendorCatIDList)
globals.SugarLogger.Debugf("ReorderCategories2 === %v", err)
}
return err
}

View File

@@ -297,7 +297,6 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
}
func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
globals.SugarLogger.Debugf("是不是正儿八经的京东商城%s", "UpdateStoreSkus")
if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID {
if vendorStoreID == model.JdShopMainVendorStoreID {
for _, v := range storeSkuList {

View File

@@ -252,7 +252,6 @@ func CreateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64,
outJxOrder.OrderID = jxutils.GenOrderNo()
}
order, err2 := jxOrder2GoodsOrder(ctx, outJxOrder, deliveryAddress, "", IsDeliverySelf, couponIDs)
globals.SugarLogger.Debugf("order order %s", utils.Format4Output(order, false))
if err = err2; err == nil {
order.AddressID = addressID
@@ -839,7 +838,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
if jxOrder.OrderType != model.OrderTypeMatter || (jxOrder.OrderType == model.OrderTypeMatter && fromStoreID == -1) {
outJxOrder.Skus = append(outJxOrder.Skus, jxSku)
outJxOrder.OrderPrice += int64(jxSku.Count) * jxSku.SalePrice
} else { //以下else为物料订单袋子金额和数量处理
} else { //以下else为物料订单袋子金额和数量处理
if !result.Flag { //只要flag是false就按原价申请是true再按订单量
outJxOrder.Skus = append(outJxOrder.Skus, jxSku)
outJxOrder.OrderPrice += int64(jxSku.Count) * jxSku.SalePrice

View File

@@ -28,7 +28,6 @@ const (
func OnOrderMsg(msgId string, msg interface{}) (response *tiktokShop.CallbackResponse) {
if CurPurchaseHandler != nil {
orderId, shopId, _ := api.TiktokStore.GetCallbackOrderId(msgId, msg)
globals.SugarLogger.Debugf("order_id %s,%d", orderId, shopId)
orderDetail, err := GetTiktokApi(utils.Int64ToStr(shopId), 0, "").GetTiktokOrderDetail(orderId)
if err != nil {
return tiktokShop.Err2CallbackResponse(err, "")
@@ -78,7 +77,6 @@ func HttpToGuoYuan(param map[string]interface{}, requestType string) (*http.Resp
}
}
body := strings.NewReader(string(paramData))
globals.SugarLogger.Debugf("HttpToGuoYuan paramData====%s", utils.Format4Output(paramData, false))
url := ""
switch requestType {
case CaiShiPushGyTagOrder: // 订单相关

View File

@@ -192,7 +192,6 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode, vendorOrderID, vendorStoreID s
// 预订单还是快速达
localStore, err := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreIdRelly, model.VendorIDDD, vendorOrgCode)
if err != nil || localStore == nil || localStore.ID == 0 {
globals.SugarLogger.Debugf("平台门店未绑定到京西系统 %s", err.Error())
return nil, nil, err
}

View File

@@ -494,7 +494,6 @@ func CreateFreightTemplate(storeCode, deliveryFeeDeductionSill int) (int64, erro
//},
//}
}
globals.SugarLogger.Debugf("CreateFreightTemplate 直辖市code====%d", param.Template.ProductCity)
if deliveryFeeDeductionSill != 0 {
param.Template.TemplateName += "满减包邮模板"
param.Columns = []freightTemplate_create_request.ColumnsItem{{
@@ -601,7 +600,6 @@ func CreateBindFreeShipTemplate(vendorOrgCode string, storeID int, shipFee int64
} else {
param.Template.ProductCity = int64(storeDetail.CityCode)
}
globals.SugarLogger.Debugf("CreateBindFreeShipTemplate 直辖市code=%d", param.Template.ProductCity)
if resp, err := getAPI(vendorOrgCode, 0, "").FreightTemplateCreate(param); err != nil {
return errors.New(fmt.Sprintf("平台门店(%s) 京西门店(%d) 创建包邮模板失败:%v,根据提示处理", storeDetail.VendorStoreID, storeID, err))
} else {

View File

@@ -498,7 +498,6 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS
}
func getTiktokBrandId(api *tiktokShop.API, db *dao.DaoDB, upc, upcBrandName, upcTiktokBrandId string, categoryLeafId int64) (int64, error) {
globals.SugarLogger.Debugf("upc:%s,upcBrandName:%s,upcTiktokBrandId:%s,categoryLeafId:%d", upc, upcBrandName, upcTiktokBrandId, categoryLeafId)
if upc == "" { // 默认品牌京西菜市 596120136
return 596120136, nil
} else if upc != "" && upcBrandName != "" && upcTiktokBrandId != "" {

View File

@@ -275,7 +275,6 @@ func (p *PurchaseHandler) setStoreOrderSeq(order *model.GoodsOrder) {
db := dao.GetDB()
if err := dao.GetRow(db, &count, sql, order.StoreID, dateBegin, model.VendorIDWSC); err == nil {
order.OrderSeq = count + 1
globals.SugarLogger.Debugf("setStoreOrderSeq orderID:%s, dateBegin:%s, orderSeq:%d", order.VendorOrderID, utils.Time2Str(dateBegin), order.OrderSeq)
} else {
globals.SugarLogger.Errorf("setStoreOrderSeq orderID:%s failed with error:%v", order.VendorOrderID, err)
}