chengf
2026-01-27 b6184e2ddf3db37a94f7efb3b619bbc64642a292
java110-db/src/main/resources/mapper/center/LitigationInfoMapper.xml
File was renamed from java110-db/src/main/resources/mapper/center/IitigationInfoMapper.xml
@@ -8,10 +8,10 @@
    <insert id="saveLitigationInfo" parameterType="Map">
        insert into litigation_info(
        litigation_date, arrears_period, arrears_amount, late_fee,
        acceptance_fee, other_fee, submitter
        acceptance_fee, other_fee, submitter, owner_id
        ) values (
        #{litigationDate}, #{arrearsPeriod}, #{arrearsAmount}, #{lateFee},
        #{acceptanceFee}, #{otherFee}, #{submitter}
        #{acceptanceFee}, #{otherFee}, #{submitter}, #{ownerId}
        )
    </insert>
@@ -19,11 +19,11 @@
    <insert id="batchSaveLitigationInfo" parameterType="Map">
        insert into litigation_info(
        litigation_date, arrears_period, arrears_amount, late_fee,
        acceptance_fee, other_fee, submitter
        acceptance_fee, other_fee, submitter, owner_id
        ) values
        <foreach collection="litigationList" item="item" separator=",">
            ( #{item.litigationDate}, #{item.arrearsPeriod}, #{item.arrearsAmount}, #{item.lateFee},
            #{item.acceptanceFee}, #{item.otherFee}, #{item.submitter} )
            #{item.acceptanceFee}, #{item.otherFee}, #{item.submitter}, #{item.ownerId} )
        </foreach>
    </insert>
@@ -39,6 +39,7 @@
        t.other_fee otherFee,
        t.total_amount totalAmount,
        t.submitter submitter,
        t.owner_id ownerId,
        t.create_time createTime,
        t.update_time updateTime
        from litigation_info t
@@ -57,6 +58,9 @@
        </if>
        <if test="submitter != null and submitter != ''">
            and t.submitter = #{submitter}
        </if>
        <if test="ownerId != null and ownerId != ''">
            and t.owner_id = #{ownerId}
        </if>
        <!-- 金额范围查询 -->
        <if test="minArrearsAmount != null">
@@ -115,6 +119,9 @@
            <if test="submitter != null and submitter != ''">
                t.submitter = #{submitter},
            </if>
            <if test="ownerId != null and ownerId != ''">
                t.owner_id = #{ownerId},
            </if>
            t.update_time = CURRENT_TIMESTAMP
        </set>
        where 1 = 1
@@ -135,6 +142,9 @@
        </if>
        <if test="submitter != null and submitter != ''">
            and t.submitter = #{submitter}
        </if>
        <if test="ownerId != null and ownerId != ''">
            and t.owner_id = #{ownerId}
        </if>
    </delete>
@@ -157,6 +167,9 @@
        </if>
        <if test="submitter != null and submitter != ''">
            and t.submitter = #{submitter}
        </if>
        <if test="ownerId != null and ownerId != ''">
            and t.owner_id = #{ownerId}
        </if>
        <!-- 金额范围查询 -->
        <if test="minArrearsAmount != null">
@@ -204,6 +217,9 @@
        <if test="litigationDate != null">
            and t.litigation_date = #{litigationDate}
        </if>
        <if test="ownerId != null and ownerId != ''">
            and t.owner_id = #{ownerId}
        </if>
    </select>
    <!-- 按年月分组统计讼诉情况数量和金额 -->
@@ -224,6 +240,9 @@
        <if test="submitter != null and submitter != ''">
            and t.submitter = #{submitter}
        </if>
        <if test="ownerId != null and ownerId != ''">
            and t.owner_id = #{ownerId}
        </if>
        group by date_format(t.create_time, '%Y-%m')
        order by month desc
    </select>
@@ -240,10 +259,14 @@
        t.other_fee otherFee,
        t.total_amount totalAmount,
        t.submitter submitter,
        t.owner_id ownerId,
        t.create_time createTime,
        t.update_time updateTime
        from litigation_info t
        where t.litigation_date = #{litigationDate}
        <if test="ownerId != null and ownerId != ''">
            and t.owner_id = #{ownerId}
        </if>
        order by t.update_time desc
        limit 1
    </select>