|
@@ -90,7 +90,7 @@ type CompanySearchItem struct {
|
|
RegionType string `description:"地区类型,国内,国外"`
|
|
RegionType string `description:"地区类型,国内,国外"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
- ShareSellerIds string `description:"共享销售员id"`
|
|
|
|
|
|
+ ShareSellerIds string `description:"共享销售员id"`
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
IsScrounge int `description:"是否白嫖 0不是 1是"`
|
|
IsScrounge int `description:"是否白嫖 0不是 1是"`
|
|
IsSigning int `description:"是否签约过,1是,0否"`
|
|
IsSigning int `description:"是否签约过,1是,0否"`
|
|
@@ -160,7 +160,7 @@ type CompanyItem struct {
|
|
FreezeReason string `description:"冻结理由"`
|
|
FreezeReason string `description:"冻结理由"`
|
|
LossTime string `description:"流失时间"`
|
|
LossTime string `description:"流失时间"`
|
|
Status string `description:"客户状态:'试用','永续','冻结','流失','正式' "`
|
|
Status string `description:"客户状态:'试用','永续','冻结','流失','正式' "`
|
|
- StatusStr string `description:"客户状态:'试用','永续','冻结','流失','正式' 如果是共享客户会加上 '(共享)'" `
|
|
|
|
|
|
+ StatusStr string `description:"客户状态:'试用','永续','冻结','流失','正式' 如果是共享客户会加上 '(共享)'" `
|
|
CompanyType string `description:"客户类型:ficc/权益"`
|
|
CompanyType string `description:"客户类型:ficc/权益"`
|
|
ApproveStatus string `description:"审批状态:'待审批','已审批','驳回' 审批状态为空时,表示没有审批申请"`
|
|
ApproveStatus string `description:"审批状态:'待审批','已审批','驳回' 审批状态为空时,表示没有审批申请"`
|
|
SellerName string `description:"销售:吉根龙/颖丹"`
|
|
SellerName string `description:"销售:吉根龙/颖丹"`
|
|
@@ -168,7 +168,7 @@ type CompanyItem struct {
|
|
SellerIds string `description:"销售ID集合,包含ficc和权益的销售id"`
|
|
SellerIds string `description:"销售ID集合,包含ficc和权益的销售id"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
- ShareSellerIds string `description:"共享销售员ids"`
|
|
|
|
|
|
+ ShareSellerIds string `description:"共享销售员ids"`
|
|
PackageTypes string `description:"套餐类型集合,包含ficc和权益的套餐类型" json:"-"`
|
|
PackageTypes string `description:"套餐类型集合,包含ficc和权益的套餐类型" json:"-"`
|
|
FiccPackageType int `description:"ficc的套餐类型"`
|
|
FiccPackageType int `description:"ficc的套餐类型"`
|
|
ExpireDay string `description:"到期天数"`
|
|
ExpireDay string `description:"到期天数"`
|
|
@@ -219,9 +219,10 @@ type CompanyItem struct {
|
|
IsSigning int `description:"是否签约过,1是,0否"`
|
|
IsSigning int `description:"是否签约过,1是,0否"`
|
|
SigningStatus string `description:"签约状态,已签约过/未签约过"`
|
|
SigningStatus string `description:"签约状态,已签约过/未签约过"`
|
|
CompanyStatusButton *CompanyStatusButton
|
|
CompanyStatusButton *CompanyStatusButton
|
|
- Nation string `description:"所属国家"`
|
|
|
|
- LatestServiceRecord time.Time `description:"最近沟通时间"`
|
|
|
|
- FirstDate time.Time `description:"首次服务时间"`}
|
|
|
|
|
|
+ Nation string `description:"所属国家"`
|
|
|
|
+ LatestServiceRecord time.Time `description:"最近沟通时间"`
|
|
|
|
+ FirstDate time.Time `description:"首次服务时间"`
|
|
|
|
+}
|
|
|
|
|
|
type CompanyListItem struct {
|
|
type CompanyListItem struct {
|
|
CompanyId int `orm:"column(company_id);pk"`
|
|
CompanyId int `orm:"column(company_id);pk"`
|
|
@@ -281,7 +282,7 @@ type CompanyListItem struct {
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
- ShareSellerIds string `description:"共享销售员ids"`
|
|
|
|
|
|
+ ShareSellerIds string `description:"共享销售员ids"`
|
|
LastServiceTime string `description:"最后服务时间"`
|
|
LastServiceTime string `description:"最后服务时间"`
|
|
ServiceTimes int `description:"服务次数"`
|
|
ServiceTimes int `description:"服务次数"`
|
|
CloseReason string `description:"关闭客户原因"`
|
|
CloseReason string `description:"关闭客户原因"`
|
|
@@ -708,6 +709,24 @@ func GetCompanyTryOutCount(status string, sellerId int) (count int, err error) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 获取权益销售开通的非研选试用客户数量
|
|
|
|
+func GetRaiCompanyTryOutCountNoResearch(sellerId int) (count int, err error) {
|
|
|
|
+ o := orm.NewOrm()
|
|
|
|
+ sql := `SELECT
|
|
|
|
+ COUNT( DISTINCT a.company_id ) AS count
|
|
|
|
+ FROM
|
|
|
|
+ company AS a
|
|
|
|
+ INNER JOIN company_product AS b ON a.company_id = b.company_id
|
|
|
|
+ INNER JOIN company_report_permission AS p ON p.company_id = a.company_id
|
|
|
|
+ WHERE
|
|
|
|
+ b.status = '试用'
|
|
|
|
+ AND p.status = '试用'
|
|
|
|
+ AND b.seller_id = ?
|
|
|
|
+ AND p.chart_permission_id NOT IN(31,52) `
|
|
|
|
+ err = o.Raw(sql, sellerId).QueryRow(&count)
|
|
|
|
+ return
|
|
|
|
+}
|
|
|
|
+
|
|
type CompanySearchResp struct {
|
|
type CompanySearchResp struct {
|
|
List []*CompanyItem
|
|
List []*CompanyItem
|
|
}
|
|
}
|