yanghui
2022-11-10 ec96abc7c3d9ef48b00c321eed85f9d934c699a5
flower_city/src/main/resources/mapper/ElseAccessoryMapper.xml
@@ -26,7 +26,23 @@
    </sql>
    <select id="selectConfigList"  resultMap="ElseAccessoryEntityResult">
        <include refid="selectElseAccessoryEntityVo"/>
        SELECT
        id,
        department_id,
        (select organization_name from automessage_organization_chart where automessage_organization_chart.id=automessage_else_accessory.department_id) as departmentName,
        create_time,
        update_time,
        url,
        name,
        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>
        FROM
        automessage_else_accessory
        <where>
            <if test="Name != null and Name != ''">
                AND automessage_else_accessory.name like concat('%', #{Name}, '%')
@@ -57,6 +73,7 @@
        <if test="departmentId != null and departmentId != '' ">department_id,</if>
        <if test="name != null and name != '' ">name,</if>
        <if test="url != null and url != '' ">url,</if>
        <if test="createUserId != null and createUserId != '' ">create_user_id,</if>
        update_time,
        create_time
        )values(
@@ -64,6 +81,7 @@
        <if test="departmentId != null and departmentId != '' ">#{departmentId},</if>
        <if test="name != null and name != ''  ">#{name},</if>
        <if test="url != null and url != '' ">#{url},</if>
        <if test="createUserId != null and createUserId != '' ">#{createUserId},</if>
        sysdate(),
        sysdate()
        )