This commit is contained in:
mashuai 2024-09-20 15:31:32 +08:00
parent ee5f206117
commit b1e35e8f43
1 changed files with 7 additions and 4 deletions

View File

@ -198,12 +198,15 @@
<!--by syruan on 2024-09-11-->
<select id="getAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tb_bd_device_record
select
tbdr.id, tbdr.record_id, tbdr.dev_name, tbdr.dev_code, tbdr.unit_name, tbdr.area_name, tbdr.dev_user, tbdr.dev_user_phone,
tbr.audit_user as auditUser, tbr.audit_time as auditTime, su.nick_name as auditUserName
from tb_bd_device_record tbdr
left join tb_bd_record tbr on tbdr.record_id = tbr.id
left join sys_user su on tbr.audit_user = su.user_id
<where>
<if test="recordId != null">
and record_id = #{recordId}
and tbdr.record_id = #{recordId}
</if>
</where>
</select>