浏览代码

activity info

胡轶钦 6 年前
父节点
当前提交
21a85d91fe
共有 3 个文件被更改,包括 3 次插入4 次删除
  1. 0
    1
      controllers/course/course.go
  2. 0
    0
      models/activityinfo/activityinfo.go
  3. 3
    3
      models/luckdraw/luckdraw.go

+ 0
- 1
controllers/course/course.go 查看文件

279
 		c.ResponseError(err)
279
 		c.ResponseError(err)
280
 	}
280
 	}
281
 	c.ResponseJSON(courses)
281
 	c.ResponseJSON(courses)
282
-
283
 }
282
 }

+ 0
- 0
models/activityinfo/activityinfo.go 查看文件


+ 3
- 3
models/luckdraw/luckdraw.go 查看文件

94
 // GetLuckDrawRecordCount 获取抽奖记录count
94
 // GetLuckDrawRecordCount 获取抽奖记录count
95
 func (m *LuckDrawDao) GetLuckDrawRecordCount(id, tel string) (int, error) {
95
 func (m *LuckDrawDao) GetLuckDrawRecordCount(id, tel string) (int, error) {
96
 	var records []RecordWithPhone
96
 	var records []RecordWithPhone
97
-	sql := `select a.*,b.customer_name,b.phone,b,name from ta_luckdraw_record a inner join ta_customer b on a.user_id=b.customer_id where a.luckdraw_id=?`
97
+	sql := `select a.*,b.customer_name,b.phone,b.name from ta_luckdraw_record a inner join ta_customer b on a.user_id=b.customer_id where a.luckdraw_id=?`
98
 	if tel != "" {
98
 	if tel != "" {
99
 		sql = sql + ` and b.phone=` + tel
99
 		sql = sql + ` and b.phone=` + tel
100
 	}
100
 	}
106
 // GetLuckDrawRecord 获取抽奖记录信息
106
 // GetLuckDrawRecord 获取抽奖记录信息
107
 func (m *LuckDrawDao) GetLuckDrawRecord(id, tel string, page, pageSize int) ([]RecordWithPhone, error) {
107
 func (m *LuckDrawDao) GetLuckDrawRecord(id, tel string, page, pageSize int) ([]RecordWithPhone, error) {
108
 	var records []RecordWithPhone
108
 	var records []RecordWithPhone
109
-	sql := `select a.*,b.customer_name,b.phone from ta_luckdraw_record a inner join ta_customer b on a.user_id=b.customer_id where a.luckdraw_id=?`
109
+	sql := `select a.*,b.customer_name,b.phone,b.name from ta_luckdraw_record a inner join ta_customer b on a.user_id=b.customer_id where a.luckdraw_id=?`
110
 	if tel != "" {
110
 	if tel != "" {
111
 		sql = sql + ` and b.phone=` + tel
111
 		sql = sql + ` and b.phone=` + tel
112
 	}
112
 	}
119
 // GetLuckDrawRecordExcel 获取抽奖记录信息
119
 // GetLuckDrawRecordExcel 获取抽奖记录信息
120
 func (m *LuckDrawDao) GetLuckDrawRecordExcel(id, tel string) ([]RecordWithPhone, error) {
120
 func (m *LuckDrawDao) GetLuckDrawRecordExcel(id, tel string) ([]RecordWithPhone, error) {
121
 	var records []RecordWithPhone
121
 	var records []RecordWithPhone
122
-	sql := `select a.*,b.customer_name,b.phone from ta_luckdraw_record a inner join ta_customer b on a.user_id=b.customer_id where a.luckdraw_id=?`
122
+	sql := `select a.*,b.customer_name,b.phone,b.name from ta_luckdraw_record a inner join ta_customer b on a.user_id=b.customer_id where a.luckdraw_id=?`
123
 	if tel != "" {
123
 	if tel != "" {
124
 		sql = sql + ` and b.phone=` + tel
124
 		sql = sql + ` and b.phone=` + tel
125
 	}
125
 	}