diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 985cd3eca..388dd68ae 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -6636,3 +6636,13 @@ func SyncTiktokMainIdToLocal(ctx *jxcontext.Context, param *tiktok_store.MainSku } return nil } + +//批量更新美团商品进货价 +func BatchSetRestockingPrice(ctx *jxcontext.Context, preData map[string]interface{}) error { + //spuData := []*mtwmapi.SpuData{} + //for k, v := range preData { + // //获取京西平台storeID + // err := dao.GetStoreDetail() + //} + return nil +} diff --git a/business/model/dao/store.go b/business/model/dao/store.go index 760520eae..f6eaf514b 100644 --- a/business/model/dao/store.go +++ b/business/model/dao/store.go @@ -1622,3 +1622,9 @@ func InsertIntoFreightTemplate(storeID int, vendorStoreID string, templateID, wa fmt.Println(tStr2) return err } + +//只获取美团平台的京西storeID +func GetStoreIDByMeiTuan(vendorStoreID string) (storeID int, err error) { + + return 0, err +} diff --git a/business/partner/purchase/tiktok_store/store.go b/business/partner/purchase/tiktok_store/store.go index 656c1ad05..381e15067 100644 --- a/business/partner/purchase/tiktok_store/store.go +++ b/business/partner/purchase/tiktok_store/store.go @@ -261,12 +261,12 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID, deliveryFee StoreID: int(storeID), VendorStoreID: utils.Int64ToStr(vendorStoreID), } - if err = dao.CreateEntity(db, FreightTemplate); err != nil { + if err := dao.CreateEntity(db, FreightTemplate); err != nil { _, err1 := dao.UpdateEntity(db, FreightTemplate, "TemplateID", "WarehouseID", "FenceID", "TradeLimitID") - if err1 == nil { - errList.AddErr(fmt.Errorf("同步进数据库错误信息:%v", err)) - } else { + if err1 != nil { errList.AddErr(fmt.Errorf("同步进数据库错误信息:%v", err1)) + } else { + errList.AddErr(fmt.Errorf("同步进数据库错误信息:%v", err)) } } endErr := errList.GetErrListAsOne() @@ -278,7 +278,7 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID, deliveryFee } } -func CreateAndBindAllV2(vendorOrgCode string, storeID, vendorStoreID, deliveryFeeDeductionFee, minPrice int64, userName string) error { +func CreateAndBindAllV2(vendorOrgCode string, storeID, vendorStoreID, deliveryFeeDeductionFee, minPrice int64) error { var ( db *dao.DaoDB ctx *jxcontext.Context diff --git a/controllers/cms_sku.go b/controllers/cms_sku.go index b45fa87b5..780805bc6 100644 --- a/controllers/cms_sku.go +++ b/controllers/cms_sku.go @@ -811,3 +811,21 @@ func (c *SkuController) SyncTiktokMainSkuToLocalSku() { return errs, "", errs[0] }) } + +// @Title 批量设置美团商品进货价 +// @Description 批量设置美团商品进货价 +// @Param token header string true "认证token" +// @Param payload formData string true "json数据,SpuData对象()" +// @Success 200 {object} controllers.CallResult +// @Failure 200 {object} controllers.CallResult +// @router /BatchSetRestockingPrice [post] + +func (c *SkuController) BatchSetRestockingPrice() { + c.callBatchSetRestockingPrice(func(params *tSkuBatchSetRestockingPriceParams) (interface{}, string, error) { + payload := make(map[string]interface{}) + if err := utils.UnmarshalUseNumber([]byte(params.Payload), &payload); err == nil { + err = cms.BatchSetRestockingPrice(params.Ctx, payload) + } + return nil, "", err + }) +}