fix
add query param to contact
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "添加服务合同状态", |
| | | "summary": "添加合同状态", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "删除服务合同状态", |
| | | "summary": "删除合同状态", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "获取服务合同状态列表", |
| | | "summary": "获取合同状态列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "name": "keyword", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "type": "string", |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusKeywordCustomerName" |
| | | ], |
| | | "name": "keywordType", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | | "name": "page", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "type": "string", |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusQueryClassExpireLessThen60Days" |
| | | ], |
| | | "name": "queryClass", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.ServiceContractStatusResponse" |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.ServiceContractStatus" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "更新服务合同状态", |
| | | "summary": "更新合同状态", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdateServiceContractStatuss" |
| | | "$ref": "#/definitions/request.UpdateServiceContractStatus" |
| | | } |
| | | } |
| | | ], |
| | |
| | | "ServiceContractQueryClassExpireAfter60Day", |
| | | "ServiceContractQueryClassExpiredBefore15Day", |
| | | "ServiceContractQueryClassExpiredBefore60Day" |
| | | ] |
| | | }, |
| | | "constvar.ServiceContractStatusKeywordType": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusKeywordCustomerName" |
| | | ] |
| | | }, |
| | | "constvar.ServiceContractStatusQueryClass": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusQueryClassExpireLessThen60Days" |
| | | ] |
| | | }, |
| | | "constvar.ServiceFeeKeywordType": { |
| | |
| | | }, |
| | | "request.AddServiceContractStatus": { |
| | | "type": "object", |
| | | "required": [ |
| | | "name" |
| | | ], |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | |
| | | "type": "integer" |
| | | }, |
| | | "search_map": { |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\", \"is_first\": \"是否是首要联系人\"}", |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\", \"is_first\": \"是否是首要联系人\", \"client_id\": \"clientId 用于返回首要联系人\"}", |
| | | "type": "object", |
| | | "additionalProperties": true |
| | | } |
| | |
| | | }, |
| | | "request.UpdateServiceContractStatus": { |
| | | "type": "object", |
| | | "required": [ |
| | | "id", |
| | | "name" |
| | | ], |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdateServiceContractStatuss": { |
| | | "type": "object", |
| | | "required": [ |
| | | "service_contract_status" |
| | | ], |
| | | "properties": { |
| | | "service_contract_status": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.UpdateServiceContractStatus" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.Satisfaction" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "response.ServiceContractStatusResponse": { |
| | | "type": "object", |
| | | "properties": { |
| | | "list": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.ServiceContractStatus" |
| | | } |
| | | } |
| | | } |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "添加服务合同状态", |
| | | "summary": "添加合同状态", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "删除服务合同状态", |
| | | "summary": "删除合同状态", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "获取服务合同状态列表", |
| | | "summary": "获取合同状态列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "name": "keyword", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "type": "string", |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusKeywordCustomerName" |
| | | ], |
| | | "name": "keywordType", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | | "name": "page", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "type": "string", |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusQueryClassExpireLessThen60Days" |
| | | ], |
| | | "name": "queryClass", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.ServiceContractStatusResponse" |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.ServiceContractStatus" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "ServiceContractStatus" |
| | | "合同状态" |
| | | ], |
| | | "summary": "更新服务合同状态", |
| | | "summary": "更新合同状态", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdateServiceContractStatuss" |
| | | "$ref": "#/definitions/request.UpdateServiceContractStatus" |
| | | } |
| | | } |
| | | ], |
| | |
| | | "ServiceContractQueryClassExpireAfter60Day", |
| | | "ServiceContractQueryClassExpiredBefore15Day", |
| | | "ServiceContractQueryClassExpiredBefore60Day" |
| | | ] |
| | | }, |
| | | "constvar.ServiceContractStatusKeywordType": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusKeywordCustomerName" |
| | | ] |
| | | }, |
| | | "constvar.ServiceContractStatusQueryClass": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "ServiceContractStatusQueryClassExpireLessThen60Days" |
| | | ] |
| | | }, |
| | | "constvar.ServiceFeeKeywordType": { |
| | |
| | | }, |
| | | "request.AddServiceContractStatus": { |
| | | "type": "object", |
| | | "required": [ |
| | | "name" |
| | | ], |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | |
| | | "type": "integer" |
| | | }, |
| | | "search_map": { |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\", \"is_first\": \"是否是首要联系人\"}", |
| | | "description": "搜索条件: map[string]interface{}{\"name\": \"xxx\"}; {\"name\": \"客户名称\", \"phone\": \"手机号码\", \"detail_address\":\"详细地址\", \"next_visit_time\":\"下回回访日期\", \"member_name\": \"销售负责人\", \"client_status\": \"客户状态\", \"client_level\": \"重要级别\", \"is_first\": \"是否是首要联系人\", \"client_id\": \"clientId 用于返回首要联系人\"}", |
| | | "type": "object", |
| | | "additionalProperties": true |
| | | } |
| | |
| | | }, |
| | | "request.UpdateServiceContractStatus": { |
| | | "type": "object", |
| | | "required": [ |
| | | "id", |
| | | "name" |
| | | ], |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdateServiceContractStatuss": { |
| | | "type": "object", |
| | | "required": [ |
| | | "service_contract_status" |
| | | ], |
| | | "properties": { |
| | | "service_contract_status": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.UpdateServiceContractStatus" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.Satisfaction" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "response.ServiceContractStatusResponse": { |
| | | "type": "object", |
| | | "properties": { |
| | | "list": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.ServiceContractStatus" |
| | | } |
| | | } |
| | | } |
| | |
| | | - ServiceContractQueryClassExpireAfter60Day |
| | | - ServiceContractQueryClassExpiredBefore15Day |
| | | - ServiceContractQueryClassExpiredBefore60Day |
| | | constvar.ServiceContractStatusKeywordType: |
| | | enum: |
| | | - "" |
| | | type: string |
| | | x-enum-varnames: |
| | | - ServiceContractStatusKeywordCustomerName |
| | | constvar.ServiceContractStatusQueryClass: |
| | | enum: |
| | | - "" |
| | | type: string |
| | | x-enum-varnames: |
| | | - ServiceContractStatusQueryClassExpireLessThen60Days |
| | | constvar.ServiceFeeKeywordType: |
| | | enum: |
| | | - 客户名称 |
| | |
| | | type: object |
| | | request.AddServiceContractStatus: |
| | | properties: |
| | | id: |
| | | type: integer |
| | | name: |
| | | type: string |
| | | required: |
| | | - name |
| | | type: object |
| | | request.AddServiceContractType: |
| | | properties: |
| | |
| | | additionalProperties: true |
| | | description: '搜索条件: map[string]interface{}{"name": "xxx"}; {"name": "客户名称", |
| | | "phone": "手机号码", "detail_address":"详细地址", "next_visit_time":"下回回访日期", "member_name": |
| | | "销售负责人", "client_status": "客户状态", "client_level": "重要级别", "is_first": "是否是首要联系人"}' |
| | | "销售负责人", "client_status": "客户状态", "client_level": "重要级别", "is_first": "是否是首要联系人", |
| | | "client_id": "clientId 用于返回首要联系人"}' |
| | | type: object |
| | | type: object |
| | | request.GetContractList: |
| | |
| | | type: integer |
| | | name: |
| | | type: string |
| | | required: |
| | | - id |
| | | - name |
| | | type: object |
| | | request.UpdateServiceContractStatuss: |
| | | properties: |
| | | service_contract_status: |
| | | items: |
| | | $ref: '#/definitions/request.UpdateServiceContractStatus' |
| | | type: array |
| | | required: |
| | | - service_contract_status |
| | | type: object |
| | | request.UpdateServiceContractType: |
| | | properties: |
| | |
| | | list: |
| | | items: |
| | | $ref: '#/definitions/model.Satisfaction' |
| | | type: array |
| | | type: object |
| | | response.ServiceContractStatusResponse: |
| | | properties: |
| | | list: |
| | | items: |
| | | $ref: '#/definitions/model.ServiceContractStatus' |
| | | type: array |
| | | type: object |
| | | response.ServiceContractTypeResponse: |
| | |
| | | description: OK |
| | | schema: |
| | | $ref: '#/definitions/contextx.Response' |
| | | summary: 添加服务合同状态 |
| | | summary: 添加合同状态 |
| | | tags: |
| | | - ServiceContractStatus |
| | | - 合同状态 |
| | | /api/serviceContractStatus/delete/{id}: |
| | | delete: |
| | | parameters: |
| | |
| | | description: OK |
| | | schema: |
| | | $ref: '#/definitions/contextx.Response' |
| | | summary: 删除服务合同状态 |
| | | summary: 删除合同状态 |
| | | tags: |
| | | - ServiceContractStatus |
| | | - 合同状态 |
| | | /api/serviceContractStatus/list: |
| | | get: |
| | | parameters: |
| | | - in: query |
| | | name: keyword |
| | | type: string |
| | | - enum: |
| | | - "" |
| | | in: query |
| | | name: keywordType |
| | | type: string |
| | | x-enum-varnames: |
| | | - ServiceContractStatusKeywordCustomerName |
| | | - description: 页码 |
| | | in: query |
| | | name: page |
| | | type: integer |
| | | - description: 每页大小 |
| | | in: query |
| | | name: pageSize |
| | | type: integer |
| | | - enum: |
| | | - "" |
| | | in: query |
| | | name: queryClass |
| | | type: string |
| | | x-enum-varnames: |
| | | - ServiceContractStatusQueryClassExpireLessThen60Days |
| | | produces: |
| | | - application/json |
| | | responses: |
| | |
| | | description: OK |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/contextx.Response' |
| | | - $ref: '#/definitions/response.ListResponse' |
| | | - properties: |
| | | data: |
| | | $ref: '#/definitions/response.ServiceContractStatusResponse' |
| | | items: |
| | | $ref: '#/definitions/model.ServiceContractStatus' |
| | | type: array |
| | | type: object |
| | | summary: 获取服务合同状态列表 |
| | | summary: 获取合同状态列表 |
| | | tags: |
| | | - ServiceContractStatus |
| | | - 合同状态 |
| | | /api/serviceContractStatus/update: |
| | | put: |
| | | parameters: |
| | |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.UpdateServiceContractStatuss' |
| | | $ref: '#/definitions/request.UpdateServiceContractStatus' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | |
| | | description: OK |
| | | schema: |
| | | $ref: '#/definitions/contextx.Response' |
| | | summary: 更新服务合同状态 |
| | | summary: 更新合同状态 |
| | | tags: |
| | | - ServiceContractStatus |
| | | - 合同状态 |
| | | /api/serviceContractType/add: |
| | | post: |
| | | parameters: |
| | |
| | | } |
| | | } |
| | | case int: |
| | | case int64: |
| | | case float64: |
| | | if key == "client_id" { |
| | | db = db.Where("client_id = ?", v) |
| | | db = db.Where("client_id = ? and is_first = true", v) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | type GetContactList 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": "重要级别", "is_first": "是否是首要联系人"} |
| | | 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": "重要级别", "is_first": "是否是首要联系人", "client_id": "clientId 用于返回首要联系人"} |
| | | } |
| | | |
| | | type DeleteContact struct { |