|
@@ -36,25 +36,25 @@
|
|
(id_,header_,device_no,alias_name,address_,is_online,company_id,unlock_password,code_address,ip_address,port_,type_,is_auto_update,del_flag,create_by,create_time,update_by,update_time,default_face_library_id)
|
|
(id_,header_,device_no,alias_name,address_,is_online,company_id,unlock_password,code_address,ip_address,port_,type_,is_auto_update,del_flag,create_by,create_time,update_by,update_time,default_face_library_id)
|
|
values
|
|
values
|
|
(
|
|
(
|
|
-#{id,jdbcType=VARCHAR}
|
|
|
|
-,#{header,jdbcType=VARCHAR}
|
|
|
|
-,#{deviceNo,jdbcType=VARCHAR}
|
|
|
|
-,#{aliasName,jdbcType=VARCHAR}
|
|
|
|
-,#{address,jdbcType=VARCHAR}
|
|
|
|
-,#{isOnline,jdbcType= NUMERIC }
|
|
|
|
-,#{companyId,jdbcType=VARCHAR}
|
|
|
|
-,#{unlockPassword,jdbcType=VARCHAR}
|
|
|
|
-,#{codeAddress,jdbcType=VARCHAR}
|
|
|
|
-,#{ipAddress,jdbcType=VARCHAR}
|
|
|
|
-,#{port,jdbcType=VARCHAR}
|
|
|
|
-,#{type,jdbcType=VARCHAR}
|
|
|
|
-,#{isAutoUpdate,jdbcType=NUMERIC}
|
|
|
|
-,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
-,#{createBy,jdbcType=VARCHAR}
|
|
|
|
-,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
-,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
-,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
-,#{defaultFaceLibraryId,jdbcType=VARCHAR}
|
|
|
|
|
|
+ #{id,jdbcType=VARCHAR}
|
|
|
|
+ ,#{header,jdbcType=VARCHAR}
|
|
|
|
+ ,#{deviceNo,jdbcType=VARCHAR}
|
|
|
|
+ ,#{aliasName,jdbcType=VARCHAR}
|
|
|
|
+ ,#{address,jdbcType=VARCHAR}
|
|
|
|
+ ,#{isOnline,jdbcType= NUMERIC }
|
|
|
|
+ ,#{companyId,jdbcType=VARCHAR}
|
|
|
|
+ ,#{unlockPassword,jdbcType=VARCHAR}
|
|
|
|
+ ,#{codeAddress,jdbcType=VARCHAR}
|
|
|
|
+ ,#{ipAddress,jdbcType=VARCHAR}
|
|
|
|
+ ,#{port,jdbcType=VARCHAR}
|
|
|
|
+ ,#{type,jdbcType=VARCHAR}
|
|
|
|
+ ,#{isAutoUpdate,jdbcType=NUMERIC}
|
|
|
|
+ ,#{delFlag,jdbcType= NUMERIC }
|
|
|
|
+ ,#{createBy,jdbcType=VARCHAR}
|
|
|
|
+ ,#{createTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{updateBy,jdbcType=VARCHAR}
|
|
|
|
+ ,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
|
+ ,#{defaultFaceLibraryId,jdbcType=VARCHAR}
|
|
)
|
|
)
|
|
]]>
|
|
]]>
|
|
</insert>
|
|
</insert>
|
|
@@ -178,8 +178,18 @@ id_, header_,device_no,alias_name,address_,is_online,company_id,unlock_password,
|
|
select * from base_device_info where device_no = #{0} and del_flag=false
|
|
select * from base_device_info where device_no = #{0} and del_flag=false
|
|
</select>
|
|
</select>
|
|
<select id="findByCompanyId" parameterType="string" resultMap="DeviceInfoMap">
|
|
<select id="findByCompanyId" parameterType="string" resultMap="DeviceInfoMap">
|
|
- select * from base_device_info where company_id = #{0} and del_flag=false
|
|
|
|
|
|
+ <![CDATA[
|
|
|
|
+ select * from base_device_info a where
|
|
|
|
+ (
|
|
|
|
+ a.company_id = #{0}
|
|
|
|
+ or
|
|
|
|
+ a.id_ in(
|
|
|
|
+ select b.device_id from base_company_device_relation b
|
|
|
|
+ where b.device_id=a.id_ and b.company_id=#{0}
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ and del_flag=0
|
|
|
|
+ order by create_time asc
|
|
|
|
+ ]]>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|