|
|
select id,user_id,channel_id,order_number,points_id,`code`,parent_code,points,variable_points,points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform} and user_id = #{userId}
|
|
select id,user_id,channel_id,order_number,points_id,`code`,parent_code,points,variable_points,points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform} and user_id = #{userId}
|
|
|
- SELECT id,user_id,channel_id,order_number,points_id,`code`,parent_code,(points-IFNULL(variable_points,0)) AS points,variable_points, 4 as points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform} and user_id = #{userId} and expiry_date <=NOW() and points-IFNULL(variable_points,0) >0 and points_type =3
|
|
|
|
|
|
|
+ SELECT id,user_id,channel_id,order_number,points_id,`code`,parent_code,points,variable_points, 4 as points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform} and user_id = #{userId} and expiry_date <=creation_date and points>0 and points_type =3
|