wangfei 6 years ago
parent
commit
eb94b1ed92
1 changed files with 5 additions and 20 deletions
  1. 5
    20
      models/verify/verify.go

+ 5
- 20
models/verify/verify.go View File

28
 	CourseName                   string
28
 	CourseName                   string
29
 	DetailName                   string
29
 	DetailName                   string
30
 	LocationName                 string
30
 	LocationName                 string
31
-	phone                        string
32
-	CustomerName                 string
33
-	Name                         string
34
 }
31
 }
35
 
32
 
36
 func (m *VerifyDAO) GetCustomerCourseDetailById(id string) (*model.TaCustomerCourseDetail, error) {
33
 func (m *VerifyDAO) GetCustomerCourseDetailById(id string) (*model.TaCustomerCourseDetail, error) {
53
 	d.case_name,
50
 	d.case_name,
54
 	b.course_name,	
51
 	b.course_name,	
55
 	c.detail_name,
52
 	c.detail_name,
56
-	f.location_name,
57
-	g.customer_name,
58
-	g.phone,
59
-	g.name
60
-FROM
53
+	f.location_name
54
+	FROM
61
 	ta_customer_course_detail a
55
 	ta_customer_course_detail a
62
 	INNER JOIN ta_customer_course b ON a.customer_course_id = b.customer_course_id
56
 	INNER JOIN ta_customer_course b ON a.customer_course_id = b.customer_course_id
63
 	INNER JOIN ta_course_detail c ON c.detail_id = a.detail_id
57
 	INNER JOIN ta_course_detail c ON c.detail_id = a.detail_id
64
 	INNER JOIN sys_case d ON d.case_id = a.case_id
58
 	INNER JOIN sys_case d ON d.case_id = a.case_id
65
-	INNER JOIN ta_customer g ON g.customer_id = b.customer_id
66
 	LEFT JOIN td_cms_image_location f on b.location_id=f.location_id
59
 	LEFT JOIN td_cms_image_location f on b.location_id=f.location_id
67
 	WHERE DATE_FORMAT(a.start_date,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
60
 	WHERE DATE_FORMAT(a.start_date,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
68
 	AND a.customer_course_id = '` + customerCourseId + `'
61
 	AND a.customer_course_id = '` + customerCourseId + `'
80
 	d.case_name,
73
 	d.case_name,
81
 	b.course_name,	
74
 	b.course_name,	
82
 	c.detail_name
75
 	c.detail_name
83
-FROM
76
+	FROM
84
 	ta_customer_course_detail a
77
 	ta_customer_course_detail a
85
 	INNER JOIN ta_customer_course b ON a.customer_course_id = b.customer_course_id
78
 	INNER JOIN ta_customer_course b ON a.customer_course_id = b.customer_course_id
86
 	INNER JOIN ta_course_detail c ON c.detail_id = a.detail_id
79
 	INNER JOIN ta_course_detail c ON c.detail_id = a.detail_id
110
 	a.*,
103
 	a.*,
111
 	d.case_name,
104
 	d.case_name,
112
 	b.course_name,
105
 	b.course_name,
113
-	c.detail_name,
114
-<<<<<<< HEAD
115
-	e.customer_name,
116
-	e.name,
117
-	e.phone
118
-=======
119
-	f.location_name
120
->>>>>>> 3222288848b3f933a4154106d71a5f0547c96ab6
121
-FROM
106
+	c.detail_name
107
+	FROM
122
 	ta_customer_course_detail a
108
 	ta_customer_course_detail a
123
 	INNER JOIN ta_customer_course b ON a.customer_course_id = b.customer_course_id
109
 	INNER JOIN ta_customer_course b ON a.customer_course_id = b.customer_course_id
124
 	INNER JOIN ta_course_detail c ON c.detail_id = a.detail_id
110
 	INNER JOIN ta_course_detail c ON c.detail_id = a.detail_id
125
 	INNER JOIN sys_case d ON d.case_id = a.case_id
111
 	INNER JOIN sys_case d ON d.case_id = a.case_id
126
-	INNER JOIN ta_customer e ON b.customer_id = e.customer_id
127
 	LEFT JOIN td_cms_image_location f on b.location_id=f.location_id
112
 	LEFT JOIN td_cms_image_location f on b.location_id=f.location_id
128
 	WHERE DATE_FORMAT(a.start_date,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
113
 	WHERE DATE_FORMAT(a.start_date,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
129
 	AND e.phone = '` + tel + `'
114
 	AND e.phone = '` + tel + `'