Explorar el Código

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/services into dev

zjxpcyc hace 6 años
padre
commit
b19f6375bd
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5
    2
      models/statistics/cardcoupon.go

+ 5
- 2
models/statistics/cardcoupon.go Ver fichero

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