...
|
...
|
@@ -94,11 +94,11 @@ type ContractUndertaker struct { |
|
|
Department domain.Department `json:"department"`
|
|
|
HasReferrer bool `json:"hasReferrer"`
|
|
|
HasSalesman bool `json:"hasSalesman"`
|
|
|
ReferrerUser struct {
|
|
|
ReferrerUser *struct {
|
|
|
UserId int `json:"userId,string,"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
} `json:"referrerUser"`
|
|
|
SalesmanUser struct {
|
|
|
SalesmanUser *struct {
|
|
|
UserId int `json:"userId,string,"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
} `json:"salesmanUser"`
|
...
|
...
|
@@ -189,14 +189,26 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon |
|
|
UserCode: v.UserInfo.UserCode,
|
|
|
},
|
|
|
}
|
|
|
if v.Salesman.UserId > 0 {
|
|
|
u.SalesmanUser = &struct {
|
|
|
UserId int `json:"userId,string,"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
}{}
|
|
|
u.SalesmanUser.UserId = v.Salesman.UserId
|
|
|
u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId
|
|
|
u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserName
|
|
|
u.SalesmanUser.UserInfo.Phone = v.Salesman.UserPhone
|
|
|
}
|
|
|
if v.Referrer.UserId > 0 {
|
|
|
u.ReferrerUser = &struct {
|
|
|
UserId int `json:"userId,string,"`
|
|
|
UserInfo domain.UserInfo `json:"userInfo"`
|
|
|
}{}
|
|
|
u.ReferrerUser.UserId = v.Referrer.UserId
|
|
|
u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId
|
|
|
u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserName
|
|
|
u.ReferrerUser.UserInfo.Phone = v.Referrer.UserPhone
|
|
|
}
|
|
|
contractUndertaker = append(contractUndertaker, u)
|
|
|
}
|
|
|
undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable
|
...
|
...
|
|