李哲 4 سال پیش
والد
کامیت
76ba702969
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      service/integralService.go

+ 1 - 1
service/integralService.go

@@ -122,7 +122,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 	//结存消耗
 	soldelist := []entity.Solde{}
 	err = entity.Engine.Table("integral_solde").
-		Where("appId=? and  userId=? and endDate>= ? and( 	( perManEntPoints != 0 AND timePoints = 0 ) OR ( perManEntPoints = 0 AND timePoints != 0 ))", data.AppId, data.UserId, time.Now().Format("2006-01-02")).
+		Where("appId=? and  userId=? and (endDate IS NULL OR endDate >= ?) and (( perManEntPoints != 0 AND timePoints = 0 ) OR ( perManEntPoints = 0 AND timePoints != 0 ))", data.AppId, data.UserId, time.Now().Format("2006-01-02")).
 		Desc("endDate").
 		Desc("timePoints").Find(&soldelist)
 	if len(soldelist) == 0 {