- first version of order schedule.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/legacyorder"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
@@ -138,7 +139,7 @@ func (c *OrderController) legacyWriteJxOrder(order *model.GoodsOrder, db orm.Orm
|
||||
jxorder := &legacyorder.Jxorder2{
|
||||
VenderId: int8(order.VendorID),
|
||||
OrderId: utils.Str2Int64(order.VendorOrderID),
|
||||
JxStoreId: utils.Int2Str(GetJxStoreIDFromOrder(order)),
|
||||
JxStoreId: utils.Int2Str(jxutils.GetJxStoreIDFromOrder(order)),
|
||||
JxStoreName: order.StoreName,
|
||||
OrderNum: order.OrderSeq,
|
||||
OrderStatus: legacyMapOrderStatus(order.Status),
|
||||
@@ -172,7 +173,7 @@ func (c *OrderController) legacyWriteJxOrder(order *model.GoodsOrder, db orm.Orm
|
||||
params := []interface{}{}
|
||||
for _, sku := range order.Skus {
|
||||
sql += "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?),"
|
||||
params = append(params, sku.VendorID, sku.VendorOrderID, sku.JxSkuID, sku.SkuName, GetJxStoreIDFromOrder(order), sku.SalePrice, sku.Count, sku.SkuType, sku.PromotionType, 0, 0, "")
|
||||
params = append(params, sku.VendorID, sku.VendorOrderID, sku.JxSkuID, sku.SkuName, jxutils.GetJxStoreIDFromOrder(order), sku.SalePrice, sku.Count, sku.SkuType, sku.PromotionType, 0, 0, "")
|
||||
}
|
||||
sql = sql[:len(sql)-1] + ";"
|
||||
if _, err = db.Raw(sql, params...).Exec(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user