diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index c627108dd..0deb3be0b 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -6621,10 +6621,10 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo skuList2, _ := mtapi.RetailListAll(mtStoreID, i) skuList = append(skuList, skuList2...) } - globals.SugarLogger.Debugf("-----len := %d", len(skuList)) //skuList, _ := mtapi.RetailList(mtStoreID, 0, 2) task2 := tasksch.NewParallelTask("美团到京东, 建商品", tasksch.NewParallelConfig().SetIsContinueWhenError(true).SetParallelCount(1), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { + time.Sleep(1 * time.Second) mtSku := batchItemList[0].(*mtwmapi.AppFood) //catMaps, _ := dao.GetMtJdCategoryMap(db, utils.Int2Str(mtSku.TagID), "") //if len(catMaps) == 0 { @@ -6648,9 +6648,9 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo Images: mtSku.PictureList, } if param.OutSkuID == "" { - param.OutSkuID = fmt.Sprintf("%d_%d", time.Now().Unix(), param.SkuPrice) + param.OutSkuID = fmt.Sprintf("%d_%d%d", time.Now().Unix(), param.SkuPrice, len(mtSku.Name)) } - vendorCategoryId, _ := handler.GetSkuCategoryIdByName(jdOrgCode, mtSku.Name) + vendorCategoryId, _ := handler.GetSkuCategoryIdByName(jdOrgCode, strings.Join(mtSku.PictureList, "|")) if vendorCategoryId != "" && utils.Str2Int64(vendorCategoryId) <= 25048 { param.CategoryID = utils.Str2Int64(vendorCategoryId) // 其他水果 } else if utils.Str2Int64(vendorCategoryId) > 25048 { // 只有水果,後面刪除 @@ -6674,7 +6674,6 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo } skuID, err := jd.AddSku2(param) if err != nil { - globals.SugarLogger.Debugf("-------------skuname := %s", param.SkuName) globals.SugarLogger.Debugf("---------AddSku2 := %s,%s,%v", param.SkuName, skuID, err) } if skuID != "" { diff --git a/business/partner/purchase/jx/localjx/tonglianpay_gun.go b/business/partner/purchase/jx/localjx/tonglianpay_gun.go index d79ef66ae..381955896 100644 --- a/business/partner/purchase/jx/localjx/tonglianpay_gun.go +++ b/business/partner/purchase/jx/localjx/tonglianpay_gun.go @@ -60,9 +60,9 @@ func BarCodeScannerPay(vendorOrderId string, userPaymentLabel string) (payCode s Signtype: tonglianpayapi.EncryptionRsa, } terminfo := &tonglianpayapi.TerminfoBase{ - Termno: fmt.Sprintf("%d_1", goodsOrder.JxStoreID), - Devicetype: "10", - Termsn: fmt.Sprintf("%d_1", goodsOrder.JxStoreID), + Termno: fmt.Sprintf("%d00", goodsOrder.JxStoreID), + Devicetype: "11", + Termsn: fmt.Sprintf("%d00", goodsOrder.JxStoreID), Longitude: fmt.Sprintf("+%s", utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lng))), Latitude: fmt.Sprintf("+%s", utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lat))), } @@ -302,9 +302,9 @@ func AddStoreTerm(storeId int, operation string) error { address = storeDetail.Address[index+len(storeDetail.DistrictName):] } param := &tonglianpayapi.AddTermReq{ - Termno: fmt.Sprintf("%d_1", storeDetail.ID), - Devicetype: "10", - Termsn: fmt.Sprintf("%d_1", storeDetail.ID), + Termno: fmt.Sprintf("%d00", storeDetail.ID), + Devicetype: "11", + Termsn: fmt.Sprintf("%d00", storeDetail.ID), Operation: operation, Termstate: "", Termaddress: fmt.Sprintf("%s-%s-%s-%s", storeDetail.ProvinceName, storeDetail.CityName, storeDetail.DistrictName, address),