|
@@ -51,18 +51,16 @@ func OrderList(args map[string]string) map[string]interface{} { |
|
|
func CommOrder(v interface{}, statusArr map[string]string, types string) map[string]string { |
|
|
func CommOrder(v interface{}, statusArr map[string]string, types string) map[string]string { |
|
|
tmp := make(map[string]string) |
|
|
tmp := make(map[string]string) |
|
|
goods := v.(map[string]interface{}) |
|
|
goods := v.(map[string]interface{}) |
|
|
pidInfo, ok := goods["pid_info"].(map[string]interface{}) |
|
|
|
|
|
mediaTypeName := "" |
|
|
|
|
|
if ok == false { |
|
|
|
|
|
return tmp |
|
|
|
|
|
|
|
|
methodType := "csjp" |
|
|
|
|
|
if zhios_third_party_utils.AnyToString(goods["media_type_name"]) == "Live" { |
|
|
|
|
|
methodType = "csjp_live" |
|
|
} |
|
|
} |
|
|
mediaTypeName = zhios_third_party_utils.AnyToString(pidInfo["media_type_name"]) |
|
|
|
|
|
tmp = map[string]string{ |
|
|
tmp = map[string]string{ |
|
|
"pid": zhios_third_party_utils.AnyToString(pidInfo["pid"]), |
|
|
|
|
|
|
|
|
"pid": zhios_third_party_utils.AnyToString(goods["app_id"]), |
|
|
"oid": zhios_third_party_utils.AnyToString(goods["order_id"]), |
|
|
"oid": zhios_third_party_utils.AnyToString(goods["order_id"]), |
|
|
"info": zhios_third_party_utils.AnyToString(goods["product_name"]), |
|
|
"info": zhios_third_party_utils.AnyToString(goods["product_name"]), |
|
|
"num": zhios_third_party_utils.AnyToString(goods["item_num"]), |
|
|
|
|
|
"type": zhios_third_party_utils.AnyToString(mediaTypeName), |
|
|
|
|
|
|
|
|
"num": "1", |
|
|
|
|
|
"type": methodType, |
|
|
"product_id": zhios_third_party_utils.AnyToString(goods["product_id"]), |
|
|
"product_id": zhios_third_party_utils.AnyToString(goods["product_id"]), |
|
|
"product_img": zhios_third_party_utils.AnyToString(goods["product_img"]), |
|
|
"product_img": zhios_third_party_utils.AnyToString(goods["product_img"]), |
|
|
"payment": zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["total_pay_amount"]) / 100), |
|
|
"payment": zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["total_pay_amount"]) / 100), |
|
@@ -73,7 +71,10 @@ func CommOrder(v interface{}, statusArr map[string]string, types string) map[str |
|
|
"lm_js_time": "", |
|
|
"lm_js_time": "", |
|
|
"mid": "", |
|
|
"mid": "", |
|
|
} |
|
|
} |
|
|
external_info := zhios_third_party_utils.AnyToString(pidInfo["external_info"]) |
|
|
|
|
|
|
|
|
if zhios_third_party_utils.AnyToString(goods["after_sales_status"]) == "2" { |
|
|
|
|
|
tmp["status"] = "订单退款" |
|
|
|
|
|
} |
|
|
|
|
|
external_info := zhios_third_party_utils.AnyToString(goods["external_info"]) |
|
|
tmp["is_share"] = "0" |
|
|
tmp["is_share"] = "0" |
|
|
split := strings.Split(external_info, "_") |
|
|
split := strings.Split(external_info, "_") |
|
|
if len(split) > 1 { |
|
|
if len(split) > 1 { |
|
@@ -100,18 +101,11 @@ func CommOrder(v interface{}, statusArr map[string]string, types string) map[str |
|
|
tmp["mid"] = split[2] |
|
|
tmp["mid"] = split[2] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if tmp["type"] == "Live" || tmp["type"] == "Activity" || tmp["type"] == "Mix" || tmp["type"] == "ActivityMaterial" || types == "dk" { |
|
|
|
|
|
tmp["commission"] = zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["ads_estimated_commission"]) / 100) |
|
|
|
|
|
if zhios_third_party_utils.AnyToFloat64(goods["ads_real_commission"]) > 0 { |
|
|
|
|
|
tmp["commission"] = zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["ads_real_commission"]) / 100) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if tmp["type"] == "ProductDetail" && types == "" { |
|
|
|
|
|
tmp["commission"] = zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["estimated_commission"]) / 100) |
|
|
|
|
|
if zhios_third_party_utils.AnyToFloat64(goods["real_commission"]) > 0 { |
|
|
|
|
|
tmp["commission"] = zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["real_commission"]) / 100) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
tmp["commission"] = zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["estimated_commission"]) / 100) |
|
|
|
|
|
if zhios_third_party_utils.AnyToFloat64(goods["ads_real_commission"]) > 0 { |
|
|
|
|
|
tmp["commission"] = zhios_third_party_utils.AnyToString(zhios_third_party_utils.AnyToFloat64(goods["ads_real_commission"]) / 100) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if zhios_third_party_utils.AnyToString(goods["refund_time"]) != "" { |
|
|
if zhios_third_party_utils.AnyToString(goods["refund_time"]) != "" { |
|
|
tmp["refund_time"] = zhios_third_party_utils.Int64ToStr(zhios_third_party_utils.TimeStdParseUnix(zhios_third_party_utils.AnyToString(goods["pay_success_time"]))) |
|
|
tmp["refund_time"] = zhios_third_party_utils.Int64ToStr(zhios_third_party_utils.TimeStdParseUnix(zhios_third_party_utils.AnyToString(goods["pay_success_time"]))) |
|
|
} |
|
|
} |
|
|