qirong
2023-11-28 fe0a4c0495cf9f1a65343158c2a8c2d4a163e045
src/main/resources/mapper/ExamTemplatesMapper.xml
@@ -32,17 +32,20 @@
    <select id="gets" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.domain.vo.ExamTemplatesVO">
        select
        <include refid="Base_Column_List"/>
        from t_exam_templates
        where
            <choose>
                <when test="status != null">
                    status = 0
                </when>
                <otherwise>
                    status is null
                </otherwise>
            </choose>
        e.*
        from t_exam_templates e
        inner join t_exam_templates_user u on e.id = u.templates_id
        <where>
            <if test="status != null">
                and e.status = 0
            </if>
            <if test="status == null">
                and e.status is null
            </if>
            <if test="userId != null">
                and u.user_id = #{userId}
            </if>
        </where>
    </select>
    <select id="getById" resultMap="BaseResultMap">