You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.6 KiB
XML
44 lines
1.6 KiB
XML
<?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.kiisoo.ic.customer.mapper.OpVipDOMapper">
|
|
|
|
<!--会员list-->
|
|
<select id="selectVipList" resultType="com.kiisoo.ic.customer.entity.OpVip">
|
|
select t1.id as id, t1.register_time as registerTime, t1.phone as phone, t2.register_store_id as shopId
|
|
from op_vip t1,op_vip_attr t2
|
|
where t1.id = t2.vip_id
|
|
<if test="shopIds != null and shopIds.size > 0">
|
|
and t2.register_store_id in
|
|
<foreach collection="shopIds" separator="," item="item" index="index" close=")" open="(">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
<if test="startDate != null">
|
|
and t1.register_time <![CDATA[ >= ]]> #{startDate}
|
|
</if>
|
|
<if test="endDate != null">
|
|
and t1.register_time <![CDATA[ <= ]]> #{endDate}
|
|
</if>
|
|
</select>
|
|
|
|
<!--会员总数-->
|
|
<select id="selectVipCount" resultType="Long">
|
|
select count(t1.id)
|
|
from op_vip t1,op_vip_attr t2
|
|
where t1.id = t2.vip_id
|
|
<if test="shopIds != null and shopIds.size > 0">
|
|
and t2.register_store_id in
|
|
<foreach collection="shopIds" separator="," item="item" index="index" close=")" open="(">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
<if test="startDate != null">
|
|
and t1.register_time <![CDATA[ >= ]]> #{startDate}
|
|
</if>
|
|
<if test="endDate != null">
|
|
and t1.register_time <![CDATA[ <= ]]> #{endDate}
|
|
</if>
|
|
</select>
|
|
|
|
</mapper>
|