forked from gzzfw/backEnd/gz-dyh

liyj
2024-08-31 be5e72f7f7b7edf047ea26c04e1fcf19052eeee8
dyh-service/dyh-sys/src/main/java/cn/huge/module/file/dao/mapper/xml/FileRelateMapper.xml
@@ -13,6 +13,7 @@
    <resultMap id="dataResult" type="cn.huge.module.file.domain.po.FileRelate">
            <result property="id" column="id"/>
            <result property="fileId" column="file_id"/>
            <result property="mainId" column="main_id"/>
            <result property="ownerId" column="owner_id"/>
            <result property="ownerCat" column="owner_cat"/>
            <result property="ownerType" column="owner_type"/>
@@ -29,6 +30,7 @@
    <sql id="column-part">
        id,
        file_id,
        main_id,
        owner_id,
        owner_cat,
        owner_type,
@@ -42,6 +44,7 @@
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.fileId != null">file_id = #{entity.fileId},</if>
            <if test="entity.mainId != null">main_id = #{entity.mainId},</if>
            <if test="entity.ownerId != null">owner_id = #{entity.ownerId},</if>
            <if test="entity.ownerCat != null">owner_cat = #{entity.ownerCat},</if>
            <if test="entity.ownerType != null">owner_type = #{entity.ownerType},</if>
@@ -62,6 +65,9 @@
                <if test="terms.fileId != null and terms.fileId !=''">
                    and file_id = #{terms.fileId}
                </if>
                <if test="terms.mainId != null and terms.mainId !=''">
                    and main_id = #{terms.mainId}
                </if>
                <if test="terms.ownerId != null and terms.ownerId !=''">
                    and owner_id = #{terms.ownerId}
                </if>