Selaa lähdekoodia

更新

master
huangjiajun 1 vuosi sitten
vanhempi
commit
baf0107631
1 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. +12
    -0
      app/task/svc/svc_meituan_order.go

+ 12
- 0
app/task/svc/svc_meituan_order.go Näytä tiedosto

@@ -7,6 +7,7 @@ import (
md2 "applet/app/md"
"applet/app/utils"
"code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/meituan_cps"
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
"encoding/json"
"fmt"
"github.com/tidwall/gjson"
@@ -128,6 +129,13 @@ func OrdersMeituanGet(nextPositionIndex string, pageSize int, sTime, eTime int64
"5": "风控",
"6": "订单结算",
}
var meituanState1 = map[string]string{
"1": "订单付款",
"2": "订单完成",
"4": "订单失效",
"5": "风控",
"3": "订单结算",
}
for _, v := range list {
var res = model.LifeOrder{
PvdParentOid: v.OrderId,
@@ -157,6 +165,7 @@ func OrdersMeituanGet(nextPositionIndex string, pageSize int, sTime, eTime int64
if ok {
if len(orderDetail) > 0 {
allEnd := "1"
Profit = "0"
for k1, v1 := range orderDetail {
v2, ok1 := v1.(map[string]interface{})
if ok1 {
@@ -169,9 +178,12 @@ func OrdersMeituanGet(nextPositionIndex string, pageSize int, sTime, eTime int64
if utils.InArr(utils.AnyToString(v2["couponStatus"]), []string{"1", "2", "3"}) {
allEnd = "0"
}
Profit = zhios_third_party_utils.Float64ToStr(utils.StrToFloat64(Profit) + utils.AnyToFloat64(v2["couponFee"]))
}
}
if allEnd == "0" {
res.Status = meituanState1[state]

res.PlatformSettleTime = 0
}
}


Ladataan…
Peruuta
Tallenna