feat sn 改成 int64

This commit is contained in:
2026-01-30 11:56:12 +08:00
parent 39fa373c01
commit 36621140f8
21 changed files with 81 additions and 81 deletions

View File

@@ -32,7 +32,7 @@ func (d *RecordDao) Create(record *model.Record) (*model.Record, error) {
}
type RecordItem struct {
QuestionSn string `gorm:"column:question_sn"`
QuestionSn int64 `gorm:"column:question_sn"`
Question string `gorm:"column:question"`
Difficulty int32 `gorm:"column:difficulty"`
Category string `gorm:"column:category"`
@@ -42,7 +42,7 @@ type RecordItem struct {
CreatedAt time.Time `gorm:"column:created_at"`
}
func (d *RecordDao) FindByUSN(usn string, page, pageSize int) ([]*RecordItem, int64, error) {
func (d *RecordDao) FindByUSN(usn int64, page, pageSize int) ([]*RecordItem, int64, error) {
result := make([]*RecordItem, 0)
count, err := d.query.Record.WithContext(d.ctx).
Select(