|
@@ -90,6 +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"`
|
|
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否"`
|
|
@@ -165,6 +166,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"`
|
|
PackageTypes string `description:"套餐类型集合,包含ficc和权益的套餐类型" json:"-"`
|
|
PackageTypes string `description:"套餐类型集合,包含ficc和权益的套餐类型" json:"-"`
|
|
FiccPackageType int `description:"ficc的套餐类型"`
|
|
FiccPackageType int `description:"ficc的套餐类型"`
|
|
ExpireDay string `description:"到期天数"`
|
|
ExpireDay string `description:"到期天数"`
|
|
@@ -276,6 +278,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"`
|
|
LastServiceTime string `description:"最后服务时间"`
|
|
LastServiceTime string `description:"最后服务时间"`
|
|
ServiceTimes int `description:"服务次数"`
|
|
ServiceTimes int `description:"服务次数"`
|
|
CloseReason string `description:"关闭客户原因"`
|
|
CloseReason string `description:"关闭客户原因"`
|
|
@@ -388,7 +391,8 @@ as sort_todo_end_time,
|
|
b.view_total,
|
|
b.view_total,
|
|
b.last_view_time,
|
|
b.last_view_time,
|
|
GROUP_CONCAT(DISTINCT b.share_seller ORDER BY b.product_id ASC SEPARATOR '/') AS share_seller,
|
|
GROUP_CONCAT(DISTINCT b.share_seller ORDER BY b.product_id ASC SEPARATOR '/') AS share_seller,
|
|
- b.share_seller_id,
|
|
|
|
|
|
+ GROUP_CONCAT(DISTINCT b.share_seller_id ORDER BY b.product_id ASC SEPARATOR ',') AS share_seller_ids,
|
|
|
|
+ b.share_seller_id ,
|
|
MAX(b.last_view_time) as max_last_view_time,
|
|
MAX(b.last_view_time) as max_last_view_time,
|
|
MIN(b.last_view_time) as min_last_view_time,
|
|
MIN(b.last_view_time) as min_last_view_time,
|
|
MAX(b.end_date) as max_end_date,
|
|
MAX(b.end_date) as max_end_date,
|
|
@@ -1742,7 +1746,7 @@ func GetShareCompanyList(condition, sortStr string, pars []interface{}, startSiz
|
|
t := time.Now().Local().AddDate(0, 0, -7).Format(utils.FormatDate)
|
|
t := time.Now().Local().AddDate(0, 0, -7).Format(utils.FormatDate)
|
|
|
|
|
|
sql := `SELECT a.company_id,a.company_name,a.credit_code,a.company_code,a.created_time,a.province,a.city,
|
|
sql := `SELECT a.company_id,a.company_name,a.credit_code,a.company_code,a.created_time,a.province,a.city,
|
|
-a.address,a.region_type,b.group_id,b.road_show_total,b.is_share,b.share_seller_id,b.share_seller,
|
|
|
|
|
|
+a.address,a.region_type,b.group_id,b.road_show_total,b.is_share,
|
|
CASE
|
|
CASE
|
|
WHEN GROUP_CONCAT(b.status) LIKE "%永续%" THEN 1
|
|
WHEN GROUP_CONCAT(b.status) LIKE "%永续%" THEN 1
|
|
WHEN GROUP_CONCAT(b.status) LIKE "%正式%" THEN 2
|
|
WHEN GROUP_CONCAT(b.status) LIKE "%正式%" THEN 2
|
|
@@ -1762,7 +1766,10 @@ CASE
|
|
WHEN GROUP_CONCAT(b.todo_status) LIKE "%未完成%" AND GROUP_CONCAT(b.todo_end_time) is not null THEN GROUP_CONCAT(b.todo_end_time)
|
|
WHEN GROUP_CONCAT(b.todo_status) LIKE "%未完成%" AND GROUP_CONCAT(b.todo_end_time) is not null THEN GROUP_CONCAT(b.todo_end_time)
|
|
ELSE "9999-01-01" END
|
|
ELSE "9999-01-01" END
|
|
as sort_todo_end_time,
|
|
as sort_todo_end_time,
|
|
- GROUP_CONCAT(b.status ORDER BY b.product_id ASC SEPARATOR '/') AS status,
|
|
|
|
|
|
+ GROUP_CONCAT(CASE
|
|
|
|
+ WHEN b.is_share = 1 THEN CONCAT(b.status, '(共享)')
|
|
|
|
+ ELSE b.status
|
|
|
|
+ END ORDER BY b.product_id ASC SEPARATOR '/') AS status,
|
|
GROUP_CONCAT(DISTINCT b.seller_name ORDER BY b.product_id ASC SEPARATOR '/') AS seller_name,
|
|
GROUP_CONCAT(DISTINCT b.seller_name ORDER BY b.product_id ASC SEPARATOR '/') AS seller_name,
|
|
GROUP_CONCAT(DISTINCT b.seller_id ORDER BY b.product_id ASC SEPARATOR '/') AS seller_ids,
|
|
GROUP_CONCAT(DISTINCT b.seller_id ORDER BY b.product_id ASC SEPARATOR '/') AS seller_ids,
|
|
GROUP_CONCAT(DISTINCT b.package_type ORDER BY b.product_id ASC SEPARATOR '/') AS package_types,
|
|
GROUP_CONCAT(DISTINCT b.package_type ORDER BY b.product_id ASC SEPARATOR '/') AS package_types,
|
|
@@ -1792,6 +1799,9 @@ as sort_todo_end_time,
|
|
b.freeze_time,b.freeze_reason,b.renewal_reason,
|
|
b.freeze_time,b.freeze_reason,b.renewal_reason,
|
|
b.view_total,
|
|
b.view_total,
|
|
b.last_view_time,
|
|
b.last_view_time,
|
|
|
|
+ GROUP_CONCAT(DISTINCT b.share_seller ORDER BY b.product_id ASC SEPARATOR '/') AS share_seller,
|
|
|
|
+ GROUP_CONCAT(DISTINCT b.share_seller_id ORDER BY b.product_id ASC SEPARATOR ',') AS share_seller_ids,
|
|
|
|
+ b.share_seller_id ,
|
|
MAX(b.last_view_time) as max_last_view_time,
|
|
MAX(b.last_view_time) as max_last_view_time,
|
|
MIN(b.last_view_time) as min_last_view_time,
|
|
MIN(b.last_view_time) as min_last_view_time,
|
|
MAX(b.end_date) as max_end_date,
|
|
MAX(b.end_date) as max_end_date,
|