update
continuous-integration/drone/push Build is passing Details

master
kgdxpr 4 years ago
parent 35d23dab63
commit c9e33e2377

@ -4,8 +4,7 @@
<list default="true" id="19c8c37d-a056-451c-a29d-fb612b9a3e2f" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Business/ImRelate/ImRelateDao/ImRelateDao.go" beforeDir="false" afterPath="$PROJECT_DIR$/Business/ImRelate/ImRelateDao/ImRelateDao.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Config/Config.ini" beforeDir="false" afterPath="$PROJECT_DIR$/Config/Config.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Utils/ConfigUtil/ConfigUtil.go" beforeDir="false" afterPath="$PROJECT_DIR$/Utils/ConfigUtil/ConfigUtil.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Utils/CommonUtil/CommonUtil.go" beforeDir="false" afterPath="$PROJECT_DIR$/Utils/CommonUtil/CommonUtil.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -43,7 +42,7 @@
<property name="go.import.settings.migrated" value="true" />
<property name="go.sdk.automatically.set" value="true" />
<property name="go.tried.to.enable.integration.vgo.integrator" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="last_opened_file_path" value="H:/Go_Test/Test03" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
</component>
<component name="RecentsManager">
@ -112,15 +111,4 @@
</map>
</environment>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="DlvLineBreakpoint">
<url>file://$PROJECT_DIR$/Business/ImRelate/ImRelateDao/ImRelateDao.go</url>
<line>430</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project>

@ -13,7 +13,6 @@ import (
"github.com/astaxie/beego/httplib"
"github.com/rongcloud/server-sdk-go/v3/sdk"
"github.com/xormplus/xorm"
"net/http"
"strconv"
"strings"
)
@ -403,30 +402,7 @@ func SaveGroup(groupName string, personIdCookie string, identityIdCookie string,
req.Param("plat_type", "1")
req.Param("plat_id", "0")
req.SetCookie(&http.Cookie{
Name: "person_id",
Value: personIdCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "identity_id",
Value: identityIdCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "token",
Value: tokenCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "q_access_token",
Value: qAccessTokenCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
CommonUtil.AddCookie(req, personIdCookie, identityIdCookie, tokenCookie, qAccessTokenCookie)
resStr, err := req.String()
if err != nil {
@ -455,30 +431,7 @@ func AddGroupMember(groupId string, personList string, personIdCookie string, id
req.Param("pids", personList)
req.Param("random_num", CommonUtil.GetSixRandom())
req.SetCookie(&http.Cookie{
Name: "person_id",
Value: personIdCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "identity_id",
Value: identityIdCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "token",
Value: tokenCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "q_access_token",
Value: qAccessTokenCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
CommonUtil.AddCookie(req, personIdCookie, identityIdCookie, tokenCookie, qAccessTokenCookie)
resStr, err := req.String()
if err != nil {

@ -10,7 +10,9 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/astaxie/beego/httplib"
uuid "github.com/satori/go.uuid"
"net/http"
"log"
@ -245,3 +247,35 @@ func ConvertInterfaceToString(inter interface{}) string {
str := fmt.Sprintf("%v", inter)
return str
}
/**
Cookie
2021-09-13
*/
func AddCookie(req *httplib.BeegoHTTPRequest, personIdCookie string, identityIdCookie string, tokenCookie string, qAccessTokenCookie string) {
req.SetCookie(&http.Cookie{
Name: "person_id",
Value: personIdCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "identity_id",
Value: identityIdCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "token",
Value: tokenCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
req.SetCookie(&http.Cookie{
Name: "q_access_token",
Value: qAccessTokenCookie,
Path: "/",
Domain: ConfigUtil.DsidealYyDomain,
})
}

Loading…
Cancel
Save