|
@@ -89,7 +89,8 @@ type CompanySearchItem struct {
|
|
FreezeEndDate string `description:"冻结结束日期"`
|
|
FreezeEndDate string `description:"冻结结束日期"`
|
|
RegionType string `description:"地区类型,国内,国外"`
|
|
RegionType string `description:"地区类型,国内,国外"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
- ShareSellerId int `description:"共享销售员id"`
|
|
|
|
|
|
+ ShareSellerId 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是"`
|
|
Nation string `description:"所属国家"`
|
|
Nation string `description:"所属国家"`
|
|
@@ -160,7 +161,8 @@ type CompanyItem struct {
|
|
SellerId int `description:"销售ID"`
|
|
SellerId int `description:"销售ID"`
|
|
SellerIds string `description:"销售ID集合,包含ficc和权益的销售id"`
|
|
SellerIds string `description:"销售ID集合,包含ficc和权益的销售id"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
- ShareSellerId int `description:"共享销售员id"`
|
|
|
|
|
|
+ ShareSellerId string `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:"到期天数"`
|
|
@@ -268,7 +270,8 @@ type CompanyListItem struct {
|
|
WeekViewActive int `description:"周阅读活跃: 0-七日内无阅读; 1-活跃"`
|
|
WeekViewActive int `description:"周阅读活跃: 0-七日内无阅读; 1-活跃"`
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
ShareSeller string `description:"共享销售员"`
|
|
- ShareSellerId int `description:"共享销售员id"`
|
|
|
|
|
|
+ ShareSellerId string `description:"共享销售员id"`
|
|
|
|
+ ShareSellerIds string `description:"共享销售员ids"`
|
|
LastServiceTime string `description:"最后服务时间"`
|
|
LastServiceTime string `description:"最后服务时间"`
|
|
ServiceTimes int `description:"服务次数"`
|
|
ServiceTimes int `description:"服务次数"`
|
|
CloseReason string `description:"关闭客户原因"`
|
|
CloseReason string `description:"关闭客户原因"`
|
|
@@ -369,7 +372,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,
|
|
@@ -1723,7 +1727,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
|
|
@@ -1743,7 +1747,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,
|
|
@@ -1773,6 +1780,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,
|