|
@@ -427,15 +427,15 @@ func (service *IntegralService) IntegralBalanceCheckService(userId,appId string)
|
|
|
}
|
|
|
|
|
|
//按月查询积分使用情况
|
|
|
-func (service *IntegralService) IntegralExpireCheck(data entity.ExpireJSON) []entity.FlowReq {
|
|
|
+func (service *IntegralService) IntegralDetailedCheck(data entity.ExpireJSON) []entity.FlowReq {
|
|
|
orm := entity.Engine
|
|
|
var err error
|
|
|
flowReq := []entity.FlowReq{}
|
|
|
err = orm.Table("integral_flow").Alias("flow").
|
|
|
Select("flow.*,pt.name").
|
|
|
Join("left", "point_type pt", "flow.pointType=pt.code").
|
|
|
- Where("userId = ? AND appId = ? AND DATE_FORMAT(createTime,'%Y-%m') ", data.UserId, data.AppId, data.EndDate).
|
|
|
- GroupBy("pointType").
|
|
|
+ Where("flow.userId = ? AND flow.appId = ? AND DATE_FORMAT(flow.createTime,'%Y-%m')=? ", data.UserId, data.AppId, data.EndDate).
|
|
|
+ Desc("flow.createTime").
|
|
|
Find(&flowReq)
|
|
|
if err != nil {
|
|
|
log.Println(err)
|