| File was renamed from java110-db/src/main/resources/mapper/center/IitigationInfoMapper.xml |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | | |
| | |
| | | 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 |
| | |
| | | </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"> |
| | |
| | | <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 |
| | |
| | | </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> |
| | | |
| | |
| | | </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"> |
| | |
| | | <if test="litigationDate != null"> |
| | | and t.litigation_date = #{litigationDate} |
| | | </if> |
| | | <if test="ownerId != null and ownerId != ''"> |
| | | and t.owner_id = #{ownerId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 按年月分组统计讼诉情况数量和金额 --> |
| | |
| | | <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> |
| | |
| | | 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> |