shiyunteng
2026-08-26 b967d23ae6c1f7761feb3c5328e3b591df6a735d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
<mapper namespace="com.by4cloud.platformx.business.mapper.DropLossMapper">
 
  <resultMap id="dropLossMap" type="com.by4cloud.platformx.business.entity.DropLoss">
        <id property="id" column="id"/>
        <result property="compId" column="comp_id"/>
        <result property="attachmentName" column="attachment_name"/>
        <result property="attachmentUrl" column="attachment_url"/>
        <result property="contractId" column="contract_id"/>
        <result property="dropAmount" column="drop_amount"/>
        <result property="dropDate" column="drop_date"/>
        <result property="dropRemark" column="drop_remark"/>
        <result property="dropUser" column="drop_user"/>
        <result property="dropUserId" column="drop_user_id"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
  </resultMap>
    <select id="pageScope" resultType="com.by4cloud.platformx.business.vo.DropLossPageVo">
        select
            d.id,
            d.comp_id,
            d.attachment_name,
            d.attachment_url,
            d.contract_id,
            d.drop_amount,
            d.drop_date,
            d.drop_remark,
            d.drop_user,
            d.drop_user_id,
            c.contract_no,
            c.party_a,
            c.party_b,
            c.amount
        from
            drop_loss d
        left join contract c
        on d.contract_id = c.id
        where
            d.del_flag='0'
        and c.del_flag='0'
        <if test="queryDTO.contractNo!=null and queryDTO.contractNo != ''">
            and c.contract_no like CONCAT('%', #{queryDTO.contractNo}, '%')
        </if>
        order by d.create_time desc
    </select>
</mapper>