作者 陈志颖

合并分支 'v0.7.0-dev' 到 'dev'

fix:高管查看合伙人编号



查看合并请求 !10
@@ -127,10 +127,28 @@ func newCompany(company *domain.Company, p *domain.PartnerStatics) userx.Company @@ -127,10 +127,28 @@ func newCompany(company *domain.Company, p *domain.PartnerStatics) userx.Company
127 Name: company.Name, 127 Name: company.Name,
128 Phone: company.Phone, 128 Phone: company.Phone,
129 //SerialNo: p.Id, 129 //SerialNo: p.Id,
130 - CooperateTime: p.CooperateTime.Unix() * 1000,  
131 - MiniProgram: nil,  
132 - District: map[string]interface{}{"id": p.RegionInfo.RegionId, "name": p.RegionInfo.RegionName}, 130 + CareerSerialNo: "",
  131 + BusinessSerialNo: "",
  132 + DevelopSerialNo: "",
  133 + AppSerialNo: "",
  134 + CooperateTime: p.CooperateTime.Unix() * 1000,
  135 + MiniProgram: nil,
  136 + District: map[string]interface{}{"id": p.RegionInfo.RegionId, "name": p.RegionInfo.RegionName},
133 } 137 }
  138 +
  139 + //获取合伙人编号
  140 + for _, partnerCategoryInfo := range p.PartnerCategoryInfos {
  141 + if partnerCategoryInfo.Id == 1 {
  142 + partnerCompany.CareerSerialNo = partnerCategoryInfo.Code
  143 + } else if partnerCategoryInfo.Id == 2 {
  144 + partnerCompany.BusinessSerialNo = partnerCategoryInfo.Code
  145 + } else if partnerCategoryInfo.Id == 3 {
  146 + partnerCompany.DevelopSerialNo = partnerCategoryInfo.Code
  147 + } else if partnerCategoryInfo.Id == 4 {
  148 + partnerCompany.AppSerialNo = partnerCategoryInfo.Code
  149 + }
  150 + }
  151 +
134 if len(p.Salesman) > 0 { 152 if len(p.Salesman) > 0 {
135 partnerCompany.Salesman = map[string]interface{}{"uname": p.Salesman[0].Name, "phone": p.Salesman[0].Telephone} 153 partnerCompany.Salesman = map[string]interface{}{"uname": p.Salesman[0].Name, "phone": p.Salesman[0].Telephone}
136 } else { 154 } else {