diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 0419576b5..9257cd023 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -8,6 +8,8 @@ import ( "strings" "time" + "git.rosy.net.cn/baseapi/platformapi/jdshopapi" + "git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin" "git.rosy.net.cn/jx-callback/business/partner/delivery" "github.com/360EntSecGroup-Skylar/excelize" @@ -1498,7 +1500,7 @@ func addSku(outSkuId string, cagtegoryId int, shopCategories []int64, brandId in } func UploadJdsImage(ctx *jxcontext.Context) (err error) { - db := dao.GetDB() + // db := dao.GetDB() // result1, _ := api.JdShopAPI.GetProvince() // for _, v := range result1 { // place1, _ := dao.GetPlaceByName(db, v.AreaName, 1, 0) @@ -1583,31 +1585,35 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { // } // } - var stores []*model.Store - sql := ` - SELECT a.* - FROM store a - LEFT JOIN store_map b ON a.id = b.store_id AND b.vendor_id = 5 AND b.deleted_at = '1970-01-01 00:00:00' - WHERE 1=1 - AND (a.status = 1 OR a.status = 0) - AND b.id IS NULL - AND a.deleted_at = '1970-01-01 00:00:00' - ` - err = dao.GetRows(db, &stores, sql, nil) - for _, v := range stores { - storeMap := &model.StoreMap{ - Status: 1, - VendorID: model.VendorIDJDShop, - AutoPickup: 1, - DeliveryCompetition: 1, - PricePercentage: 100, - IsSync: 1, - SyncRule: 1, - } - _, err = cms.AddStoreVendorMap(ctx, db, model.VendorIDJDShop, "", v.ID, storeMap) - if err != nil { - continue - } - } + // var stores []*model.Store + // sql := ` + // SELECT a.* + // FROM store a + // LEFT JOIN store_map b ON a.id = b.store_id AND b.vendor_id = 5 AND b.deleted_at = '1970-01-01 00:00:00' + // WHERE 1=1 + // AND (a.status = 1 OR a.status = 0) + // AND b.id IS NULL + // AND a.deleted_at = '1970-01-01 00:00:00' + // ` + // err = dao.GetRows(db, &stores, sql, nil) + // for _, v := range stores { + // storeMap := &model.StoreMap{ + // Status: 1, + // VendorID: model.VendorIDJDShop, + // AutoPickup: 1, + // DeliveryCompetition: 1, + // PricePercentage: 100, + // IsSync: 1, + // SyncRule: 1, + // } + // _, err = cms.AddStoreVendorMap(ctx, db, model.VendorIDJDShop, "", v.ID, storeMap) + // if err != nil { + // continue + // } + // } + _, err = api.JdShopAPI.AllOrders(&jdshopapi.AllOrdersParam{ + Current: 1, + PageSize: 10, + }) return err }