fix
wangpengfei
2023-08-25 db63bbb15a5bbb241676e1d528ead238b73506f1
fix

fix public sea to query params
9个文件已修改
59 ■■■■■ 已修改文件
api/v1/salesLeads.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
constvar/const.go 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/client.go 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/request/client.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/request/salesLeads.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/salesLeads.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/salesLeads.go
@@ -131,6 +131,7 @@
            RegionId:   params.RegionId,
            CountryId:  params.CountryId,
        },
        DetailAddress: params.DetailAddress,
    }
    return ecode.OK, salesLeads
constvar/const.go
@@ -32,6 +32,13 @@
    UserTypeSub                         // 子账户
)
type NotAdmin int
const (
    NotAdminAll NotAdmin = iota // 公海
    NotAdminYes                 // 我的客户
)
type SalesStatus int
const (
docs/docs.go
@@ -12291,6 +12291,9 @@
                "desc": {
                    "type": "string"
                },
                "detail_address": {
                    "type": "string"
                },
                "followRecord": {
                    "type": "array",
                    "items": {
@@ -14271,6 +14274,10 @@
                    "description": "备注",
                    "type": "string"
                },
                "detail_address": {
                    "description": "详细地址",
                    "type": "string"
                },
                "member_id": {
                    "description": "销售负责人ID",
                    "type": "integer"
@@ -15247,7 +15254,7 @@
                    "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
                }
@@ -17435,6 +17442,10 @@
                    "description": "备注",
                    "type": "string"
                },
                "detail_address": {
                    "description": "详细地址",
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
docs/swagger.json
@@ -12279,6 +12279,9 @@
                "desc": {
                    "type": "string"
                },
                "detail_address": {
                    "type": "string"
                },
                "followRecord": {
                    "type": "array",
                    "items": {
@@ -14259,6 +14262,10 @@
                    "description": "备注",
                    "type": "string"
                },
                "detail_address": {
                    "description": "详细地址",
                    "type": "string"
                },
                "member_id": {
                    "description": "销售负责人ID",
                    "type": "integer"
@@ -15235,7 +15242,7 @@
                    "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
                }
@@ -17423,6 +17430,10 @@
                    "description": "备注",
                    "type": "string"
                },
                "detail_address": {
                    "description": "详细地址",
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
docs/swagger.yaml
@@ -1444,6 +1444,8 @@
        type: integer
      desc:
        type: string
      detail_address:
        type: string
      followRecord:
        items:
          $ref: '#/definitions/model.FollowRecord'
@@ -2773,6 +2775,9 @@
      desc:
        description: 备注
        type: string
      detail_address:
        description: 详细地址
        type: string
      member_id:
        description: 销售负责人ID
        type: integer
@@ -3446,7 +3451,7 @@
          "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:
@@ -4938,6 +4943,9 @@
      desc:
        description: 备注
        type: string
      detail_address:
        description: 详细地址
        type: string
      id:
        type: integer
      member_id:
model/client.go
@@ -113,9 +113,20 @@
                }
            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)
                    }
                }
            }
        }
    }
model/request/client.go
@@ -31,7 +31,7 @@
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 {
model/request/salesLeads.go
@@ -15,6 +15,7 @@
    SalesSourcesId  int    `json:"sales_sources_id"` // 商机来源ID
    MemberId        int    `json:"member_id"`        // 销售负责人ID
    Desc            string `json:"desc"`             // 备注
    DetailAddress   string `json:"detail_address"`   // 详细地址
    Address
}
model/salesLeads.go
@@ -22,6 +22,7 @@
        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:"-"`
    }