zwxi 9 months ago
parent
commit
98d97dbeb0

+ 2 - 1
controllers/yb_research_signup_statistics.go

@@ -109,13 +109,14 @@ func (this *BannerController) StatisticsDetail() {
 	}()
 
 	mobile := this.GetString("Mobile")
+	bannerId, _ := this.GetInt("BannerId")
 
 	if mobile == "" {
 		br.Msg = "参数错误"
 		br.ErrMsg = "参数错误"
 		return
 	}
-	list, err := models.GetYbResearchSignupStatisticsItemsByMobile(mobile)
+	list, err := models.GetYbResearchSignupStatisticsItemsByMobile(mobile, bannerId)
 	if err != nil {
 		br.Msg = "获取失败"
 		br.ErrMsg = "获取失败,Err:" + err.Error()

+ 3 - 4
models/yb_research_signup_statistics.go

@@ -102,18 +102,17 @@ ORDER BY
 	return
 }
 
-func GetYbResearchSignupStatisticsItemsByMobile(mobile string) (items []*YbResearchSignupStatisticsItem, err error) {
+func GetYbResearchSignupStatisticsItemsByMobile(mobile string, bannerId int) (items []*YbResearchSignupStatisticsItem, err error) {
 	sql := ` SELECT
 	*
 FROM
 	yb_research_signup_statistics 
 WHERE
-	1 = 1 and mobile = ?
-
+	1 = 1 and mobile = ? and banner_id = ? 
 ORDER BY
 	create_time DESC `
 	o := orm.NewOrm()
-	_, err = o.Raw(sql, mobile).QueryRows(&items)
+	_, err = o.Raw(sql, mobile, bannerId).QueryRows(&items)
 	return
 }