1
This commit is contained in:
@@ -192,26 +192,27 @@ func (o *GoodsOrderOriginal) TableUnique() [][]string {
|
||||
}
|
||||
|
||||
type OrderSku struct {
|
||||
ID int64 `orm:"column(id)" json:"id"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
StoreSubID int `orm:"column(store_sub_id)" json:"storeSubID"` // EarningActID,当前这个字段被当成结算活动ID用
|
||||
StoreSubName string `orm:"size(64)" json:"storeSubName"` // 当前这个字段被用作vendorActType
|
||||
Count int `json:"count"`
|
||||
VendorSkuID string `orm:"column(vendor_sku_id);size(48)" json:"vendorSkuID"`
|
||||
SkuID int `orm:"column(sku_id)" json:"skuID"` // 外部系统里记录的 jxskuid
|
||||
JxSkuID int `orm:"column(jx_sku_id)" json:"jxSkuID"` // 根据VendorSkuID在本地系统里查询出来的 jxskuid
|
||||
SkuName string `orm:"size(255)" json:"skuName"`
|
||||
ShopPrice int64 `json:"shopPrice"` // 京西价
|
||||
VendorPrice int64 `json:"vendorPrice"` // 平台价
|
||||
SalePrice int64 `json:"salePrice"` // 售卖价
|
||||
EarningPrice int64 `json:"earningPrice"` // 活动商品设置,结算给门店老板的钱,如果结算活动ID为0,是按结算比例算的,否则就是结算表中的值
|
||||
Weight int `json:"weight"` // 单位为克
|
||||
SkuType int `json:"skuType"` // 当前如果为gift就为1,否则缺省为0
|
||||
PromotionType int `json:"promotionType"` // todo 当前是用于记录京东的PromotionType(生成jxorder用),没有做转换
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"-"` // 分区考虑
|
||||
IsVendorAct int `json:"isVendorAct"`
|
||||
Upc string `json:"upc"` //upc码
|
||||
ID int64 `orm:"column(id)" json:"id"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||
VendorSubOrderID string `orm:"column(vendor_sub_order_id);size(48)" json:"vendorSubOrderID"` // 子订单id
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
StoreSubID int `orm:"column(store_sub_id)" json:"storeSubID"` // EarningActID,当前这个字段被当成结算活动ID用
|
||||
StoreSubName string `orm:"size(64)" json:"storeSubName"` // 当前这个字段被用作vendorActType
|
||||
Count int `json:"count"`
|
||||
VendorSkuID string `orm:"column(vendor_sku_id);size(48)" json:"vendorSkuID"`
|
||||
SkuID int `orm:"column(sku_id)" json:"skuID"` // 外部系统里记录的 jxskuid
|
||||
JxSkuID int `orm:"column(jx_sku_id)" json:"jxSkuID"` // 根据VendorSkuID在本地系统里查询出来的 jxskuid
|
||||
SkuName string `orm:"size(255)" json:"skuName"`
|
||||
ShopPrice int64 `json:"shopPrice"` // 京西价
|
||||
VendorPrice int64 `json:"vendorPrice"` // 平台价
|
||||
SalePrice int64 `json:"salePrice"` // 售卖价
|
||||
EarningPrice int64 `json:"earningPrice"` // 活动商品设置,结算给门店老板的钱,如果结算活动ID为0,是按结算比例算的,否则就是结算表中的值
|
||||
Weight int `json:"weight"` // 单位为克
|
||||
SkuType int `json:"skuType"` // 当前如果为gift就为1,否则缺省为0
|
||||
PromotionType int `json:"promotionType"` // todo 当前是用于记录京东的PromotionType(生成jxorder用),没有做转换
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"-"` // 分区考虑
|
||||
IsVendorAct int `json:"isVendorAct"`
|
||||
Upc string `json:"upc"` //upc码
|
||||
}
|
||||
|
||||
// 同样商品在一个订单中可能重复出现(比如搞活动时,相同商品价格不一样,第一个有优惠)
|
||||
|
||||
@@ -103,25 +103,26 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode string, vendorOrderID int64, ve
|
||||
if len(*orderDetail.SubOrderResponseList) > 0 {
|
||||
for _, extra := range *orderDetail.SubOrderResponseList {
|
||||
sku := &model.OrderSku{
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
VendorID: model.VendorIDTaoVegetable,
|
||||
StoreSubID: 0,
|
||||
StoreSubName: "",
|
||||
Count: utils.Float64TwoInt(*extra.BuySaleQuantity),
|
||||
VendorSkuID: *extra.SkuCode,
|
||||
SkuID: utils.Str2Int(*extra.SkuCode),
|
||||
JxSkuID: utils.Str2Int(*extra.SkuCode),
|
||||
SkuName: *extra.SkuName,
|
||||
ShopPrice: *extra.Price,
|
||||
VendorPrice: *extra.OriginalFee / utils.Float64TwoInt64(*extra.BuySaleQuantity),
|
||||
SalePrice: *extra.OriginalFee / utils.Float64TwoInt64(*extra.BuySaleQuantity),
|
||||
EarningPrice: 0,
|
||||
Weight: int(*extra.Weight / utils.Float64TwoInt64(*extra.BuySaleQuantity)),
|
||||
SkuType: 0,
|
||||
PromotionType: 0,
|
||||
OrderCreatedAt: order.OrderCreatedAt,
|
||||
IsVendorAct: 0,
|
||||
Upc: *extra.Barcode,
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
VendorID: model.VendorIDTaoVegetable,
|
||||
StoreSubID: 0,
|
||||
StoreSubName: "",
|
||||
Count: utils.Float64TwoInt(*extra.BuySaleQuantity),
|
||||
VendorSkuID: *extra.SkuCode,
|
||||
SkuID: utils.Str2Int(*extra.SkuCode),
|
||||
JxSkuID: utils.Str2Int(*extra.SkuCode),
|
||||
SkuName: *extra.SkuName,
|
||||
ShopPrice: *extra.Price,
|
||||
VendorPrice: *extra.OriginalFee / utils.Float64TwoInt64(*extra.BuySaleQuantity),
|
||||
SalePrice: *extra.OriginalFee / utils.Float64TwoInt64(*extra.BuySaleQuantity),
|
||||
EarningPrice: 0,
|
||||
Weight: int(*extra.Weight / utils.Float64TwoInt64(*extra.BuySaleQuantity)),
|
||||
SkuType: 0,
|
||||
PromotionType: 0,
|
||||
OrderCreatedAt: order.OrderCreatedAt,
|
||||
IsVendorAct: 0,
|
||||
Upc: *extra.Barcode,
|
||||
VendorSubOrderID: utils.Int64ToStr(*extra.BizSubOrderId),
|
||||
}
|
||||
|
||||
activityId := make([]int64, 0)
|
||||
|
||||
@@ -33,7 +33,7 @@ func orderStatusChangeNotice(order *model.GoodsOrder, orderStatus string) (*requ
|
||||
}
|
||||
for _, v := range skuList {
|
||||
workCallbackSubOrderInfo := domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackSubOrderInfo{
|
||||
BizSubOrderId: nil,
|
||||
BizSubOrderId: utils.Int64ToPointer(utils.Str2Int64(v.VendorSubOrderID)),
|
||||
SkuCode: utils.String2Pointer(v.VendorSkuID),
|
||||
PickSaleQuantity: utils.String2Pointer(utils.Int2Str(v.Count)),
|
||||
PickStockQuantity: utils.String2Pointer(utils.Int2Str(v.Count)),
|
||||
|
||||
Reference in New Issue
Block a user