Files
mp-java/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml
赵忠林 f2f7595674 refactor(credit): 重构司法信用实体和导入参数结构
- 修改 CreditBreachOfTrust 实体字段定义,调整案号、当事人、涉案金额等字段映射
- 创建新的 CreditBreachOfTrustImportParam 导入参数类替代原有司法通用参数
- 更新 Controller 中的导入功能实现,使用新的参数类进行数据转换
- 调整查询条件过滤逻辑,移除不必要的字段匹配
- 为终本案件模块创建独立的导入参数类 CreditFinalVersionImportParam
- 优化导入模板生成逻辑,支持按标签页名称查找对应工作表
- 重构终本案件实体字段映射,调整被执行人和申请执行人字段定义
- 更新 Excel 导入验证逻辑,简化空行判断条件
2026-01-19 12:02:53 +08:00

90 lines
3.5 KiB
XML

<?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.gxwebsoft.credit.mapper.CreditGqdjMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*, b.name AS companyName
FROM credit_gqdj a
LEFT JOIN credit_company b ON a.company_id = b.id
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.companyId != null">
AND a.company_id = #{param.companyId}
</if>
<if test="param.dataType != null">
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
</if>
<if test="param.plaintiffAppellant != null">
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
</if>
<if test="param.appellee != null">
AND a.appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
</if>
<if test="param.occurrenceTime != null">
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
</if>
<if test="param.caseNumber != null">
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
</if>
<if test="param.causeOfAction != null">
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
</if>
<if test="param.involvedAmount != null">
AND a.involved_amount = #{param.involvedAmount}
</if>
<if test="param.courtName != null">
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
</if>
<if test="param.dataStatus != null">
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
OR b.name = #{param.keywords}
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditGqdj">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditGqdj">
<include refid="selectSql"></include>
</select>
</mapper>