package crm import "hongze/fms_api/global" // CompanySellerListReq CRM销售-列表请求体 type CompanySellerListReq struct { SellerType int `json:"seller_type" form:"seller_type" binding:"omitempty" description:"销售类型: 0-全部; 1-FICC; 2-权益"` } // CompanySellerList 销售列表 type CompanySellerList struct { AdminId int `json:"admin_id" description:"系统用户ID"` AdminName string `json:"admin_name" description:"系统用户名称"` RealName string `json:"real_name" description:"用户真实名称"` } // GetCompanySellerByRoleCodes 通过系统用户角色码获取销售 func GetCompanySellerByRoleCodes(condition string, pars []interface{}) (results []*CompanySellerList, err error) { results = make([]*CompanySellerList, 0) query := global.MYSQL["report"]. Table("admin as a"). Select("a.admin_id, a.admin_name, real_name"). Joins("JOIN sys_role b ON a.role_id = b.role_id"). Where("a.enabled = 1"). Where(condition, pars...) err = query.Find(&results).Error return } // SellerAdminWithGroupTeam 系统销售(包含大小分组) type SellerAdminWithGroupTeam struct { SellerId int `json:"seller_id" description:"销售ID"` SellerName string `json:"seller_name" description:"销售名称"` GroupId int `json:"group_id" description:"分组ID"` GroupName string `json:"group_name" description:"分组名称"` TeamId int `json:"team_id" description:"小组ID"` TeamName string `json:"team_name" description:"小组名称"` DepartmentId int `json:"department_id" description:"部分ID"` } // SellerAdminWithGroupList 系统销售(包含大分组) type SellerAdminWithGroupList struct { AllList []SellerAdminWithGroupTree `json:"all_list"` FiccList []SellerAdminList `json:"ficc_list"` RaiList []SellerAdminList `json:"rai_list"` } type SellerAdminWithGroupTree struct { SellerId int `json:"seller_id"` SellerName string `json:"seller_name"` ProductId int `json:"product_id"` Selected bool `json:"selected"` Child []SellerAdminWithGroupTree `json:"child"` } type SellerAdminList struct { SellerId int `json:"seller_id"` SellerName string `json:"seller_name"` }