|
@@ -388,20 +388,23 @@ WHERE
|
|
|
}
|
|
|
|
|
|
type SignupExportRep struct {
|
|
|
- Mobile string `description:"手机号"`
|
|
|
- CompanyName string `description:"公司名称"`
|
|
|
- RealName string `description:"姓名"`
|
|
|
- CountryCode string `description:"区号"`
|
|
|
+ Mobile string `description:"手机号"`
|
|
|
+ CompanyName string `description:"公司名称"`
|
|
|
+ RealName string `description:"姓名"`
|
|
|
+ CountryCode string `description:"区号"`
|
|
|
+ OutboundMobile string `description:"外呼手机号"`
|
|
|
+ SellerName string `description:"销售姓名"`
|
|
|
}
|
|
|
|
|
|
func GetSignupExport(activityId int) (item []*SignupExportRep, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT s.* ,a.is_limit_people,u.real_name ,u.country_code
|
|
|
+ sql := `SELECT s.* ,a.is_limit_people,u.real_name,p.seller_name
|
|
|
FROM
|
|
|
cygx_activity_signup AS s
|
|
|
LEFT JOIN wx_user AS u ON u.user_id = s.user_id
|
|
|
LEFT JOIN cygx_activity AS a ON a.activity_id = s.activity_id
|
|
|
- WHERE a.activity_id = ? AND s.fail_type = 0`
|
|
|
+ LEFT JOIN company_product AS p ON p.company_id = u.company_id
|
|
|
+ WHERE a.activity_id = ? AND s.fail_type = 0 AND p.product_id = 2`
|
|
|
_, err = o.Raw(sql, activityId).QueryRows(&item)
|
|
|
return
|
|
|
}
|