吉安感知网项目-后端
rain
2026-01-19 573434c87d7a1415e64db6ce8e6edca30c2c4239
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml
@@ -17,6 +17,11 @@
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <resultMap id="gdSupplyDemandAuditAttachmentVOResultMap" type="org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditAttachmentVO" extends="gdSupplyDemandAuditAttachmentResultMap">
        <result column="file_url" property="fileUrl"/>
        <result column="file_size" property="fileSize"/>
    </resultMap>
    <select id="selectGdSupplyDemandAuditAttachmentPage" resultMap="gdSupplyDemandAuditAttachmentResultMap">
        select * from ja_gd_supply_demand_audit_attachment where is_deleted = 0
@@ -41,12 +46,17 @@
        </foreach>
    </insert>
    <select id="selectSupplyDemandAuditAttachmentList" resultMap="gdSupplyDemandAuditAttachmentResultMap">
        select * from ja_gd_supply_demand_audit_attachment
    <select id="selectSupplyDemandAuditAttachmentList" resultMap="gdSupplyDemandAuditAttachmentVOResultMap">
        select
            audit_attachment.*,
            attach.link as file_url,
            round(attach.attach_size / 1024 / 1024, 2) as file_size
        from ja_gd_supply_demand_audit_attachment audit_attachment
        left join blade_attach attach on attach.id = audit_attachment.attach_id and attach.is_deleted = 0
        <where>
            is_deleted = 0
            audit_attachment.is_deleted = 0
            <if test="demandId != null">
                AND demand_id = #{demandId}
                AND audit_attachment.demand_id = #{demandId}
            </if>
        </where>
    </select>