浏览代码

更新

order_statistics
huangjiajun 4 个月前
父节点
当前提交
5867b2286a
共有 2 个文件被更改,包括 18 次插入3 次删除
  1. +1
    -0
      app/db/model/express_order.go
  2. +17
    -3
      consume/zhios_express_order_fail.go

+ 1
- 0
app/db/model/express_order.go 查看文件

@@ -49,5 +49,6 @@ type ExpressOrder struct {
IsAgentSupplementPay int `json:"is_agent_supplement_pay" xorm:"default 0 INT(1)"`
Platform int `json:"platform" xorm:"default 0 INT(1)"`
Own int `json:"own" xorm:"default 0 INT(1)"`
ExpressPlatform int `json:"express_platform" xorm:"default 0 INT(1)"`
NeedDeduct string `json:"need_deduct" xorm:"default 0.00000000 DECIMAL(20,8)"`
}

+ 17
- 3
consume/zhios_express_order_fail.go 查看文件

@@ -79,7 +79,8 @@ func handleZhiosExpressOrderFail(msg []byte) error {
if ord.Status == "已退回" {
return nil
}
base := CommBase(mid)
ordExpressPlatform := utils.IntToStr(ord.ExpressPlatform)
base := CommBase(mid, ordExpressPlatform)
if canalMsg.IsFail != "1" { //查下订单详情
param := map[string]interface{}{
"clientOrderNo": canalMsg.Oid,
@@ -173,11 +174,24 @@ func AppUserListPuid(mid string) string {
if appList != nil && appList.Puid > 0 {
uid = utils.IntToStr(appList.Puid)
}

return uid
}
func AppUserListPuidNew(mid string, ordExpressPlatform string) string {
appList := offical.GetUserAppList(mid)
uid := "0"
if appList != nil && appList.Puid > 0 {
uid = utils.IntToStr(appList.Puid)
}
expressPlatform := offical.MasterListCfgGetOneData(uid, "express_platform_type")
if expressPlatform == "1" || ordExpressPlatform == "1" { //如果是1 走智莺官方
uid = "0"
}
return uid
}

func CommBase(mid string) map[string]string {
puid := AppUserListPuid(mid)
func CommBase(mid, ordExpressPlatform string) map[string]string {
puid := AppUserListPuidNew(mid, ordExpressPlatform)
key := puid + "_official_express_info"
stringStr, err := cache.GetString(key)
stringMap := make(map[string]string)


正在加载...
取消
保存