WH01243 1 год назад
Родитель
Сommit
3445177686
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      service/integralService.go

+ 1 - 1
service/integralService.go

@@ -117,7 +117,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
 	//查询积分余额是否充足
 	b, err := orm.Table("integral_solde").Select("sum(perManEntPoints)+sum(timePoints)  as  CountPoints ,userId").
 		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")).
-		Get(&balance)
+		GroupBy("userId").Get(&balance)
 	if err != nil {
 		log.Printf("积分余额查询出错,userId:[%s],err:[%v]", data.UserId, err)
 		return entity.ErrorCode, "积分余额查询出错", serialNumber