linwe
2023-11-24 8a28bb397d5743edf1da5930db0d6d0fdd86b35e
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
37
38
39
40
41
42
43
44
45
46
<?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="org.springblade.modules.discuss.mapper.UserPublicEnrollMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="userPublicEnrollResultMap" type="org.springblade.modules.discuss.entity.UserPublicEnrollEntity">
        <result property="id"    column="id"    />
        <result property="publicDiscussId"    column="public_discuss_id"    />
        <result property="userId"    column="user_id"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="deleteFlag"    column="delete_flag"    />
    </resultMap>
 
    <sql id="selectUserPublicEnroll">
        select
            id,
            public_discuss_id,
            user_id,
            create_time,
            update_time,
            delete_flag
        from
            jczz_user_public_enroll
    </sql>
 
 
 
    <select id="selectUserPublicEnrollPage" resultMap="userPublicEnrollResultMap">
        select * from jczz_user_public_enroll where deleted_flag = 0
    </select>
 
    <select id="selectUserPublicEnrollList" parameterType="org.springblade.modules.discuss.dto.UserPublicEnrollDTO" resultMap="userPublicEnrollResultMap">
        <include refid="selectUserPublicEnroll"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="publicDiscussId != null "> and public_discuss_id = #{publicDiscussId}</if>
            <if test="userId != null "> and user_id = #{userId}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
        </where>
    </select>
 
 
</mapper>