|
@@ -5,6 +5,8 @@ import (
|
5
|
5
|
"strconv"
|
6
|
6
|
"strings"
|
7
|
7
|
"time"
|
|
8
|
+
|
|
9
|
+ "github.com/astaxie/beego"
|
8
|
10
|
)
|
9
|
11
|
|
10
|
12
|
// CardCouponStatistics 商品统计信息
|
|
@@ -293,7 +295,7 @@ func (m *StatisticsDAO) CardCouponUsedStatistics(caseids, tel, name, receivetype
|
293
|
295
|
sql = sql + ` and tab.receiving_type = '` + receivetype + `'`
|
294
|
296
|
}
|
295
|
297
|
if status != "" {
|
296
|
|
- sql = sql + ` and tab.verify_status = '` + receivetype + `'`
|
|
298
|
+ sql = sql + ` and tab.verify_status = '` + status + `'`
|
297
|
299
|
}
|
298
|
300
|
if begindate != "" {
|
299
|
301
|
sql = sql + ` and DATE_FORMAT(tab.receive_date, '%Y-%m-%d') >= '` + begindate + `'`
|
|
@@ -393,7 +395,7 @@ func (m *StatisticsDAO) CardCouponUsedCountStatistics(caseids, tel, name, receiv
|
393
|
395
|
sql = sql + ` and tab.receiving_type = '` + receivetype + `'`
|
394
|
396
|
}
|
395
|
397
|
if status != "" {
|
396
|
|
- sql = sql + ` and tab.verify_status = '` + receivetype + `'`
|
|
398
|
+ sql = sql + ` and tab.verify_status = '` + status + `'`
|
397
|
399
|
}
|
398
|
400
|
if begindate != "" {
|
399
|
401
|
sql = sql + ` and DATE_FORMAT(tab.receive_date, '%Y-%m-%d') >= '` + begindate + `'`
|
|
@@ -401,6 +403,7 @@ func (m *StatisticsDAO) CardCouponUsedCountStatistics(caseids, tel, name, receiv
|
401
|
403
|
if enddate != "" {
|
402
|
404
|
sql = sql + ` and DATE_FORMAT(tab.receive_date, '%Y-%m-%d') <= '` + enddate + `'`
|
403
|
405
|
}
|
|
406
|
+ beego.Error(sql)
|
404
|
407
|
err := m.db.Sql(sql).Find(&cardCoupons)
|
405
|
408
|
return cardCoupons, err
|
406
|
409
|
}
|