同步EXCEL 第一版
This commit is contained in:
@@ -2,14 +2,14 @@ package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"io"
|
||||
)
|
||||
|
||||
type SyncController struct {
|
||||
@@ -124,6 +124,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"
|
||||
|
||||
Reference in New Issue
Block a user