tempop.CheckImages
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/tempop"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
@@ -238,37 +236,14 @@ func (c *TempOpController) RefreshMtpsWaybillFee() {
|
||||
// @Title 查询三方运单费用信息
|
||||
// @Description 查询三方运单费用信息
|
||||
// @Param token header string true "认证token"
|
||||
// @Param isAsync query bool false "是否异步操作"
|
||||
// @Param isContinueWhenError query bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /TestIt [get]
|
||||
func (c *TempOpController) TestIt() {
|
||||
c.callTestIt(func(params *tTempopTestItParams) (retVal interface{}, errCode string, err error) {
|
||||
// // retVal, err = cms.OpenRemoteStoreByJxStatus(params.Ctx, nil, nil, false, true, true)
|
||||
// // shopList, err := api.EbaiAPI.ShopList(ebaiapi.SysStatusAll)
|
||||
// shopList, err := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDEBAI}, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
|
||||
// task := tasksch.NewParallelTask("TestIt", nil, params.Ctx,
|
||||
// func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
// // shopID := batchItemList[0].(*ebaiapi.ShopInfo).ShopID
|
||||
// shopID := utils.Int2Str(batchItemList[0].(*model.StoreMap).StoreID)
|
||||
// skuInfo, err := api.EbaiAPI.SkuList(shopID, &ebaiapi.SkuListParams{})
|
||||
// if err == nil && skuInfo.Total > 500 {
|
||||
// errSkuCount := 0
|
||||
// for _, sku := range skuInfo.List {
|
||||
// if sku.CustomCatIDs == "" {
|
||||
// errSkuCount++
|
||||
// }
|
||||
// }
|
||||
// if errSkuCount > len(skuInfo.List)/3 {
|
||||
// retVal = []string{shopID}
|
||||
// }
|
||||
// }
|
||||
// return retVal, err
|
||||
// }, shopList)
|
||||
// task.Run()
|
||||
// retVal, err = task.GetResult(0)
|
||||
mtwm.OnCallbackMsg(&mtwmapi.CallbackMsg{
|
||||
Cmd: mtwmapi.MsgTypePrivateNumberDowngrade,
|
||||
})
|
||||
retVal, err = tempop.CheckImages(params.Ctx, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user