SyncStores
This commit is contained in:
@@ -144,6 +144,33 @@ func (c *SyncController) DeleteRemoteStoreSkus() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 同步门店
|
||||
// @Description 同步门店
|
||||
// @Param token header string true "认证token"
|
||||
// @Param vendorIDs formData string false "平台ID(京东0 美团1 饿百3)列表"
|
||||
// @Param vendorOrgCodes formData string false "平台账号列表"
|
||||
// @Param storeIDs formData string false "门店ID列表"
|
||||
// @Param isForce formData bool false "是否强制(设置修改标志)"
|
||||
// @Param isAsync formData bool false "是否异步"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /SyncStores [post]
|
||||
func (c *SyncController) SyncStores() {
|
||||
c.callSyncStores(func(params *tSyncSyncStoresParams) (retVal interface{}, errCode string, err error) {
|
||||
var vendorIDs, storeIDs []int
|
||||
var vendorOrgCodes []string
|
||||
if err = jxutils.Strings2Objs(params.VendorIDs, &vendorIDs, params.StoreIDs, &storeIDs, params.VendorOrgCodes, &vendorOrgCodes); err == nil {
|
||||
db := dao.GetDB()
|
||||
if params.IsForce {
|
||||
dao.SetStoreMapSyncStatus(db, vendorIDs, storeIDs, model.SyncFlagModifiedMask)
|
||||
}
|
||||
retVal, err = cms.CurVendorSync.SyncStore2(params.Ctx, db, vendorIDs, storeIDs, true, params.IsAsync)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 同步商家分类(多门店平台)
|
||||
// @Description 同步商家分类(多门店平台)
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
Reference in New Issue
Block a user