/* Generate DSL code */

/* 当前等级 */
case when memberGrade60004.currentGradeName is null then "" else memberGrade60004.currentGradeName end

/* 距离下一等级所需积分 */
case when totalPoint>= 50 then 0 when totalPoint<= 50 then 50-totalPoint else 0 end

/* 待生效积分 */
sum(
case 
when 
(
memberPoint60038.pointRecord.changePoint=0
or
memberPoint60038.pointRecord.changePoint is null
)
then memberPoint60038.pointRecord.point
else 0.0
end
)
-
sum(
case 
when memberPoint60038.pointRecord.recordType='TIMER'
then memberPoint60038.pointRecord.changePoint
else 0.0
end
)

/* 累计获得快乐瓶 */
sum(
case
when memberPoint60038.pointRecord.recordType!='REVERSE_SEND'
&& memberPoint60038.pointRecord.changePoint>0
then memberPoint60038.pointRecord.changePoint
else 0.0
end
)
-
sum(
case when 
(
memberPoint60038.pointRecord.recordType 
in ('UNFREEZE','SPECIAL_UNFREEZE','OPEN_UNFREEZE')
&&
memberPoint60038.pointRecord.changePoint>0
)
then memberPoint60038.pointRecord.changePoint
else 0.0
end 
)
+
sum(
case
when memberPoint60038.pointRecord.recordType='REVERSE_DEDUCT'
&& memberPoint60038.pointRecord.changePoint<0
then memberPoint60038.pointRecord.changePoint
else 0.0
end
)

/* 生日月份积分双倍 */ Make sure to only use capital letters in your entire response.
user