Excel 一版

This commit is contained in:
807875765@qq.com
2022-03-14 13:06:21 +08:00
parent 0b040d1e72
commit 8caf66eb8a
6 changed files with 277 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package controllers
import (
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"io"
"git.rosy.net.cn/baseapi/utils"
@@ -124,6 +125,28 @@ func (c *SyncController) FullSyncStoresSkus() {
})
}
// @Title 比较门店中后台商品和运营商后台商品的差异 导出一个Excel 表格
// @Description 由于目前同步会因为类别不同会导致商品每晚无法成功同步 因此在同步功能前新增一个导出查看差异功能 比较商品类别
// @Param token header string true "认证token"
// @Param storeIDs formData string true "门店ID列表"
// @Param vendorIDs formData string true "厂商ID列表"
// @Param isAsync formData bool true "是否异步操作"
// @Param isContinueWhenError formData bool false "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /CompareStoreWithOperator [put]
func (c *SyncController) CompareStoreWithOperator() {
c.callCompareStoreWithOperator(func(params *tSyncCompareStoreWithOperatorParams) (retVal interface{}, errCode string, err error) {
var vendorIDs, storeIDs []int
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.VendorIDs, &vendorIDs); err != nil {
return retVal, "", err
}
globals.SugarLogger.Debug(params.StoreIDs, params.VendorIDs)
err = cms.GetVendorStoreSkusToStruct(params.Ctx, storeIDs[0], vendorIDs[0])
return retVal, "", err
})
}
// @Title 删除门店平台商品信息(包括分类)
// @Description 删除门店平台商品信息(包括分类)(!!!此操作会先清除平台上已有的商品及分类信息),此操作只适用于单门店模式平台
// @Param token header string true "认证token"