作者 tangxuhui

数据结构调整

package domain
import "testing"
func TestTokenParse(t *testing.T) {
tk := LoginToken{}
str := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Mjk4NzY3OTcsImlhdCI6MTYyOTg2OTU5NywiaXNzIjoiYWxsaWVkX2NyZWF0aW9uX2dhdGV3YXkiLCJuYmYiOjE2Mjk4Njk1OTcsInVzZXJJZCI6MSwidXNlckJhc2VJZCI6MSwiYWNjb3VudCI6IjE4ODYwMTgzMDUwIiwicGxhdGZvcm0iOiJhcHAiLCJjb21wYW55SWQiOjEsIm9yZ0lkIjoxLCJvcmdJZHMiOlsxLDU2XSwic2Vzc2lvbk1vZGUiOjF9.aDxfLwOpZCYWRhKa4GeKRh8sXsy2WOyt4X92uEEEXKg"
err := tk.ParseToken(str)
if err != nil {
t.Error(err)
}
t.Log("tk.Account=", tk.Account, " tk.CompanyId=", tk.CompanyId, " tk.OrgId=", tk.OrgId)
}
... ...
... ... @@ -70,7 +70,7 @@ type (
CooperationModeNumber string `json:"cooperationModeNumber"`
PublisherUid int `json:"publisherUid,string"`
SponsorUid int `json:"sponsorUid,string"`
DepartmentId int `json:"departmentId,string"`
DepartmentId int `json:"departmentId"`
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`
Attachment []*domain.Attachment `json:"attachment"`
}
... ... @@ -118,7 +118,7 @@ type (
// 共创项目描述
CooperationProjectDescription string `json:"cooperationProjectDescription"`
Attachment []domain.Attachment `json:"attachment"`
DepartmentId int `json:"departmentId,string"`
DepartmentId int `json:"departmentId"`
}
DataCooperationProjectUpdate struct {
... ...