新增平台京东商城
This commit is contained in:
11
business/partner/purchase/jdshop/act.go
Normal file
11
business/partner/purchase/jdshop/act.go
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *PurchaseHandler) SyncAct(ctx *jxcontext.Context, parentTask tasksch.ITask, act *model.Act2, actOrderRules []*model.ActOrderRule, actStoreSkuList []*model.ActStoreSku2) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
42
business/partner/purchase/jdshop/jds.go
Normal file
42
business/partner/purchase/jdshop/jds.go
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner/putils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
CurPurchaseHandler *PurchaseHandler
|
||||||
|
)
|
||||||
|
|
||||||
|
type PurchaseHandler struct {
|
||||||
|
partner.BasePurchasePlatform
|
||||||
|
putils.DefSingleStorePlatform
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
if api.JdShopAPI != nil {
|
||||||
|
fmt.Println("test111111111111111111111")
|
||||||
|
CurPurchaseHandler = New()
|
||||||
|
partner.RegisterPurchasePlatform(CurPurchaseHandler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func New() (obj *PurchaseHandler) {
|
||||||
|
obj = new(PurchaseHandler)
|
||||||
|
obj.ISingleStoreStoreSkuHandler = obj
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetVendorID() int {
|
||||||
|
return model.VendorIDYB
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UploadImg(ctx *jxcontext.Context, vendorOrgCode, imgURL string, imgData []byte, imgName string, imgType int) (imgHint string, err error) {
|
||||||
|
return imgHint, err
|
||||||
|
}
|
||||||
76
business/partner/purchase/jdshop/order.go
Normal file
76
business/partner/purchase/jdshop/order.go
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *model.GoodsOrder) {
|
||||||
|
return order
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) GetOrder(vendorOrgCode, vendorOrderID string) (order *model.GoodsOrder, err error) {
|
||||||
|
return order, err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) GetOrderStatus(vendorOrgCode, vendorOrderID string) (status int, err error) {
|
||||||
|
return status, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptIt bool, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) {
|
||||||
|
return err
|
||||||
|
} // 取货失败后再次招唤平台配送
|
||||||
|
func (p *PurchaseHandler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) {
|
||||||
|
return err
|
||||||
|
} // 投递失败后确认收到退货
|
||||||
|
func (p *PurchaseHandler) CanSwitch2SelfDeliver(order *model.GoodsOrder) (isCan bool, err error) {
|
||||||
|
return isCan, err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) Swtich2SelfDelivered(order *model.GoodsOrder, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) SelfDeliverDelivering(order *model.GoodsOrder, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) SelfDeliverDelivered(order *model.GoodsOrder, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) GetOrderRealMobile(ctx *jxcontext.Context, order *model.GoodsOrder) (mobile string, err error) {
|
||||||
|
return mobile, err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) ReplyOrderComment(ctx *jxcontext.Context, vendorOrgCode string, orderComment *model.OrderComment, replyComment string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) AgreeOrRefuseCancel(ctx *jxcontext.Context, order *model.GoodsOrder, isAgree bool, reason string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) AdjustOrder(ctx *jxcontext.Context, order *model.GoodsOrder, removedSkuList []*model.OrderSku, reason string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) RefundOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.GoodsOrder, refundSkuList []*model.OrderSku, reason string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, order *model.AfsOrder, approveType int, reason string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
func (p *PurchaseHandler) ConfirmReceivedReturnGoods(ctx *jxcontext.Context, order *model.AfsOrder) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
5
business/partner/purchase/jdshop/order_comment.go
Normal file
5
business/partner/purchase/jdshop/order_comment.go
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
func (c *PurchaseHandler) StartRefreshComment() {
|
||||||
|
|
||||||
|
}
|
||||||
76
business/partner/purchase/jdshop/sku.go
Normal file
76
business/partner/purchase/jdshop/sku.go
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetAllCategories(ctx *jxcontext.Context, vendorOrgCode string) (cats []*partner.BareCategoryInfo, err error) {
|
||||||
|
return cats, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) UpdateCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) error {
|
||||||
|
// return nil
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) DeleteCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) error {
|
||||||
|
// return nil
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) ReorderCategories(db *dao.DaoDB, parentCatID int, userName string) (err error) {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) DeleteCategory2(ctx *jxcontext.Context, vendorOrgCode, vendorCatID string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) ReorderCategories2(ctx *jxcontext.Context, vendorOrgCode, vendorParentCatID string, vendorCatIDList []string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) CreateSku(db *dao.DaoDB, sku *model.Sku, userName string) (err error) {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) ReadSku(ctx *jxcontext.Context, vendorOrgCode, vendorSkuID string) (skuNameExt *model.SkuNameExt, err error) {
|
||||||
|
// return skuNameExt, err
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) UpdateSku(db *dao.DaoDB, sku *model.Sku, userName string) (err error) {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func (p *PurchaseHandler) DeleteSku(db *dao.DaoDB, sku *model.Sku, userName string) (err error) {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) DeleteSku2(ctx *jxcontext.Context, vendorOrgCode string, sku *partner.StoreSkuInfo) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetVendorCategories(ctx *jxcontext.Context) (vendorCats []*model.SkuVendorCategory, err error) {
|
||||||
|
return vendorCats, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetSkus(ctx *jxcontext.Context, vendorOrgCode string, skuID int, vendorSkuID string) (skuNameList []*partner.SkuNameInfo, err error) {
|
||||||
|
return skuNameList, err
|
||||||
|
}
|
||||||
44
business/partner/purchase/jdshop/store.go
Normal file
44
business/partner/purchase/jdshop/store.go
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string) (storeDetail *dao.StoreDetail, err error) {
|
||||||
|
return storeDetail, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// stoerIDs为nil表示所有
|
||||||
|
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) {
|
||||||
|
return hint, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string) (storeStatus int, err error) {
|
||||||
|
return storeStatus, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, isSetEnable bool) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, status int) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *PurchaseHandler) UpdateStoreOpTime(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, opTimeList []int16) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *PurchaseHandler) GetAllStoresVendorID(ctx *jxcontext.Context, vendorOrgCode string) (vendorStoreIDs []string, err error) {
|
||||||
|
return vendorStoreIDs, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID string, storeID int64) (err error) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
165
business/partner/purchase/jdshop/store_sku.go
Normal file
165
business/partner/purchase/jdshop/store_sku.go
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
package jdshop
|
||||||
|
|
||||||
|
import (
|
||||||
|
"regexp"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
sensitiveWordRegexp = regexp.MustCompile(`商品名称中含有敏感词(\[.*\])`)
|
||||||
|
)
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return failedList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return failedList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return failedList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (skuNameList []*partner.SkuNameInfo, err error) {
|
||||||
|
|
||||||
|
return skuNameList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo, status int) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return failedList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return failedList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return failedList, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetStoreAllCategories(ctx *jxcontext.Context, storeID int, vendorStoreID string) (cats []*partner.BareCategoryInfo, err error) {
|
||||||
|
return cats, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) UpdateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) DeleteStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID, vendorCatID string, level int) (err error) {
|
||||||
|
if globals.EnableJdShopWrite {
|
||||||
|
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) IsErrSkuExist(err error) (isExist bool) {
|
||||||
|
return yinbaoapi.IsErrSkuExist(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) IsErrCategoryExist(err error) (isExist bool) {
|
||||||
|
return yinbaoapi.IsErrCategoryExist(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) IsErrCategoryNotExist(err error) (isNotExist bool) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) GetSensitiveWordRegexp() *regexp.Regexp {
|
||||||
|
return sensitiveWordRegexp
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PurchaseHandler) IsErrSkuNotExist(err error) (isNotExist bool) {
|
||||||
|
return yinbaoapi.IsErrSkuNotExist(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ybSkuStatus2Jx(ybStatus int) (jxSkuStatus int) {
|
||||||
|
if ybStatus == yinbaoapi.SkuStatusEnable {
|
||||||
|
jxSkuStatus = model.SkuStatusNormal
|
||||||
|
} else if ybStatus == yinbaoapi.SkuStatusDisabled {
|
||||||
|
jxSkuStatus = model.SkuStatusDontSale
|
||||||
|
} else if ybStatus == yinbaoapi.SkuStatusDeleted {
|
||||||
|
jxSkuStatus = model.SkuStatusDeleted
|
||||||
|
}
|
||||||
|
return jxSkuStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
func vendorSku2Jx(result *yinbaoapi.QueryProductByBarcodeResult, resultp []*yinbaoapi.QueryProductImagesByBarcodeResult) (skuName *partner.SkuNameInfo) {
|
||||||
|
var picList []string
|
||||||
|
if result == nil {
|
||||||
|
globals.SugarLogger.Warnf("vendorSku2Jx, strange result:%s", utils.Format4Output(result, true))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if len(resultp) > 0 {
|
||||||
|
if resultp[0].ImageURL != "" {
|
||||||
|
// for _, v := range resultp.Productimages {
|
||||||
|
picList = append(picList, resultp[0].ImageURL)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prefix, name, comment, specUnit, unit, specQuality := jxutils.SplitSkuName(result.Name)
|
||||||
|
skuName = &partner.SkuNameInfo{
|
||||||
|
Prefix: prefix,
|
||||||
|
Name: name,
|
||||||
|
Unit: unit,
|
||||||
|
YbBarCode: result.Barcode,
|
||||||
|
SkuList: []*partner.SkuInfo{
|
||||||
|
&partner.SkuInfo{
|
||||||
|
StoreSkuInfo: partner.StoreSkuInfo{
|
||||||
|
VendorSkuID: utils.Int64ToStr(result.UID),
|
||||||
|
Stock: int(utils.Float64TwoInt64(result.Stock)),
|
||||||
|
VendorPrice: jxutils.StandardPrice2Int(result.SellPrice),
|
||||||
|
Status: ybSkuStatus2Jx(result.Enable),
|
||||||
|
},
|
||||||
|
SkuName: result.Name,
|
||||||
|
Comment: comment,
|
||||||
|
SpecQuality: float64(specQuality),
|
||||||
|
SpecUnit: specUnit,
|
||||||
|
Weight: int(utils.Float64TwoInt64(float64(specQuality))),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
PictureList: picList,
|
||||||
|
}
|
||||||
|
return skuName
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user