fix
wangpengfei
2023-08-18 9a7e0a7da01a9f9625ceaca0c61a59c540c6438f
fix

add query param to contact
5个文件已修改
336 ■■■■■ 已修改文件
docs/docs.go 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/contact.go 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/request/contact.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go
@@ -8022,9 +8022,9 @@
                    "application/json"
                ],
                "tags": [
                    "ServiceContractStatus"
                    "合同状态"
                ],
                "summary": "添加服务合同状态",
                "summary": "添加合同状态",
                "parameters": [
                    {
                        "description": "查询参数",
@@ -8052,9 +8052,9 @@
                    "application/json"
                ],
                "tags": [
                    "ServiceContractStatus"
                    "合同状态"
                ],
                "summary": "删除服务合同状态",
                "summary": "删除合同状态",
                "parameters": [
                    {
                        "type": "integer",
@@ -8080,22 +8080,66 @@
                    "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"
                                            }
                                        }
                                    }
                                }
@@ -8111,9 +8155,9 @@
                    "application/json"
                ],
                "tags": [
                    "ServiceContractStatus"
                    "合同状态"
                ],
                "summary": "更新服务合同状态",
                "summary": "更新合同状态",
                "parameters": [
                    {
                        "description": "查询参数",
@@ -8121,7 +8165,7 @@
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateServiceContractStatuss"
                            "$ref": "#/definitions/request.UpdateServiceContractStatus"
                        }
                    }
                ],
@@ -10523,6 +10567,24 @@
                "ServiceContractQueryClassExpireAfter60Day",
                "ServiceContractQueryClassExpiredBefore15Day",
                "ServiceContractQueryClassExpiredBefore60Day"
            ]
        },
        "constvar.ServiceContractStatusKeywordType": {
            "type": "string",
            "enum": [
                ""
            ],
            "x-enum-varnames": [
                "ServiceContractStatusKeywordCustomerName"
            ]
        },
        "constvar.ServiceContractStatusQueryClass": {
            "type": "string",
            "enum": [
                ""
            ],
            "x-enum-varnames": [
                "ServiceContractStatusQueryClassExpireLessThen60Days"
            ]
        },
        "constvar.ServiceFeeKeywordType": {
@@ -14287,10 +14349,10 @@
        },
        "request.AddServiceContractStatus": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
@@ -15127,7 +15189,7 @@
                    "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
                }
@@ -17562,30 +17624,12 @@
        },
        "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"
                    }
                }
            }
        },
@@ -18877,17 +18921,6 @@
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Satisfaction"
                    }
                }
            }
        },
        "response.ServiceContractStatusResponse": {
            "type": "object",
            "properties": {
                "list": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ServiceContractStatus"
                    }
                }
            }
docs/swagger.json
@@ -8010,9 +8010,9 @@
                    "application/json"
                ],
                "tags": [
                    "ServiceContractStatus"
                    "合同状态"
                ],
                "summary": "添加服务合同状态",
                "summary": "添加合同状态",
                "parameters": [
                    {
                        "description": "查询参数",
@@ -8040,9 +8040,9 @@
                    "application/json"
                ],
                "tags": [
                    "ServiceContractStatus"
                    "合同状态"
                ],
                "summary": "删除服务合同状态",
                "summary": "删除合同状态",
                "parameters": [
                    {
                        "type": "integer",
@@ -8068,22 +8068,66 @@
                    "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"
                                            }
                                        }
                                    }
                                }
@@ -8099,9 +8143,9 @@
                    "application/json"
                ],
                "tags": [
                    "ServiceContractStatus"
                    "合同状态"
                ],
                "summary": "更新服务合同状态",
                "summary": "更新合同状态",
                "parameters": [
                    {
                        "description": "查询参数",
@@ -8109,7 +8153,7 @@
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateServiceContractStatuss"
                            "$ref": "#/definitions/request.UpdateServiceContractStatus"
                        }
                    }
                ],
@@ -10511,6 +10555,24 @@
                "ServiceContractQueryClassExpireAfter60Day",
                "ServiceContractQueryClassExpiredBefore15Day",
                "ServiceContractQueryClassExpiredBefore60Day"
            ]
        },
        "constvar.ServiceContractStatusKeywordType": {
            "type": "string",
            "enum": [
                ""
            ],
            "x-enum-varnames": [
                "ServiceContractStatusKeywordCustomerName"
            ]
        },
        "constvar.ServiceContractStatusQueryClass": {
            "type": "string",
            "enum": [
                ""
            ],
            "x-enum-varnames": [
                "ServiceContractStatusQueryClassExpireLessThen60Days"
            ]
        },
        "constvar.ServiceFeeKeywordType": {
@@ -14275,10 +14337,10 @@
        },
        "request.AddServiceContractStatus": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
@@ -15115,7 +15177,7 @@
                    "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
                }
@@ -17550,30 +17612,12 @@
        },
        "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"
                    }
                }
            }
        },
@@ -18865,17 +18909,6 @@
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Satisfaction"
                    }
                }
            }
        },
        "response.ServiceContractStatusResponse": {
            "type": "object",
            "properties": {
                "list": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ServiceContractStatus"
                    }
                }
            }
docs/swagger.yaml
@@ -270,6 +270,18 @@
    - ServiceContractQueryClassExpireAfter60Day
    - ServiceContractQueryClassExpiredBefore15Day
    - ServiceContractQueryClassExpiredBefore60Day
  constvar.ServiceContractStatusKeywordType:
    enum:
    - ""
    type: string
    x-enum-varnames:
    - ServiceContractStatusKeywordCustomerName
  constvar.ServiceContractStatusQueryClass:
    enum:
    - ""
    type: string
    x-enum-varnames:
    - ServiceContractStatusQueryClassExpireLessThen60Days
  constvar.ServiceFeeKeywordType:
    enum:
    - 客户名称
@@ -2823,10 +2835,10 @@
    type: object
  request.AddServiceContractStatus:
    properties:
      id:
        type: integer
      name:
        type: string
    required:
    - name
    type: object
  request.AddServiceContractType:
    properties:
@@ -3407,7 +3419,8 @@
        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:
@@ -5066,18 +5079,6 @@
        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:
@@ -5946,13 +5947,6 @@
      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:
@@ -10956,9 +10950,9 @@
          description: OK
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 添加服务合同状态
      summary: 添加合同状态
      tags:
      - ServiceContractStatus
      - 合同状态
  /api/serviceContractStatus/delete/{id}:
    delete:
      parameters:
@@ -10974,11 +10968,37 @@
          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:
@@ -10986,14 +11006,16 @@
          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:
@@ -11002,7 +11024,7 @@
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.UpdateServiceContractStatuss'
          $ref: '#/definitions/request.UpdateServiceContractStatus'
      produces:
      - application/json
      responses:
@@ -11010,9 +11032,9 @@
          description: OK
          schema:
            $ref: '#/definitions/contextx.Response'
      summary: 更新服务合同状态
      summary: 更新合同状态
      tags:
      - ServiceContractStatus
      - 合同状态
  /api/serviceContractType/add:
    post:
      parameters:
model/contact.go
@@ -93,8 +93,10 @@
                    }
                }
            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)
                }
            }
        }
model/request/contact.go
@@ -29,7 +29,7 @@
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 {