|
@ -35,7 +35,15 @@ |
|
|
<select id="selectPointByCustomerUserId" resultType="com.epmet.dto.result.ResiPointDetailResultDTO"> |
|
|
<select id="selectPointByCustomerUserId" resultType="com.epmet.dto.result.ResiPointDetailResultDTO"> |
|
|
SELECT |
|
|
SELECT |
|
|
USABLE_POINT AS usablePoint, |
|
|
USABLE_POINT AS usablePoint, |
|
|
TOTAL_POINT AS accumulatedPoint |
|
|
TOTAL_POINT AS accumulatedPoint, |
|
|
|
|
|
( |
|
|
|
|
|
select IFNULL(sum(u.POINT),0) from user_point_action_log u |
|
|
|
|
|
where u.DEL_FLAG='0' |
|
|
|
|
|
and u.CUSTOMER_ID=#{customerId} |
|
|
|
|
|
and u.USER_ID=#{userId} |
|
|
|
|
|
and u.EVENT_ID !='manual' |
|
|
|
|
|
AND DATE_FORMAT(u.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') |
|
|
|
|
|
)as todayObtainedPoint |
|
|
FROM |
|
|
FROM |
|
|
USER_POINT_TOTAL |
|
|
USER_POINT_TOTAL |
|
|
WHERE |
|
|
WHERE |
|
|