吉安感知网项目-后端
linwei
9 days ago 8585b431e9257333413358eb37c30ae58f74db76
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandAuditAttachmentMapper.xml
@@ -17,8 +17,14 @@
        <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"/>
        <result column="file_original_name" property="fileOriginalName"/>
    </resultMap>
    <select id="selectGdSupplyDemandAuditAttachmentPage" resultMap="gdSupplyDemandAuditAttachmentResultMap">
    <select id="selectGdSupplyDemandAuditAttachmentPage" resultMap="gdSupplyDemandAuditAttachmentVOResultMap">
        select * from ja_gd_supply_demand_audit_attachment where is_deleted = 0
    </select>
@@ -41,12 +47,18 @@
        </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,
            attach.original_name as file_original_name
        from ja_gd_supply_demand_audit_attachment audit_attachment
        left join blade_attach attach on attach.id::VARCHAR = audit_attachment.attach_id::VARCHAR 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>