|
|
|
@ -128,7 +128,7 @@ func GetPersonAvatarUrl(fileId string, extension string, serverLocation string)
|
|
|
|
|
if serverLocation == "1" {
|
|
|
|
|
url = fmt.Sprintf("https://image.edusoa.com/down/Material/%s/%s.%s?x-image-process=image/resize,w_72,h_72/quality,q_100", fileId[0:2], fileId, extension)
|
|
|
|
|
} else {
|
|
|
|
|
url = fmt.Sprintf("%s/dsideal_yy/html/thumb/Material/%s/%s.%s@72w_72h_100Q_1x.png", ConfigUtil.DsidealYy, fileId[0:2], fileId, extension)
|
|
|
|
|
url = fmt.Sprintf("%s/dsideal_yy/html/thumb/Material/%s/%s.%s@72w_72h_100Q_1x.png", "http://"+ConfigUtil.DsidealYy, fileId[0:2], fileId, extension)
|
|
|
|
|
}
|
|
|
|
|
return url
|
|
|
|
|
}
|
|
|
|
@ -337,7 +337,7 @@ func GetPersonNameAvatar(fromId string, toId string, sendType string) (fromName,
|
|
|
|
|
日期:2021-09-06
|
|
|
|
|
*/
|
|
|
|
|
func GetServerLocation() string {
|
|
|
|
|
url := ConfigUtil.DsidealYy + "/dsideal_yy/golbal/getValueByKey"
|
|
|
|
|
url := "http://" + ConfigUtil.DsidealYy + "/dsideal_yy/golbal/getValueByKey"
|
|
|
|
|
req := httplib.Get(url)
|
|
|
|
|
req.Param("key", "common.server.location")
|
|
|
|
|
resStr, err := req.String()
|
|
|
|
@ -353,7 +353,7 @@ func GetServerLocation() string {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetPersonList(bureauId string, orgId string, queryChild string, bUse string, personName string, queryBureauChild string, pageNumber string, pageSize string) (string, error) {
|
|
|
|
|
req := httplib.Get(fmt.Sprintf("%s/dsideal_yy/admin/new_base/personInfo_GetPersonInfoList", ConfigUtil.DsidealYy))
|
|
|
|
|
req := httplib.Get(fmt.Sprintf("%s/dsideal_yy/admin/new_base/personInfo_GetPersonInfoList", "http://"+ConfigUtil.DsidealYy))
|
|
|
|
|
|
|
|
|
|
req.Param("bureau_id", bureauId)
|
|
|
|
|
req.Param("org_id", orgId)
|
|
|
|
@ -391,7 +391,7 @@ func GetPersonList(bureauId string, orgId string, queryChild string, bUse string
|
|
|
|
|
日期:2021-09-09
|
|
|
|
|
*/
|
|
|
|
|
func SaveGroup(groupName string, personIdCookie string, identityIdCookie string, tokenCookie string, qAccessTokenCookie string) (string, error) {
|
|
|
|
|
req := httplib.Post(fmt.Sprintf("%s/dsideal_yy/ypt/group/saveGroup", ConfigUtil.DsidealYy))
|
|
|
|
|
req := httplib.Post(fmt.Sprintf("%s/dsideal_yy/ypt/group/saveGroup", "http://"+ConfigUtil.DsidealYy))
|
|
|
|
|
|
|
|
|
|
req.Param("group_name", groupName)
|
|
|
|
|
req.Param("group_desc", "")
|
|
|
|
@ -407,25 +407,25 @@ func SaveGroup(groupName string, personIdCookie string, identityIdCookie string,
|
|
|
|
|
Name: "person_id",
|
|
|
|
|
Value: personIdCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
req.SetCookie(&http.Cookie{
|
|
|
|
|
Name: "identity_id",
|
|
|
|
|
Value: identityIdCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
req.SetCookie(&http.Cookie{
|
|
|
|
|
Name: "token",
|
|
|
|
|
Value: tokenCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
req.SetCookie(&http.Cookie{
|
|
|
|
|
Name: "q_access_token",
|
|
|
|
|
Value: qAccessTokenCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
resStr, err := req.String()
|
|
|
|
@ -449,7 +449,7 @@ func SaveGroup(groupName string, personIdCookie string, identityIdCookie string,
|
|
|
|
|
日期:2021-09-09
|
|
|
|
|
*/
|
|
|
|
|
func AddGroupMember(groupId string, personList string, personIdCookie string, identityIdCookie string, tokenCookie string, qAccessTokenCookie string) error {
|
|
|
|
|
req := httplib.Post(fmt.Sprintf("%s/dsideal_yy/ypt/group/addMember", ConfigUtil.DsidealYy))
|
|
|
|
|
req := httplib.Post(fmt.Sprintf("%s/dsideal_yy/ypt/group/addMember", "http://"+ConfigUtil.DsidealYy))
|
|
|
|
|
|
|
|
|
|
req.Param("groupId", groupId)
|
|
|
|
|
req.Param("pids", personList)
|
|
|
|
@ -459,25 +459,25 @@ func AddGroupMember(groupId string, personList string, personIdCookie string, id
|
|
|
|
|
Name: "person_id",
|
|
|
|
|
Value: personIdCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
req.SetCookie(&http.Cookie{
|
|
|
|
|
Name: "identity_id",
|
|
|
|
|
Value: identityIdCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
req.SetCookie(&http.Cookie{
|
|
|
|
|
Name: "token",
|
|
|
|
|
Value: tokenCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
req.SetCookie(&http.Cookie{
|
|
|
|
|
Name: "q_access_token",
|
|
|
|
|
Value: qAccessTokenCookie,
|
|
|
|
|
Path: "/",
|
|
|
|
|
Domain: "10.10.14.199",
|
|
|
|
|
Domain: ConfigUtil.DsidealYy,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
resStr, err := req.String()
|
|
|
|
|