| | |
| | | package service |
| | | |
| | | import ( |
| | | "aps_crm/model/response" |
| | | "aps_crm/pkg/ecode" |
| | | ) |
| | | |
| | | type DataServer struct{} |
| | | |
| | | func (DataServer) GetAllData() (errCode int, data response.DataResponse) { |
| | | // get country list |
| | | countryList, _ := ServiceGroup.GetCountryList() |
| | | data.Country = countryList |
| | | |
| | | // get province list |
| | | provinceList, _ := ServiceGroup.GetProvinces(0) |
| | | data.Province = provinceList |
| | | |
| | | // get city list |
| | | cityList, _ := ServiceGroup.ListCities(0) |
| | | data.City = cityList |
| | | |
| | | // get region list |
| | | regionList, _ := ServiceGroup.ListRegions(0) |
| | | data.Region = regionList |
| | | |
| | | // get client level list |
| | | clientLevelList, _ := ServiceGroup.GetClientLevelList() |
| | | data.ClientLevel = clientLevelList |
| | | |
| | | // get client status list |
| | | clientStatusList, _ := ServiceGroup.GetClientStatusList() |
| | | data.ClientStatus = clientStatusList |
| | | |
| | | // get client type list |
| | | clientTypeList, _ := ServiceGroup.GetClientTypeList() |
| | | data.ClientType = clientTypeList |
| | | |
| | | // get client Origin list |
| | | clientOriginList, _ := ServiceGroup.GetClientOriginList() |
| | | data.ClientOrigin = clientOriginList |
| | | |
| | | // get Industry list |
| | | industryList, _ := ServiceGroup.GetIndustryList() |
| | | data.Industry = industryList |
| | | |
| | | // get EnterpriseNature list |
| | | enterpriseNatureList, _ := ServiceGroup.GetEnterpriseNatureList() |
| | | data.EnterpriseNature = enterpriseNatureList |
| | | |
| | | // get RegisterCapital list |
| | | registerCapitalList, _ := ServiceGroup.GetRegisteredCapitalList() |
| | | data.RegisteredCapital = registerCapitalList |
| | | |
| | | // get EnterpriseScale list |
| | | enterpriseScaleList, _ := ServiceGroup.GetEnterpriseScaleList() |
| | | data.EnterpriseScale = enterpriseScaleList |
| | | |
| | | // get SalesStage list |
| | | salesStageList, _ := ServiceGroup.GetSaleStageList() |
| | | data.SaleStage = salesStageList |
| | | |
| | | // get SalesType list |
| | | salesTypeList, _ := ServiceGroup.GetSaleTypeList() |
| | | data.SaleType = salesTypeList |
| | | |
| | | // get SalesSource list |
| | | salesSourceList, _ := ServiceGroup.GetSalesSourcesList() |
| | | data.SalesSource = salesSourceList |
| | | |
| | | // get RegularCustomer list |
| | | regularCustomerList, _ := ServiceGroup.GetRegularCustomersList() |
| | | data.RegularCustomers = regularCustomerList |
| | | |
| | | errCode = ecode.OK |
| | | |
| | | return |
| | | } |