mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
30
31
32
33
34
35
36
<?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.panzhihua.service_community.dao.ComActAcidMemberDao">
 
    <resultMap type="com.panzhihua.service_community.entity.ComActAcidMember" id="ComActAcidMemberBaseResultMap">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="phone" column="phone"/>
        <result property="pushStatus" column="push_status"/>
        <result property="relationName" column="relation_name"/>
        <result property="createTime" column="create_time"/>
    </resultMap>
 
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO">
        select * from com_act_acid_member
        <where>
            <if test="commonPage.keyword!=null and commonPage.keyword!=''">
                and (name like concat('%',#{commonPage.keyword},'%') or phone like concat('%',#{commonPage.keyword},'%'))
            </if>
            <if test="commonPage.pushStatus!=null">
                and push_status = #{commonPage.pushStatus}
            </if>
            <if test="commonPage.relationName!=null and commonPage.relationName !=''">
                and relation_name =#{commonPage.relationName}
            </if>
        </where>
        order by create_time desc
    </select>
    <select id="selectPushList" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO">
        SELECT t1.id, t1.`name`, t1.phone, t2.openid
        FROM com_act_acid_member t1
        JOIN sys_user t2 ON t1.phone = t2.phone AND `type` = 1
        WHERE t1.push_status = 1 <if test="relationName!=null and relationName !=''">AND t1.relation_name = #{relationName}</if>
    </select>
 
</mapper>