|
@@ -91,6 +91,7 @@ type CompanySearchItem struct {
|
|
|
ShareSellerId int `description:"共享销售员id"`
|
|
|
IsShare int `description:"0:非共享用户,1:共享客户"`
|
|
|
IsScrounge int `description:"是否白嫖 0不是 1是"`
|
|
|
+ IsSigning int `description:"是否签约过,1是,0否"`
|
|
|
}
|
|
|
|
|
|
type CompanySearchListResp struct {
|
|
@@ -100,7 +101,7 @@ type CompanySearchListResp struct {
|
|
|
|
|
|
func GetCompanySearchList(condition string, pars []interface{}, limitParam ...int) (items []*CompanySearchItem, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT DISTINCT a.company_id,a.company_name,a.credit_code,a.company_code,a.region_type,a.share_seller_id,a.share_seller,a.is_share,
|
|
|
+ sql := `SELECT DISTINCT a.company_id,a.company_name,a.credit_code,a.company_code,a.region_type,a.share_seller_id,a.share_seller,a.is_share,b.is_signing,
|
|
|
GROUP_CONCAT(b.status 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_id ORDER BY b.product_id ASC SEPARATOR '/') AS seller_ids,
|
|
@@ -206,6 +207,7 @@ type CompanyItem struct {
|
|
|
ServiceTimes int `description:"服务次数"`
|
|
|
CloseReason string `description:"关闭原因"`
|
|
|
CloseTime string `description:"关闭时间"`
|
|
|
+ IsSigning int `description:"是否签约过,1是,0否"`
|
|
|
}
|
|
|
|
|
|
type CompanyListItem struct {
|
|
@@ -271,6 +273,7 @@ type CompanyListItem struct {
|
|
|
CloseReason string `description:"关闭客户原因"`
|
|
|
CloseTime string `description:"关闭客户时间"`
|
|
|
IsScrounge int `description:"是否白嫖 0不是 1是"`
|
|
|
+ IsSigning int `description:"是否签约过 0不是 1是"`
|
|
|
}
|
|
|
|
|
|
type TryStageSliceItem struct {
|
|
@@ -308,7 +311,7 @@ func GetCompanyList(condition, status, sortStr string, pars []interface{}, start
|
|
|
// 权益客户: 以权益最后一次阅读时间作为参考
|
|
|
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,a.address,a.region_type,b.group_id,b.road_show_total,a.is_share,
|
|
|
+ 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,a.is_share,b.is_signing,
|
|
|
CASE
|
|
|
WHEN GROUP_CONCAT(b.status) LIKE "%永续%" THEN 1
|
|
|
WHEN GROUP_CONCAT(b.status) LIKE "%正式%" THEN 2
|