|
@@ -149,10 +149,34 @@ func PDDTurnChain(eg *xorm.Engine, dbName string, args map[string]string) (*md.C |
|
|
} |
|
|
} |
|
|
miniApp := "0" |
|
|
miniApp := "0" |
|
|
isShares := "2" |
|
|
isShares := "2" |
|
|
|
|
|
masterPid := pid |
|
|
|
|
|
pddPidData, _ := pdd.NewZhiMengPDDSDK(). |
|
|
|
|
|
SelectFunction("get_pid_list"). |
|
|
|
|
|
WithArgs(map[string]interface{}{ |
|
|
|
|
|
"appkey": db.SysCfgGetWithDb(eg, dbName, md.KEY_CFG_ZM_AK), |
|
|
|
|
|
"secret_key": db.SysCfgGetWithDb(eg, dbName, md.KEY_CFG_ZM_SK), |
|
|
|
|
|
"pid": masterPid}, |
|
|
|
|
|
).Result() |
|
|
|
|
|
if pddPidData != nil { |
|
|
|
|
|
b, _ := json.Marshal(pddPidData.ToInterface()) |
|
|
|
|
|
pddPid := gjson.GetBytes(b, "pdd_pid").String() |
|
|
|
|
|
if pddPid == "" { |
|
|
|
|
|
profile, _ := db.UserProfileFindByID(eg, 0) |
|
|
|
|
|
if profile != nil { |
|
|
|
|
|
masterPid = profile.AccPddSelfId |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
profile, _ := db.UserProfileFindByID(eg, 0) |
|
|
|
|
|
if profile != nil { |
|
|
|
|
|
masterPid = profile.AccPddSelfId |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
urls, err = zhimeng.PDDConvertUrl( |
|
|
urls, err = zhimeng.PDDConvertUrl( |
|
|
thirdZmAppKeyData.Val, |
|
|
thirdZmAppKeyData.Val, |
|
|
thirdZmAppSecretData.Val, |
|
|
thirdZmAppSecretData.Val, |
|
|
args["gid"], |
|
|
args["gid"], |
|
|
|
|
|
masterPid, |
|
|
pid, |
|
|
pid, |
|
|
"", |
|
|
"", |
|
|
miniApp, |
|
|
miniApp, |
|
@@ -349,10 +373,34 @@ func ConvertUrl(eg *xorm.Engine, args map[string]string) (*md.ConvertedUrls, err |
|
|
} |
|
|
} |
|
|
miniApp := "0" |
|
|
miniApp := "0" |
|
|
isShares := "2" |
|
|
isShares := "2" |
|
|
|
|
|
masterPid := pid |
|
|
|
|
|
pddPidData, _ := pdd.NewZhiMengPDDSDK(). |
|
|
|
|
|
SelectFunction("get_pid_list"). |
|
|
|
|
|
WithArgs(map[string]interface{}{ |
|
|
|
|
|
"appkey": db.SysCfgGetWithDb(eg, args["master_id"], md.KEY_CFG_ZM_AK), |
|
|
|
|
|
"secret_key": db.SysCfgGetWithDb(eg, args["master_id"], md.KEY_CFG_ZM_SK), |
|
|
|
|
|
"pid": masterPid}, |
|
|
|
|
|
).Result() |
|
|
|
|
|
if pddPidData != nil { |
|
|
|
|
|
b, _ := json.Marshal(pddPidData.ToInterface()) |
|
|
|
|
|
pddPid := gjson.GetBytes(b, "pdd_pid").String() |
|
|
|
|
|
if pddPid == "" { |
|
|
|
|
|
profile, _ := db.UserProfileFindByID(eg, 0) |
|
|
|
|
|
if profile != nil { |
|
|
|
|
|
masterPid = profile.AccPddSelfId |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
profile, _ := db.UserProfileFindByID(eg, 0) |
|
|
|
|
|
if profile != nil { |
|
|
|
|
|
masterPid = profile.AccPddSelfId |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
urls, err = zhimeng.PDDConvertUrl( |
|
|
urls, err = zhimeng.PDDConvertUrl( |
|
|
thirdZmAppKeyData.Val, |
|
|
thirdZmAppKeyData.Val, |
|
|
thirdZmAppSecretData.Val, |
|
|
thirdZmAppSecretData.Val, |
|
|
args["gid"], |
|
|
args["gid"], |
|
|
|
|
|
masterPid, |
|
|
pid, |
|
|
pid, |
|
|
"", |
|
|
"", |
|
|
miniApp, |
|
|
miniApp, |
|
|