|
@@ -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 {
|