|
@@ -328,7 +328,8 @@ func (m *CardDAO) GetCardWithCustomer(cardid string) (*CaseUsableCard, error) {
|
328
|
328
|
// CustomerCardWithShare 我的卡券关联分享信息
|
329
|
329
|
type CustomerCardWithShare struct {
|
330
|
330
|
model.TaCustomerCard `xorm:"extends"`
|
331
|
|
- CustomerCardId string
|
|
331
|
+ CustomerCourseId string
|
|
332
|
+ CourseId string
|
332
|
333
|
CourseNum int
|
333
|
334
|
JoinNum int
|
334
|
335
|
CourseName string
|
|
@@ -338,7 +339,7 @@ type CustomerCardWithShare struct {
|
338
|
339
|
// GetCardByCustomer 获取我的体验卡
|
339
|
340
|
func (m *CardDAO) GetCardByCustomer(orgid, customerid string) ([]CustomerCardWithShare, error) {
|
340
|
341
|
var cards []CustomerCardWithShare
|
341
|
|
- sql := `select a.*,b.customer_course_id,b.course_num,b.join_num,b.course_name from ta_customer_card a left join ta_customer_course b on a.customer_card_id = b.source_id where a.status>? and a.customer_id=? and a.org_id=?`
|
|
342
|
+ sql := `select a.*,b.customer_course_id,b.course_id,b.course_num,b.join_num,b.course_name from ta_customer_card a left join ta_customer_course b on a.customer_card_id = b.source_id where a.status>? and a.customer_id=? and a.org_id=?`
|
342
|
343
|
err := m.db.Sql(sql, models.STATUS_DEL, customerid, orgid).Find(&cards)
|
343
|
344
|
if err != nil {
|
344
|
345
|
return nil, err
|