This commit is contained in:
邹宗楠
2025-08-19 11:39:40 +08:00
parent 225777405c
commit 5037da9b31
2 changed files with 3 additions and 11 deletions

View File

@@ -93,7 +93,6 @@ func createOneShopAct(act *model.Act2, vendorStoreID string, actStoreSku []*mode
//5873
if err2 != nil && strings.Contains(err2.Error(), "未获取有效门店id") {
temp, err := dao.GetStoreDetailForDD(dao.GetDB(), 0, model.VendorIDMTWM, vendorStoreID, "")
if err == nil {
actResult, faileInfoList, err2 = getAPI(temp.VendorOrgCode, 0, vendorStoreID).RetailDiscountBatchSave2(vendorStoreID, jxActType2Mtwm(act.Type), actData)
@@ -141,10 +140,9 @@ func createOneShopAct(act *model.Act2, vendorStoreID string, actStoreSku []*mode
func cancelOneShopAct(act *model.Act2, vendorStoreID string, actStoreSku []*model.ActStoreSku2) (failedList []*partner.StoreSkuInfoWithErr, err error) {
if list := storeSku2ActData4Delete(actStoreSku, nil /*model.IsSyncStatusNeedDelete*/); len(list) > 0 {
if globals.EnableMtwmStoreWrite {
globals.SugarLogger.Debugf("----cancelOneShopAct--: %s", utils.Format4Output(list, false))
failedList2, err2 := api.MtwmAPI.RetailDiscountDelete2(vendorStoreID, jxActType2Mtwm(act.Type), list)
globals.SugarLogger.Debugf("failedList2---- %s", utils.Format4Output(failedList2, false))
globals.SugarLogger.Debugf("err2---- %v", err2)
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDMTWM, "")
apiObj := getAPI(storeDetail.VendorOrgCode, 0, vendorStoreID)
failedList2, err2 := apiObj.RetailDiscountDelete2(vendorStoreID, jxActType2Mtwm(act.Type), list)
actStoreSkuMap := make(map[string]*model.ActStoreSku2)
for _, v := range actStoreSku {
actStoreSkuMap[v.VendorActID] = v