liusheng
2025-03-28 d3b362de432a32c10ccd039dfc417d8c6233f543
smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml
@@ -31,17 +31,45 @@
    </resultMap>
    <sql id="selectHeLocallibraryVo">
        select id, preachcategoryid, guid, preachname, version, preachform, preachdescription, preachcontent, templateid, preachcode, centerlibraryid, isenable, orgid, update_by, update_time, del_flag, create_by, create_time, isupload, upload_time, classification, islocal, centerlibrarycode from he_locallibrary
        select id,
               preachcategoryid,
               guid,
               preachname,
               version,
               preachform,
               preachdescription,
               preachcontent,
               templateid,
               preachcode,
               centerlibraryid,
               isenable,
               orgid,
               update_by,
               update_time,
               del_flag,
               create_by,
               create_time,
               isupload,
               upload_time,
               classification,
               islocal,
               watch_count,
               centerlibrarycode
        from he_library
    </sql>
    <select id="selectHeLocallibraryList" parameterType="com.smartor.domain.HeLocallibrary" resultMap="HeLocallibraryResult">
    <select id="selectHeLocallibraryList" parameterType="com.smartor.domain.HeLocallibrary"
            resultMap="HeLocallibraryResult">
        <include refid="selectHeLocallibraryVo"/>
        <where>
            del_flag=0
            <if test="preachcategoryid != null "> and preachcategoryid = #{preachcategoryid}</if>
            <if test="preachname != null  and preachname != ''"> and preachname like concat('%', #{preachname}, '%')</if>
            <if test="version != null "> and version = #{version}</if>
            <if test="preachform != null "> and preachform = #{preachform}</if>
            <if test="preachdescription != null  and preachdescription != ''"> and preachdescription = #{preachdescription}</if>
            <if test="preachdescription != null  and preachdescription != ''">and preachdescription =
                #{preachdescription}
            </if>
            <if test="preachcontent != null  and preachcontent != ''"> and preachcontent = #{preachcontent}</if>
            <if test="templateid != null "> and templateid = #{templateid}</if>
            <if test="preachcode != null  and preachcode != ''"> and preachcode = #{preachcode}</if>
@@ -52,7 +80,9 @@
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="classification != null  and classification != ''"> and classification = #{classification}</if>
            <if test="islocal != null "> and islocal = #{islocal}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''"> and centerlibrarycode = #{centerlibrarycode}</if>
            <if test="centerlibrarycode != null  and centerlibrarycode != ''">and centerlibrarycode =
                #{centerlibrarycode}
            </if>
        </where>
    </select>
@@ -61,7 +91,8 @@
        where id = #{id}
    </select>
    <insert id="insertHeLocallibrary" parameterType="com.smartor.domain.HeLocallibrary" useGeneratedKeys="true" keyProperty="id">
    <insert id="insertHeLocallibrary" parameterType="com.smartor.domain.HeLocallibrary" useGeneratedKeys="true"
            keyProperty="id">
        insert into he_locallibrary
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="preachcategoryid != null">preachcategoryid,</if>
@@ -143,7 +174,9 @@
    </update>
    <delete id="deleteHeLocallibraryById" parameterType="Long">
        delete from he_locallibrary where id = #{id}
        delete
        from he_locallibrary
        where id = #{id}
    </delete>
    <delete id="deleteHeLocallibraryByIds" parameterType="String">