Browse Source

1023 by wangf

wangfei 6 years ago
parent
commit
5fee2e1ac5
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      models/luckdraw/luckdraw.go

+ 2
- 2
models/luckdraw/luckdraw.go View File

97
 		sql = sql + ` and b.phone=` + tel
97
 		sql = sql + ` and b.phone=` + tel
98
 	}
98
 	}
99
 
99
 
100
-	err := m.db.Sql(sql).Find(&records)
100
+	err := m.db.Sql(sql, id).Find(&records)
101
 	return len(records), err
101
 	return len(records), err
102
 }
102
 }
103
 
103
 
110
 	}
110
 	}
111
 	sql = sql + ` ORDER BY a.create_date desc limit ` + strconv.Itoa((page-1)*pageSize) + `, ` + strconv.Itoa(pageSize)
111
 	sql = sql + ` ORDER BY a.create_date desc limit ` + strconv.Itoa((page-1)*pageSize) + `, ` + strconv.Itoa(pageSize)
112
 
112
 
113
-	err := m.db.Sql(sql).Find(&records)
113
+	err := m.db.Sql(sql, id).Find(&records)
114
 	return records, err
114
 	return records, err
115
 }
115
 }
116
 
116