Browse Source

Merge branch 'master' of https://app.yhyue.com/moapp/jyPoints

WH01243 4 years ago
parent
commit
bbbce342a7
1 changed files with 5 additions and 5 deletions
  1. 5 5
      service/integralService.go

+ 5 - 5
service/integralService.go

@@ -136,7 +136,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 
 
 	//结存消耗
 	//结存消耗
 	soldelist := []entity.Solde{}
 	soldelist := []entity.Solde{}
-	err = entity.Engine.Table("integral_solde").
+	err = orm.Table("integral_solde").
 		Where("appId=? and  userId=? and (endDate = '' OR 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")).
 		Where("appId=? and  userId=? and (endDate = '' OR 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("endDate").
 		Desc("timePoints").
 		Desc("timePoints").
@@ -155,7 +155,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 				//够消耗
 				//够消耗
 				solde.PerManEntPoints = solde.PerManEntPoints - point
 				solde.PerManEntPoints = solde.PerManEntPoints - point
 				point = 0
 				point = 0
-				af, err = entity.Engine.Table("integral_solde").
+				af, err =  orm.Table("integral_solde").
 					ID(solde.Id).
 					ID(solde.Id).
 					Cols("perManEntPoints").
 					Cols("perManEntPoints").
 					Update(solde)
 					Update(solde)
@@ -171,7 +171,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 				solde.TimePoints = solde.TimePoints - point
 				solde.TimePoints = solde.TimePoints - point
 				//够消耗
 				//够消耗
 				point = 0
 				point = 0
-				af, err = entity.Engine.Table("integral_solde").
+				af, err = orm.Table("integral_solde").
 					ID(solde.Id).
 					ID(solde.Id).
 					Cols("timePoints").
 					Cols("timePoints").
 					Update(solde)
 					Update(solde)
@@ -185,7 +185,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 			//不够消耗
 			//不够消耗
 			point = point - solde.TimePoints
 			point = point - solde.TimePoints
 			solde.TimePoints = 0
 			solde.TimePoints = 0
-			af, err = entity.Engine.Table("integral_solde").
+			af, err = orm.Table("integral_solde").
 				ID(solde.Id).
 				ID(solde.Id).
 				Cols("timePoints").
 				Cols("timePoints").
 				Update(solde)
 				Update(solde)
@@ -199,7 +199,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 
 
 	//余额消耗
 	//余额消耗
 	balance.CountPoints = balance.CountPoints - data.Point
 	balance.CountPoints = balance.CountPoints - data.Point
-	af, err = entity.Engine.Table("integral_balance").
+	af, err = orm.Table("integral_balance").
 		ID(balance.Id).
 		ID(balance.Id).
 		Cols("countPoints").
 		Cols("countPoints").
 		Update(balance)
 		Update(balance)