李哲 %!s(int64=4) %!d(string=hai) anos
pai
achega
76ba702969
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {