fix
fix public sea to query params
| | |
| | | RegionId: params.RegionId, |
| | | CountryId: params.CountryId, |
| | | }, |
| | | DetailAddress: params.DetailAddress, |
| | | } |
| | | |
| | | return ecode.OK, salesLeads |
| | |
| | | UserTypeSub // 子账户 |
| | | ) |
| | | |
| | | type NotAdmin int |
| | | |
| | | const ( |
| | | NotAdminAll NotAdmin = iota // 公海 |
| | | NotAdminYes // 我的客户 |
| | | ) |
| | | |
| | | type SalesStatus int |
| | | |
| | | const ( |
| | |
| | | "desc": { |
| | | "type": "string" |
| | | }, |
| | | "detail_address": { |
| | | "type": "string" |
| | | }, |
| | | "followRecord": { |
| | | "type": "array", |
| | | "items": { |
| | |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "detail_address": { |
| | | "description": "详细地址", |
| | | "type": "string" |
| | | }, |
| | | "member_id": { |
| | | "description": "销售负责人ID", |
| | | "type": "integer" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "search_map": { |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\",\"representative\": \"法定代表人\", \"registration_time\": \"注册时间\", \"business_scope\": \"经营范围\", \"remark\": \"备注\"}", |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\",\"representative\": \"法定代表人\", \"registration_time\": \"注册时间\", \"business_scope\": \"经营范围\", \"remark\": \"备注\", \"not_admin\":\"1:我的客户; 2:admin客户\"}", |
| | | "type": "object", |
| | | "additionalProperties": true |
| | | } |
| | |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "detail_address": { |
| | | "description": "详细地址", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | "desc": { |
| | | "type": "string" |
| | | }, |
| | | "detail_address": { |
| | | "type": "string" |
| | | }, |
| | | "followRecord": { |
| | | "type": "array", |
| | | "items": { |
| | |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "detail_address": { |
| | | "description": "详细地址", |
| | | "type": "string" |
| | | }, |
| | | "member_id": { |
| | | "description": "销售负责人ID", |
| | | "type": "integer" |
| | |
| | | "type": "integer" |
| | | }, |
| | | "search_map": { |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\",\"representative\": \"法定代表人\", \"registration_time\": \"注册时间\", \"business_scope\": \"经营范围\", \"remark\": \"备注\"}", |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\",\"representative\": \"法定代表人\", \"registration_time\": \"注册时间\", \"business_scope\": \"经营范围\", \"remark\": \"备注\", \"not_admin\":\"1:我的客户; 2:admin客户\"}", |
| | | "type": "object", |
| | | "additionalProperties": true |
| | | } |
| | |
| | | "description": "备注", |
| | | "type": "string" |
| | | }, |
| | | "detail_address": { |
| | | "description": "详细地址", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | type: integer |
| | | desc: |
| | | type: string |
| | | detail_address: |
| | | type: string |
| | | followRecord: |
| | | items: |
| | | $ref: '#/definitions/model.FollowRecord' |
| | |
| | | desc: |
| | | description: 备注 |
| | | type: string |
| | | detail_address: |
| | | description: 详细地址 |
| | | type: string |
| | | member_id: |
| | | description: 销售负责人ID |
| | | type: integer |
| | |
| | | "phone": "手机号码", "detail_address":"详细地址", "next_visit_time":"下回回访日期", "member_name": |
| | | "销售负责人", "client_status": "客户状态", "client_level": "重要级别","representative": |
| | | "法定代表人", "registration_time": "注册时间", "business_scope": "经营范围", "remark": |
| | | "备注"}' |
| | | "备注", "not_admin":"1:我的客户; 2:admin客户"}' |
| | | type: object |
| | | type: object |
| | | request.GetContactList: |
| | |
| | | desc: |
| | | description: 备注 |
| | | type: string |
| | | detail_address: |
| | | description: 详细地址 |
| | | type: string |
| | | id: |
| | | type: integer |
| | | member_id: |
| | |
| | | } |
| | | |
| | | case int: |
| | | case int64: |
| | | case float64: |
| | | if key == "id" || key == "client_type_id" || key == "client_status_id" || key == "member_id" { |
| | | db = db.Where(key+" = ?", v) |
| | | } |
| | | |
| | | if key == "not_admin" { |
| | | if v == float64(constvar.NotAdminYes) { |
| | | db = db.Where("member_id != ?", constvar.UserTypeSuper) |
| | | } else { |
| | | db = db.Where("member_id = ?", constvar.UserTypeSuper) |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | type GetClientList struct { |
| | | PageInfo |
| | | SearchMap map[string]interface{} `json:"search_map"` // 搜索条件: map[string]interface{}{"name": "xxx"}; {"name": "客户名称", "phone": "手机号码", "detail_address":"详细地址", "next_visit_time":"下回回访日期", "member_name": "销售负责人", "client_status": "客户状态", "client_level": "重要级别","representative": "法定代表人", "registration_time": "注册时间", "business_scope": "经营范围", "remark": "备注"} |
| | | SearchMap map[string]interface{} `json:"search_map"` // 搜索条件: map[string]interface{}{"name": "xxx"}; {"name": "客户名称", "phone": "手机号码", "detail_address":"详细地址", "next_visit_time":"下回回访日期", "member_name": "销售负责人", "client_status": "客户状态", "client_level": "重要级别","representative": "法定代表人", "registration_time": "注册时间", "business_scope": "经营范围", "remark": "备注", "not_admin":"1:我的客户; 2:admin客户"} |
| | | } |
| | | |
| | | type DeleteClient struct { |
| | |
| | | SalesSourcesId int `json:"sales_sources_id"` // 商机来源ID |
| | | MemberId int `json:"member_id"` // 销售负责人ID |
| | | Desc string `json:"desc"` // 备注 |
| | | DetailAddress string `json:"detail_address"` // 详细地址 |
| | | Address |
| | | } |
| | | |
| | |
| | | Desc string `json:"desc" gorm:"column:desc;type:varchar(255);comment:备注"` |
| | | Reason string `json:"reason" gorm:"column:reason;type:text;comment:失败原因"` |
| | | FollowRecord []FollowRecord `gorm:"foreignKey:SalesLeadsId"` |
| | | DetailAddress string `json:"detail_address" gorm:"column:detail_address;type:varchar(255);comment:详细地址"` |
| | | Address |
| | | gorm.Model `json:"-"` |
| | | } |