zwxi il y a 9 mois
Parent
commit
d845039fb7
1 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 6 4
      models/yb_research_signup_statistics.go

+ 6 - 4
models/yb_research_signup_statistics.go

@@ -71,6 +71,7 @@ type YbResearchSignupStatisticsItem struct {
 	CustomMobile                 string  // 报名人手机号
 	CustomCompanyName            string  // 报名人公司名称
 	Count                        int     // 报名人数
+	Enable                       int     // 1:有效,0:禁用
 }
 
 type YbResearchSignupStatisticsItemsResp struct {
@@ -103,12 +104,13 @@ ORDER BY
 }
 
 func GetYbResearchSignupStatisticsItemsByMobile(mobile string, bannerId int) (items []*YbResearchSignupStatisticsItem, err error) {
-	sql := ` SELECT
-	*
+	sql := `SELECT
+	a.*,b.enable
 FROM
-	yb_research_signup_statistics 
+	yb_research_signup_statistics AS a
+	INNER JOIN banner AS b ON a.banner_id = b.id 
 WHERE
-	1 = 1 and mobile = ? and banner_id = ? 
+	1 = 1 AND mobile = ? and banner_id = ? 
 ORDER BY
 	create_time DESC `
 	o := orm.NewOrm()