|
@@ -846,7 +846,7 @@ func (o *OrderListDetails) GetBidfileDetail() {
|
|
|
}
|
|
|
|
|
|
//bigm:0大会员订单详情页 1剑鱼币订单 3企业商机管理详情页 4订单数据展示(订单详情页面)
|
|
|
-func CommonDetail(bigm int, fields, userId, order_code string, session *httpsession.Session) (data, time map[string]interface{}, transaction_id string) {
|
|
|
+func CommonDetail(bigm int, fields, userId, order_code string, session *httpsession.Session) (data, timeMap map[string]interface{}, transaction_id string) {
|
|
|
//userId := qutil.ObjToString(o.GetSession("userId"))
|
|
|
data = map[string]interface{}{}
|
|
|
if userId != "" {
|
|
@@ -857,8 +857,13 @@ func CommonDetail(bigm int, fields, userId, order_code string, session *httpsess
|
|
|
info["user_id"] = userId
|
|
|
}
|
|
|
data = *util.Mysql.FindOne(tableName_order, info, fields, "")
|
|
|
-
|
|
|
if data != nil {
|
|
|
+ layout := "2006-01-02 15:04:05"
|
|
|
+ create_time := qutil.InterfaceToStr(data["create_time"])
|
|
|
+ t, err := time.Parse(layout, create_time)
|
|
|
+ if err == nil {
|
|
|
+ data["isNewOrder"] = qutil.If(t.Unix() >= config.Config.NewOrderTime, true, false)
|
|
|
+ }
|
|
|
data["source"] = LastInvoiceSource(qutil.InterfaceToStr(data["order_code"]))
|
|
|
if bigm == 0 || bigm == 4 {
|
|
|
//查询回款记录
|
|
@@ -925,9 +930,9 @@ func CommonDetail(bigm int, fields, userId, order_code string, session *httpsess
|
|
|
}
|
|
|
}
|
|
|
if qutil.IntAll(data["order_status"]) == 1 {
|
|
|
- time = map[string]interface{}{}
|
|
|
- time["vip_endtime"] = data["vip_endtime"]
|
|
|
- time["vip_starttime"] = data["vip_starttime"]
|
|
|
+ timeMap = map[string]interface{}{}
|
|
|
+ timeMap["vip_endtime"] = data["vip_endtime"]
|
|
|
+ timeMap["vip_starttime"] = data["vip_starttime"]
|
|
|
}
|
|
|
delete(data, "_id")
|
|
|
transaction_id = getPayTransactionId(qutil.ObjToString(data["pay_way"]), qutil.ObjToString(data["out_trade_no"]))
|
|
@@ -942,7 +947,7 @@ func CommonDetail(bigm int, fields, userId, order_code string, session *httpsess
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return data, time, transaction_id
|
|
|
+ return data, timeMap, transaction_id
|
|
|
}
|
|
|
|
|
|
func (o *OrderListDetails) JyPoint() {
|