You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fu-hsi-service/src/main/resources/mapper/NoteRecordMapper.xml

35 lines
1.5 KiB
XML

10 months ago
<?xml version="1.0" encoding="UTF-8"?>
10 months ago
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
10 months ago
<mapper namespace="com.supervision.police.mapper.NoteRecordMapper">
9 months ago
<select id="selectNoteRecordDTOList" resultType="com.supervision.police.dto.NoteRecordDTO">
select r.id as id,
r.case_id as caseId,
r.case_person_id as casePersonId,
p.id_card as casePersonIdCard,
r.record_name as recordName,
r.file_ids as fileIds,
p.name as name,
p.role_code as role,
r.law_asker as lawAsker,
r.confession_material as confessionMaterial,
r.confession_start_time as confessionStartTime,
r.confession_end_time as confessionEndTime,
p.id_card as idCard,
r.create_time as createTime
from note_record r
left join case_person p on r.case_person_id = p.id
where r.data_status = '1'
<if test="caseId != null and caseId != ''">
and r.case_id = #{caseId}
</if>
<if test="name != null and name != ''">
and p.name like concat('%', #{name}, '%')
</if>
<if test="role != null and role != ''">
and p.role_code = #{role}
</if>
</select>
10 months ago
</mapper>