|
@@ -18,8 +18,9 @@ func (service *IntegralService) IntegralAddService(data entity.FlowJSON) (int64,
|
|
|
flow := entity.Flow{}
|
|
|
flow.UserId = data.UserId
|
|
|
flow.SourceId = data.SourceId
|
|
|
- flow.SourceType = data.SourceType
|
|
|
+ //flow.SourceType = data.SourceType
|
|
|
flow.PointType = data.PointType
|
|
|
+ flow.SourceType=fmt.Sprint(data.PointType)
|
|
|
flow.Point = data.Point
|
|
|
flow.EndDate=data.EndDate
|
|
|
flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")
|
|
@@ -216,9 +217,10 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
|
|
|
//消耗积分流水记录
|
|
|
flow := entity.Flow{}
|
|
|
flow.UserId = data.UserId
|
|
|
+ flow.SourceType=fmt.Sprint(data.PointType)
|
|
|
flow.PointType = data.PointType
|
|
|
flow.SourceId = data.SourceId
|
|
|
- flow.SourceType = data.SourceType
|
|
|
+ //flow.SourceType = data.SourceType
|
|
|
flow.Point = data.Point
|
|
|
flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")
|
|
|
flow.EndDate = data.EndDate
|
|
@@ -432,7 +434,7 @@ func (service *IntegralService) IntegralGuardService(endDate string) bool {
|
|
|
flow.UserId = solde.UserId
|
|
|
flow.PointType = 2004
|
|
|
flow.SourceId = ""
|
|
|
- flow.SourceType = ""
|
|
|
+ flow.SourceType = "2004"
|
|
|
flow.Point = solde.TimePoints
|
|
|
flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")
|
|
|
flow.EndDate = solde.EndDate
|
|
@@ -475,7 +477,7 @@ func (service *IntegralService) IntegralBalanceCheckService(userId,appId string
|
|
|
Get(&balance)
|
|
|
if !b || err != nil {
|
|
|
log.Println("暂无积分余额")
|
|
|
- return false, 0,0
|
|
|
+ return false, 1,0
|
|
|
}
|
|
|
//积分30天内到期余额
|
|
|
var solde entity.Solde
|
|
@@ -516,7 +518,8 @@ func (service *IntegralService) IntegralDetailedCheck(data entity.FlowJSON) ([]*
|
|
|
point.EndDate = value.EndDate
|
|
|
point.Sort = value.Sort
|
|
|
point.Point = value.Point
|
|
|
- point.CreateTime = value.CreateTime
|
|
|
+ createTimeStr := value.CreateTime.Format("2006-01-02")
|
|
|
+ point.CreateTime = createTimeStr
|
|
|
point.PointType = value.PointType
|
|
|
point.SourceId = value.SourceId
|
|
|
point.SourceType = value.SourceType
|