yanghui
2022-11-10 ec96abc7c3d9ef48b00c321eed85f9d934c699a5
flower_city/src/main/resources/mapper/ReplyTemplateMapper.xml
@@ -47,7 +47,33 @@
    </sql>
    <select id="selectConfigList"  resultMap="ReplyTemplateResult">
        <include refid="selectReplyTemplateVo"/>
        SELECT
        id,
        name,
        create_time,
        update_time,
        handle_state,
        response,
        accessory_url,
        accessory_name,
        video_url,
        video_name,
        picture_url,
        picture_name,
        department_id,
        create_user_id,
        <if test="userId!=null and userId!=''">
            (case create_user_id when  #{userId} then 1 else 0 end)isDelete,
        </if>
        <if test="userId==null or userId==''">
            1 isDelete,
        </if>
        accessory_id,
        (select organization_name from automessage_organization_chart where automessage_organization_chart.id=automessage_reply_template.department_id) as departmentName,
        (select user_name from automessage_sys_user where automessage_sys_user.user_id=automessage_reply_template.create_user_id) as createUser,
        guidance
        FROM
        automessage_reply_template
        <where>
            <if test="Name != null and Name != ''">
                AND automessage_reply_template.name like concat('%', #{Name}, '%')