wangfei 6 anni fa
parent
commit
5fee2e1ac5
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      models/luckdraw/luckdraw.go

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

@@ -97,7 +97,7 @@ func (m *LuckDrawDao) GetLuckDrawRecordCount(id, tel string) (int, error) {
97 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 101
 	return len(records), err
102 102
 }
103 103
 
@@ -110,7 +110,7 @@ func (m *LuckDrawDao) GetLuckDrawRecord(id, tel string, page, pageSize int) ([]R
110 110
 	}
111 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 114
 	return records, err
115 115
 }
116 116