|
|
@@ -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, |
|
|
@@ -152,6 +153,7 @@ func agentDeduct(oid string, base map[string]string, price string) (error, int) |
|
|
|
return e.NewErr(400, "平台预存款扣除失败!"), 0 |
|
|
|
} |
|
|
|
var flow = &model.ExpressAgentMoneyFlow{ |
|
|
|
Puid: utils.StrToInt(base["puid"]), |
|
|
|
Uid: user.Uid, |
|
|
|
Type: 0, |
|
|
|
Time: time.Now(), |
|
|
@@ -173,11 +175,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) |
|
|
|