This commit is contained in:
邹宗楠
2026-02-24 09:58:35 +08:00
parent ab96fc6343
commit cce0ab33be
6 changed files with 47 additions and 39 deletions

View File

@@ -275,13 +275,13 @@ func (a *API) ShopOffline(shopID string, baiduShopID int64) (err error) {
}
func (a *API) ShopClose(shopID string, baiduShopID int64) (err error) {
status, err := a.ShopBusStatusGet(shopID, baiduShopID, PlatformFlagElm)
if status == ShopBusStatusOpening {
params := a.genShopIDParams(shopID, baiduShopID, 0)
_, err = a.AccessAPI("shop.close", params)
return err
}
//status, err := a.ShopBusStatusGet(shopID, baiduShopID, PlatformFlagElm)
//if status == ShopBusStatusOpening {
params := a.genShopIDParams(shopID, baiduShopID, 0)
_, err = a.AccessAPI("shop.close", params)
return err
//}
//return err
}
func (a *API) SupplierList() (supplierInfo map[string]interface{}, err error) {

View File

@@ -86,7 +86,7 @@ func TestSkuListDelete(t *testing.T) {
Page: page,
PageSize: 100,
}
foodList, err := api.SkuList(utils.Int2Str(667247), param)
foodList, err := api.SkuList(utils.Int2Str(667453), param)
if err != nil {
break
}
@@ -94,7 +94,7 @@ func TestSkuListDelete(t *testing.T) {
for k, v := range foodList.List {
if v.CustomSkuID == "" {
api.AccessAPI2("sku.delete", map[string]interface{}{
"shop_id": "667247",
"shop_id": "667453",
"sku_id": v.SkuId,
}, utils.GetUUID())
globals.SugarLogger.Debugf("---k := %d,delete_name:= %s", k, v.Name)
@@ -329,7 +329,7 @@ func TestDeleteStoreSku(t *testing.T) {
// TestDeleteSku 删除饿了么商品
func TestDeleteSku(t *testing.T) {
shopId := "804591"
shopId := "667453"
param1 := &SkuListParams{
Page: 1,
PageSize: 100,

View File

@@ -205,9 +205,7 @@ func TestSupplierList(t *testing.T) {
}
func TestShopClose(t *testing.T) {
aa := []int64{
32267387627, 2267141486, 32267545390, 32267804789, 32267779555, 32267089395, 100000063963, 32267144442, 32267387614, 32267388565, 32267034104, 32267387606, 2267081269, 2234560558, 32267779547, 32267387580, 2167002619, 2234549766, 32267089396, 2233066023, 32267034093, 32267715495, 32267388573, 32267315069, 2267121512, 32267387577, 32267387576, 2234778219, 32267089418, 32267089423, 32267105194, 32267674067, 32267387552, 32267144455, 32267144480, 32267144470, 32267184056, 32267387550, 32267184051, 32267184034, 32267144462, 32267184070, 32267804790, 32267258834, 32267258858, 32267387531, 32267258862, 32267315053, 32267258872, 32267258878, 2267141513, 32267387525, 32267315061, 32267630601, 32267358120, 32267184082, 32267358106, 32267387534, 32267358101, 32267387488, 32267715496, 32267388570, 32267545402, 32267545380, 32267545394, 32267630606, 32267387579, 32267674064, 32267697568, 32267655030, 32267630644, 32267674065, 32267697561, 32267674042, 32267779551, 32267674060, 32267715494, 32267742248, 32267742251, 32267779552, 32267753661, 32267779542, 32267144483, 32267779558, 32267804811, 32267358115, 32267804787, 32267804791, 32267804793, 32267804800, 32267812968, 32267804803, 32267742242, 100000048520, 100000107370, 100000104868, 200000143541, 100000190484, 100000190475, 2122964557, 1119844487, 2132873395, 505866454, 1102408916, 506287807, 506322630, 1109714045, 507377485, 507621023, 1124508293, 1124489923, 1128314567, 1137321209, 1138084276, 508376256, 1139471614, 1140171041, 508163472, 1139765248, 1140168573, 1143733509, 1145229605, 509156468, 1144562343, 509351958, 32267655046, 1151130808, 1155331892, 1155432211, 1161746045, 1164043546, 512276503, 514710033,
}
aa := []int64{1329553284}
for i := 0; i < len(aa); i++ {
err := api.ShopClose("", aa[i])