aa
This commit is contained in:
@@ -106,18 +106,22 @@ func OnCallback(call *mtunionapi.CallBackResult) (err error) {
|
|||||||
} else {
|
} else {
|
||||||
//new
|
//new
|
||||||
unionOrder := &model.UnionOrder{
|
unionOrder := &model.UnionOrder{
|
||||||
VendorOrderID: order.Order.Orderid,
|
VendorOrderID: order.Order.Orderid,
|
||||||
VendorID: model.VendorIDMTWM,
|
VendorID: model.VendorIDMTWM,
|
||||||
Status: mtunionOrderStatus2Jx(order.Order.Status),
|
Status: mtunionOrderStatus2Jx(order.Order.Status),
|
||||||
PID: order.Order.Sid,
|
PID: order.Order.Sid,
|
||||||
PayPrice: int(jxutils.StandardPrice2Int(utils.Str2Float64(order.Order.Direct))),
|
PayPrice: int(jxutils.StandardPrice2Int(utils.Str2Float64(order.Order.Direct))),
|
||||||
PromotionAmount: int(jxutils.StandardPrice2Int(utils.Str2Float64(order.Coupon[0].Profit))),
|
//PromotionAmount: int(jxutils.StandardPrice2Int(utils.Str2Float64(order.Coupon[0].Profit))),
|
||||||
GoodsName: order.Order.Smstitle,
|
GoodsName: order.Order.Smstitle,
|
||||||
GoodsID: order.Order.Dealid,
|
GoodsID: order.Order.Dealid,
|
||||||
OrderCreateAt: time.Unix(utils.Str2Int64(order.Order.Paytime), 0),
|
OrderCreateAt: time.Unix(utils.Str2Int64(order.Order.Paytime), 0),
|
||||||
OrderPayAt: time.Unix(utils.Str2Int64(order.Order.Paytime), 0),
|
OrderPayAt: time.Unix(utils.Str2Int64(order.Order.Paytime), 0),
|
||||||
OrderReceiveAt: time.Unix(utils.Str2Int64(order.Order.Modtime), 0),
|
OrderReceiveAt: time.Unix(utils.Str2Int64(order.Order.Modtime), 0),
|
||||||
OrderSettleAt: time.Unix(utils.Str2Int64(order.Coupon[0].Usetime), 0),
|
//OrderSettleAt: time.Unix(utils.Str2Int64(order.Coupon[0].Usetime), 0),
|
||||||
|
}
|
||||||
|
if len(order.Coupon) > 0 {
|
||||||
|
unionOrder.PromotionAmount = int(jxutils.StandardPrice2Int(utils.Str2Float64(order.Coupon[0].Profit)))
|
||||||
|
unionOrder.OrderSettleAt = time.Unix(utils.Str2Int64(order.Coupon[0].Usetime), 0)
|
||||||
}
|
}
|
||||||
cms.NewUnionOrder(unionOrder, orderStatus)
|
cms.NewUnionOrder(unionOrder, orderStatus)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user