|
@@ -98,12 +98,7 @@ func (service *IntegralService) IntegralAddService(data entity.FlowJSON) (int, s
|
|
|
return entity.ErrorCode, "余额新增失败"
|
|
|
}
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
return entity.SuccessCode, "余额新增成功"
|
|
|
-=======
|
|
|
- return entity.SuccessCode, "余额扣除失败"
|
|
|
->>>>>>> fe8bc988f5e435ac07c7685f68745db1a4ebc0f4
|
|
|
}
|
|
|
|
|
|
//消耗积分流水
|
|
@@ -118,11 +113,8 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
|
|
|
flow.CreateTime = time.Now().Format("2006-01-02 15:04:05")
|
|
|
flow.EndDate = data.EndDate
|
|
|
flow.AppId = data.AppId
|
|
|
-<<<<<<< HEAD
|
|
|
flow.Sort = entity.ReduceCode
|
|
|
//判断是否为消耗积分:false
|
|
|
-=======
|
|
|
->>>>>>> fe8bc988f5e435ac07c7685f68745db1a4ebc0f4
|
|
|
balance := entity.Balance{}
|
|
|
//查询积分余额是否充足
|
|
|
b, err := orm.Table("integral_balance").Select("countPoints,id").
|
|
@@ -136,13 +128,8 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
|
|
|
return entity.ErrorCode, "积分余额不足"
|
|
|
}
|
|
|
af, err := orm.Table("integral_flow").Insert(&flow)
|
|
|
-<<<<<<< HEAD
|
|
|
- if err != nil && af == 0 {
|
|
|
- log.Print("积分记录失败-积分增减类型:", data.Sort)
|
|
|
-=======
|
|
|
if err != nil && af==0{
|
|
|
log.Print("积分记录失败")
|
|
|
->>>>>>> fe8bc988f5e435ac07c7685f68745db1a4ebc0f4
|
|
|
return entity.ErrorCode, "积分记录失败"
|
|
|
}
|
|
|
|
|
@@ -201,12 +188,7 @@ func (service *IntegralService) IntegralConsumeService(data entity.FlowJSON) (in
|
|
|
log.Print("余额扣除失败")
|
|
|
return entity.ErrorCode, "余额扣除失败"
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
return entity.SuccessCode, "积分消耗成功"
|
|
|
-=======
|
|
|
- return entity.SuccessCode, "积分记录成功"
|
|
|
->>>>>>> fe8bc988f5e435ac07c7685f68745db1a4ebc0f4
|
|
|
}
|
|
|
|
|
|
//到期积分查询
|