修改用户ID和机构ID为int型

master
wujianhua 1 year ago
parent 0b2a2a4d44
commit 10bf349301
  1. 38
      sls/producer_test.go
  2. 4
      sls/types.go

@ -32,9 +32,43 @@ func TestProducer(t *testing.T) {
HttpTraceId: "0121",
XAppId: "LtEolTiV",
XUserData: &UserData{
ID: "1075",
ID: 1075,
Username: "用户名_IDdXdk4xSU",
OrganizeID: "223",
OrganizeID: 223,
OrganizeName: "新数据-机构06-权限",
Email: "",
Phone: "17800000051",
},
XDsmData: &DSMData{
AppKey: "ce2f8bcc2f64466d",
PageType: "LIST",
DataCount: 1,
DBData: make([]*DBCount, 0),
},
XCustomData: nil,
ResponseData: nil,
})
if err != nil {
t.Fail()
}
err = pd.SendRequestLog(enum.Env_preview, &Request{
Time: time.Now(),
RemoteAddr: "118.112.98.208",
QueryString: "test001",
RequestMethod: "POST",
RequestUri: "/dc/analyse/senior_aggregation",
Host: "intsynth-server.drugeyes.vip",
RequestBody: "{}",
HttpUserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 OPR/99.0.0.0",
HttpFinger: "59246b1e1639f4753bcd010bac2ddb01",
HttpReferrer: "http://intsynth-web.drugeyes.vip:7031/",
HttpTraceId: "0121",
XAppId: "LtEolTiV",
XUserData: &UserData{
ID: 1075,
Username: "用户名_IDdXdk4xSU",
OrganizeID: 223,
OrganizeName: "新数据-机构06-权限",
Email: "",
Phone: "17800000051",

@ -24,9 +24,9 @@ type Request struct {
// UserData 用户数据
type UserData struct {
ID string `json:"id"` // 用户ID
ID int32 `json:"id"` // 用户ID
Username string `json:"username"` // 用户名称
OrganizeID string `json:"organize_id"` // 组织ID
OrganizeID int32 `json:"organize_id"` // 组织ID
OrganizeName string `json:"organize_name"` // 组织名称
Phone string `json:"phone"` // 手机号
Email string `json:"email"` // 邮箱

Loading…
Cancel
Save