|
|
@@ -213,19 +213,15 @@ func AddOrder(eg *xorm.Engine, method string, order map[string]interface{}, prd |
|
|
|
order["product_detail"] = utils.AnyToString(order["delivery_brand_name"]) + "-" + utils.AnyToString(order["delivery_goods_name"]) |
|
|
|
} |
|
|
|
var ord = &model.LifeOrder{ |
|
|
|
PvdOid: utils.AnyToString(order["order_no"]), |
|
|
|
GoodsTitle: utils.AnyToString(order["product_detail"]), |
|
|
|
Commission: utils.AnyToString(order["total_rebate"]), |
|
|
|
Platform: method, |
|
|
|
Uid: utils.StrToInt(uid), |
|
|
|
Payment: utils.AnyToString(order["settle_price"]), |
|
|
|
State: statusArr[utils.AnyToString(order["order_status"])], |
|
|
|
CreateAt: utils.TimeParseStd(utils.AnyToString(order["order_time"])), |
|
|
|
UpdateAt: time.Now(), |
|
|
|
PlatformSettleAt: utils.TimeParseStd(utils.AnyToString(order["modify_time"])), |
|
|
|
} |
|
|
|
if order["modify_time"] == "" || order["modify_time"] == nil { |
|
|
|
ord.PlatformSettleAt = time.Now() |
|
|
|
PvdOid: utils.AnyToString(order["order_no"]), |
|
|
|
GoodsTitle: utils.AnyToString(order["product_detail"]), |
|
|
|
Commission: utils.AnyToString(order["total_rebate"]), |
|
|
|
Platform: method, |
|
|
|
Uid: utils.StrToInt(uid), |
|
|
|
Payment: utils.AnyToString(order["settle_price"]), |
|
|
|
State: statusArr[utils.AnyToString(order["order_status"])], |
|
|
|
CreateAt: utils.TimeParseStd(utils.AnyToString(order["order_time"])), |
|
|
|
UpdateAt: time.Now(), |
|
|
|
} |
|
|
|
NewLifeOrderDb := implement.NewLifeOrderDb(eg) |
|
|
|
one, _ := NewLifeOrderDb.GetLifeOrder(ord.PvdOid) |
|
|
|