ab
2024-11-04 09d882262f530ded672f1c01fb65a1fefa00d52d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
<mapper namespace="com.nova.sankuai.infra.mapper.CustomerUserMapper">
    <select id="selectVipDateInTimeCount" resultType="java.lang.Integer">
        select count(1) from customer_user
        where vip_start_date &lt;= #{creationDate}
          and vip_end_date &gt;= #{creationDate}
          and id = #{userId}
    </select>
    <select id="selectQueueVipCount" resultType="java.lang.Integer">
        select count(1) from customer_user
         where id = #{userId} and queue_vip_code != 'NONE'
    </select>
    <select id="selectLoanVipDateInTimeCount" resultType="java.lang.Integer">
        select count(1) from customer_user
        where loan_vip_start_date &lt;= #{creationDate}
          and loan_vip_end_date &gt;= #{creationDate}
          and id = #{userId}
    </select>
    <select id="getCustomerUser" resultType="com.nova.sankuai.domain.entity.CustomerUser">
        SELECT * FROM customer_user WHERE id = #{id}
    </select>
    <select id="getCustomerUserByPhoneAndIdCardAndName"
            resultType="com.nova.sankuai.domain.entity.CustomerUser">
        SELECT * FROM customer_user WHERE id_card=#{vo.idCard} AND phone=#{vo.phone} AND name=#{vo.name}
    </select>
</mapper>