| | |
| | | from merchant m |
| | | left join transport_car_wash_service s on s.merchant_id = m.id and s.deleted = 0 |
| | | where m.deleted = 0 |
| | | and m.merchant_type = '自助洗车' |
| | | and m.merchant_type_code = 'carWash' |
| | | and (#{keyword} is null or #{keyword} = '' or m.merchant_name like concat('%', #{keyword}, '%') |
| | | or m.address like concat('%', #{keyword}, '%') or m.contact_mobile like concat('%', #{keyword}, '%')) |
| | | and (#{merchantId} is null or m.id = #{merchantId}) |
| | |
| | | select count(*) |
| | | from merchant m |
| | | where m.deleted = 0 |
| | | and m.merchant_type = '自助洗车' |
| | | and m.merchant_type_code = 'carWash' |
| | | and (#{keyword} is null or #{keyword} = '' or m.merchant_name like concat('%', #{keyword}, '%') |
| | | or m.address like concat('%', #{keyword}, '%') or m.contact_mobile like concat('%', #{keyword}, '%')) |
| | | and (#{merchantId} is null or m.id = #{merchantId}) |
| | |
| | | from merchant m |
| | | left join transport_car_wash_service s on s.merchant_id = m.id and s.deleted = 0 |
| | | where m.deleted = 0 |
| | | and m.merchant_type = '自助洗车' |
| | | and m.merchant_type_code = 'carWash' |
| | | and m.id = #{merchantId} |
| | | limit 1 |
| | | """) |
| | |
| | | from merchant m |
| | | left join transport_car_wash_service s on s.merchant_id = m.id and s.deleted = 0 |
| | | where m.deleted = 0 |
| | | and m.merchant_type = '自助洗车' |
| | | and m.merchant_type_code = 'carWash' |
| | | and m.id = #{merchantId} |
| | | limit 1 |
| | | """) |
| | |
| | | @Select(""" |
| | | select count(*) |
| | | from merchant |
| | | where deleted = 0 and merchant_type = '自助洗车' and id = #{merchantId} |
| | | where deleted = 0 and merchant_type_code = 'carWash' and id = #{merchantId} |
| | | """) |
| | | Long countCarWashMerchant(@Param("merchantId") Long merchantId); |
| | | } |
| | | } |