| | |
| | | b.action_mode as actionMode, |
| | | b.status as benefitStatus |
| | | from transport_parking_card_level_right r |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type in ('parking', '停车服务') |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type_code = 'parking' |
| | | left join transport_parking_benefit b on b.merchant_id = m.id and b.deleted = 0 |
| | | where r.deleted = 0 |
| | | and (#{merchantId} is null or r.merchant_id = #{merchantId}) |
| | |
| | | @Select(""" |
| | | select count(*) |
| | | from transport_parking_card_level_right r |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type in ('parking', '停车服务') |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type_code = 'parking' |
| | | where r.deleted = 0 |
| | | and (#{merchantId} is null or r.merchant_id = #{merchantId}) |
| | | and (#{cardLevel} is null or #{cardLevel} = '' or r.card_level = #{cardLevel}) |
| | |
| | | b.action_mode as actionMode, |
| | | b.status as benefitStatus |
| | | from transport_parking_card_level_right r |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type in ('parking', '停车服务') |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type_code = 'parking' |
| | | left join transport_parking_benefit b on b.merchant_id = m.id and b.deleted = 0 |
| | | where r.deleted = 0 |
| | | and r.merchant_id = #{merchantId} |
| | |
| | | b.action_mode as actionMode, |
| | | b.status as benefitStatus |
| | | from transport_parking_card_level_right r |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type in ('parking', '停车服务') and m.status = 1 |
| | | join merchant m on m.id = r.merchant_id and m.deleted = 0 and m.merchant_type_code = 'parking' and m.status = 1 |
| | | join transport_parking_benefit b on b.merchant_id = m.id and b.deleted = 0 and b.status = 1 |
| | | where r.deleted = 0 |
| | | and r.enabled = 1 |
| | |
| | | order by m.sort_no desc, m.id desc |
| | | """) |
| | | List<Map<String, Object>> selectAvailableForCard(@Param("cardLevel") String cardLevel, @Param("merchantId") Long merchantId); |
| | | } |
| | | } |